From: Evgenii Klimov <eugene.dev@lipklim.org>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: [PATCH] org.el: Remove undefined dynamic variable `org-log-states' from example
Date: Tue, 11 Jul 2023 00:11:04 +0100 [thread overview]
Message-ID: <87lefnicka.fsf@lipklim.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 773 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org.el-Remove-undefined-dynamic-variable-org-log-sta.patch --]
[-- Type: text/x-diff, Size: 1794 bytes --]
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
next reply other threads:[~2023-07-10 23:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 23:11 Evgenii Klimov [this message]
2023-07-11 2:24 ` [PATCH] org.el: Remove undefined dynamic variable `org-log-states' from example Max Nikulin
2023-07-11 9:11 ` Ihor Radchenko
2023-07-12 13:42 ` Ihor Radchenko
2023-07-12 20:53 ` Evgenii Klimov
2023-07-13 11:29 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lefnicka.fsf@lipklim.org \
--to=eugene.dev@lipklim.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).