branch: externals-release/org commit aea7cab707412a002f7e228d56fbb05a9c429029 Author: Ihor Radchenko <yanta...@gmail.com> Commit: Bastien <b...@gnu.org>
Fix duplicate logbook entry for repeated tasks * lisp/org.el (org-add-log-setup): Always run `org-add-log-note' via `post-command-hook'. Otherwise, there is no way to know if a note was requested for `this-command'. Running `org-add-log-note' directly would, for example, break `org-auto-repeat-maybe' as reported in [1]. [1] https://orgmode.org/list/CAOn=hbcaW1R6vtun-E2r4LS=j3dp=vjqmjgtzy8uc1sypar...@mail.gmail.com --- lisp/org.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 051987e..44c70e9 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10863,9 +10863,7 @@ EXTRA is additional text that will be inserted into the notes buffer." org-log-note-extra extra org-log-note-effective-time (org-current-effective-time) org-log-setup t) - (if (eq how 'note) - (add-hook 'post-command-hook 'org-add-log-note 'append) - (org-add-log-note purpose))) + (add-hook 'post-command-hook 'org-add-log-note 'append)) (defun org-skip-over-state-notes () "Skip past the list of State notes in an entry."