Bladeren bron

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=VjqmjGtzy8UC1SyPArKbA@mail.gmail.com
Ihor Radchenko 3 jaren geleden
bovenliggende
commit
aea7cab707
1 gewijzigde bestanden met toevoegingen van 1 en 3 verwijderingen
  1. 1 3
      lisp/org.el

+ 1 - 3
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."