diff --git a/doc/org-manual.org b/doc/org-manual.org index ea519ea3e..ff3bfcf82 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -4562,7 +4562,7 @@ all children are done, you can use the following setup: #+begin_src emacs-lisp (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 + (let (org-log-done org-todo-log-states) ; turn off logging (org-todo (if (= n-not-done 0) "DONE" "TODO")))) (add-hook 'org-after-todo-statistics-hook #'org-summary-todo) diff --git a/lisp/org.el b/lisp/org.el index 923593bbb..0043c0407 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9709,7 +9709,7 @@ when there is a statistics cookie in the headline! (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 + (let (org-log-done org-todo-log-states) ; turn off logging (org-todo (if (= n-not-done 0) \"DONE\" \"TODO\"))))") (defvar org-todo-statistics-hook nil