فهرست منبع

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.
Ihor Radchenko 2 سال پیش
والد
کامیت
2861d9cad8
2فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 2 0
      lisp/org-archive.el
  2. 1 1
      lisp/org.el

+ 2 - 0
lisp/org-archive.el

@@ -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))))

+ 1 - 1
lisp/org.el

@@ -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)