[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] org.el: Remove undefined dynamic variable `org-log-states' from
From: |
Evgenii Klimov |
Subject: |
[PATCH] org.el: Remove undefined dynamic variable `org-log-states' from example |
Date: |
Tue, 11 Jul 2023 00:11:04 +0100 |
I added `org-summary-todo' example function, that are advertized in
`org-after-todo-statistics-hook', to my init file (with
lexical-binding: t) and got a compilation warning:
Warning (bytecomp): Unused lexical variable `org-log-states'
since this variable is undefined. The command:
git log -G 'org-log-states[^-]' --patch -- lisp/
shows its first appearance in commit
2c0812caf14e674d938d80d05678576c0cefcc83 but only in docstring.
Running ~find~ also didn't show its definition:
find -H . -type f -exec grep --color=auto -i -nH --null \
-e org-log-states\[\^-\] \{\} +
But there are =org-log-states-order-reversed=, but it doesn't seem to
be relevant.
PS: I didn't add TINYCHANGE since I have reached the contribution
limit but FSF didn't respond yet.
>From a3e50c5799acb216ccb2c1ae6883d73ac36e4291 Mon Sep 17 00:00:00 2001
From: Evgenii Klimov <eugene.dev@lipklim.org>
Date: Mon, 10 Jul 2023 23:00:41 +0100
Subject: [PATCH] org.el: Remove undefined dynamic variable `org-log-states'
from example
* lisp/org.el (org-after-todo-statistics-hook): Remove undefined
dynamic variable `org-log-states' from docstring example.
* doc/org-manual.org (Breaking Down Tasks into Subtasks): The same
thing in doc example.
`org-log-states' was never defined throughout the whole repo history,
its removal helps to avoid compilation warning.
---
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 987a29354..8a58bb31e 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) ; 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 62278ec77..9df56c700 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9755,7 +9755,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) ; turn off logging
(org-todo (if (= n-not-done 0) \"DONE\" \"TODO\"))))")
(defvar org-todo-statistics-hook nil
--
2.34.1
- [PATCH] org.el: Remove undefined dynamic variable `org-log-states' from example,
Evgenii Klimov <=