I just very recently started using Emacs Org-mode to organize my tasks, and I really don't know anything about Emacs-Lisp.
What I have achieved is to mark a TODO entry as
DONE when its children(sub-entry) are marked
DONE by putting these commands in my Init file as instructed by the Org-mode manual.
(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")))) (add-hook 'org-after-todo-statistics-hook #'org-summary-todo)
However, this doesn't work when I want it to change the status of a child(sub-entry) based on this child's child(sub-sub-entry). Effectively, I have this following TODO list:
* Testing[0%] ** TODO Item1[100%] *** DONE Item1.1... *** DONE Item1.2... ** TODO Item2[0%] *** TODO Item2.1 *** TODO Item2.2
and notice how the first
TODO should be
DONE since it's 100% completed. The above code provided in the Org-mode manual could not achieve this effect.
Is there some additional commands I can put in the Init file to make this work?