0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-02 13:23:22 +00:00

org-save-markers-in-region: Store log note marker

* lisp/org.el (org-save-markers-in-region): Store
`org-log-note-marker' when storing and reinstalling Org markers.

This change automatically handles note taken after refiling/archiving
without trying to place the note in place of the moved
subtree/heading.

Link: https://orgmode.org/list/m2plyjid8q.fsf@kyon.home
This commit is contained in:
Ihor Radchenko 2024-05-18 13:12:50 +02:00
parent 41c2e7af10
commit 5fcd1d9def
No known key found for this signature in database
GPG key ID: 6470762A7DA11D8B

View file

@ -7371,6 +7371,7 @@ If optional TXT is given, check this string instead of the current kill."
Those markers are stored together with their positions relative to Those markers are stored together with their positions relative to
the start of the region.") the start of the region.")
(defvar org-log-note-marker) ; defined later
(defun org-save-markers-in-region (beg end) (defun org-save-markers-in-region (beg end)
"Check markers in region. "Check markers in region.
If these markers are between BEG and END, record their position relative If these markers are between BEG and END, record their position relative
@ -7380,6 +7381,7 @@ This function gets called just before an entry or tree gets cut from the
buffer. After re-insertion, `org-reinstall-markers-in-region' must be buffer. After re-insertion, `org-reinstall-markers-in-region' must be
called immediately, to move the markers with the entries." called immediately, to move the markers with the entries."
(setq org-markers-to-move nil) (setq org-markers-to-move nil)
(org-check-and-save-marker org-log-note-marker beg end)
(when (featurep 'org-clock) (when (featurep 'org-clock)
(org-clock-save-markers-for-cut-and-paste beg end)) (org-clock-save-markers-for-cut-and-paste beg end))
(when (featurep 'org-agenda) (when (featurep 'org-agenda)