diff --git a/doc/org-manual.org b/doc/org-manual.org index 6d3d5cc40..5ce252042 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -4648,7 +4648,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-macs.el b/lisp/org-macs.el index fc3570f84..1d9623b13 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -1306,7 +1306,7 @@ so values can contain further %-escapes if they are define later in TABLE." (setq re (concat "%-?[0-9.]*" (substring (car e) 1))) (when (and (cdr e) (string-match re (cdr e))) (let ((sref (substring (cdr e) (match-beginning 0) (match-end 0))) - (safe "SREF")) + (safe (copy-sequence "SREF"))) (add-text-properties 0 3 (list 'sref sref) safe) (setcdr e (replace-match safe t t (cdr e))))) (while (string-match re string) diff --git a/lisp/org.el b/lisp/org.el index 9b3999e19..9957fe950 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9759,7 +9759,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