mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-22 19:47:07 +00:00
org-paste-subtree: Do not use `insert-before-markers'
* lisp/org.el (org-paste-subtree): Use `insert' instead of `insert-before-markers'. The former is what people usually expect and doing otherwise is surprising. * lisp/org-archive.el (org-archive-to-archive-sibling): Do not expect `org-paste-subtree' to insert before markers.
This commit is contained in:
parent
24d2826f04
commit
2861d9cad8
@ -453,6 +453,8 @@ Archiving time is retained in the ARCHIVE_TIME node property."
|
||||
(setq leader (match-string 0)
|
||||
level (funcall outline-level))
|
||||
(setq pos (point-marker))
|
||||
;; Advance POS upon insertion in front of it.
|
||||
(set-marker-insertion-type pos t)
|
||||
(condition-case nil
|
||||
(outline-up-heading 1 t)
|
||||
(error (setq e (point-max)) (goto-char (point-min))))
|
||||
|
@ -7054,7 +7054,7 @@ When REMOVE is non-nil, remove the subtree from the clipboard."
|
||||
;; is inserted and then promoted.
|
||||
(combine-change-calls beg beg
|
||||
(when (fboundp 'org-id-paste-tracker) (org-id-paste-tracker txt))
|
||||
(insert-before-markers txt)
|
||||
(insert txt)
|
||||
(unless (string-suffix-p "\n" txt) (insert "\n"))
|
||||
(setq newend (point))
|
||||
(org-reinstall-markers-in-region beg)
|
||||
|
Loading…
Reference in New Issue
Block a user