From 0b6f9f867774c06373051b1f2ce856ba1ebe80d8 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Tue, 11 Jul 2023 12:06:52 +0300 Subject: [PATCH 1/2] Fix typo in `org-todo-log-states' variable name * doc/org-manual.org (Priorities): * lisp/org.el (org-update-parent-todo-statistics): Fix incorrect spelling of `org-todo-log-states' variable. Reported-by: Evgenii Klimov Reported-by: Max Nikulin Link: https://list.orgmode.org/orgmode/e900a08d-11af-9106-423e-28a2befe813d@gmail.com/ --- doc/org-manual.org | 2 +- lisp/org.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 From da1bc002f2272b775624452bdd30ef53f19ca946 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Sun, 30 Jul 2023 12:20:15 +0300 Subject: [PATCH 2/2] Backport Emacs commit 670174a6d5f * lisp/org-macs.el (org-replace-escapes): Suppress byte-compiler warning about modifying constant string. Unlike, 39786a8dbfa3b87e3edcd9be3b139e8f88bbc771, this commit does not create merge conflicts. --- lisp/org-macs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 1552675f8..4efa8ba68 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -1288,7 +1288,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)