dotfiles/emacs-lisp/org_habit.org
main a5a651dbb9
Large rework and cleanup
Signed-off-by: main <magic_rb@redalder.org>
2022-07-31 11:03:59 +02:00

1,018 B

Org Habit

#

  (require 'org-habit)

Setup a function which resets any checkboxes under a TODO which changes state to DONE. Many thanks to davidglasser, who had this exact same issue and solved it on Reddit.

  (defun glasser-org-reset-check-on-repeat ()
    (when (and (org-get-repeat) (member org-state org-done-keywords))
      (org-reset-checkbox-state-subtree)))
  (add-hook 'org-after-todo-state-change-hook 'glasser-org-reset-check-on-repeat)