diff --git a/config.org b/config.org index f5074ee..e41ad24 100644 --- a/config.org +++ b/config.org @@ -3326,12 +3326,6 @@ The simple package =org-checklist= from =org-contrib= makes it so that checkboxe (add-hook 'org-after-todo-state-change-hook #'org-checklist))) #+end_src -The ~org-checklist~ function will reset the checkboxes on any task, but I only want them reset when the task repeats. - -#+begin_src emacs-lisp -(advice-add #'org-checklist :before-while #'org-get-repeat) -#+end_src - I don't want to have to specify the =RESET_CHECK_BOXES= property for every TODO I write, though. I would much prefer if it was on by default, and the system allowed me to turn it off if I wanted to. Luckily, the fine control Org gives you over property inheritance nicely fixes this problem. #+begin_src emacs-lisp @@ -3340,9 +3334,13 @@ I don't want to have to specify the =RESET_CHECK_BOXES= property for every TODO (defpatch! org-checklist (defun org-reset-checkbox-state-maybe) () - "Reset all checkboxes in an entry if the `RESET_CHECK_BOXES' property is set" + (el-patch-concat + "Reset all checkboxes in an entry if the `RESET_CHECK_BOXES' property is set" + (el-patch-add " and if the entry has a repeating timestamp.")) (interactive "*") - (if (org-entry-get (point) "RESET_CHECK_BOXES" (el-patch-add t)) + (if (el-patch-wrap 2 + (and (org-get-repeat) + (org-entry-get (point) "RESET_CHECK_BOXES" (el-patch-add t)))) (org-reset-checkbox-state-subtree))) #+end_src