[Emacs] Do org-window-habit repeats after logging the state change in logbook
This commit is contained in:
parent
f4485e2070
commit
96b2252a9f
@ -539,13 +539,18 @@
|
||||
(org-schedule nil target-time-string)))
|
||||
|
||||
(defun org-window-habit-auto-repeat-maybe-advice (orig &rest args)
|
||||
(apply orig args)
|
||||
(let ((res (apply orig args)))
|
||||
(when (and org-window-habit-mode (org-is-habit-p))
|
||||
(apply 'org-window-habit-auto-repeat args)))
|
||||
(apply 'org-window-habit-auto-repeat args))
|
||||
res))
|
||||
|
||||
(advice-add 'org-auto-repeat-maybe
|
||||
:around 'org-window-habit-auto-repeat-maybe-advice)
|
||||
|
||||
;; This seems to be the actually important annotation
|
||||
(advice-add 'org-add-log-note
|
||||
:around 'org-window-habit-auto-repeat-maybe-advice)
|
||||
|
||||
(defun org-window-habit-insert-consistency-graphs (&optional line)
|
||||
"Insert consistency graph for any habitual tasks."
|
||||
(let ((inhibit-read-only t)
|
||||
|
Loading…
Reference in New Issue
Block a user