From b0975b8db5749a611acd663f7a2a93f4e26abff3 Mon Sep 17 00:00:00 2001 From: Niten Date: Mon, 4 Jul 2022 22:24:12 +0000 Subject: [PATCH] When all subtasks are done, todo task is done --- config.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config.el b/config.el index 3b145ff..b3ec5a8 100644 --- a/config.el +++ b/config.el @@ -131,6 +131,11 @@ (setq exec-path (remove-duplicates (append (get-bash-path) exec-path) :test #'equal)) +(defun org-summary-todo (n-done n-not-done) + "Switch entry to DONE when all subentries are done, to TODO otherwise." + (let (org-log-done org-log-states) ; turn off logging + (org-todo (if (= n-not-done 0) "DONE" "TODO")))) + (let ((site-dir (if (getenv "DOOM_EMACS_SITE_PATH") (getenv "DOOM_EMACS_SITE_PATH") (expand-file-name ".doom.d/site.d/"))))