From: Leon Vack <dev@lgcl.de>
To: emacs-orgmode@gnu.org
Subject: Bug: Duplicated TODO state change logging with `!' per-keyword markers and repeater [9.4.6]
Date: Thu, 03 Jun 2021 20:35:19 +0200 [thread overview]
Message-ID: <87o8cmx0d4.fsf@sol.hw.lgcl.de> (raw)
Hello,
Starting with version 9.4.6, state logging through a per-keyword marker
`!' produces duplicate log entries on tasks with a repeater.
A minimal test configuration to reproduce the issue is:
(setq org-todo-keywords '((sequence "TODO" "DONE(!)")))
Then, creating a task with a repeater:
* TODO Test Task
SCHEDULED: <2021-06-04 Fri .+1d>
And marking it done yields:
* TODO Test Task
SCHEDULED: <2021-06-04 Fri .+1d>
:PROPERTIES:
:LAST_REPEAT: [2021-06-03 Thu 19:58]
:END:
- State "DONE" from "TODO" [2021-06-03 Thu 19:58]
- State "DONE" from "TODO" [2021-06-03 Thu 19:58]
Instead of:
* TODO Test Task
SCHEDULED: <2021-06-04 Fri .+1d>
:PROPERTIES:
:LAST_REPEAT: [2021-06-03 Thu 19:58]
:END:
- State "DONE" from "TODO" [2021-06-03 Thu 19:58]
I have done some debugging and testing. The first commit in which I was
able to reproduce the bug is c670379adfbdc4883d3cfa230289fd2829993265.
This commit changed the behavior of `org-add-log-setup' to call
`org-add-log-note' directly (instead of just adding it to the
`post-command-hook') when logging only a timestamp and no note. The
problem is, that with a repeater when enabling logging through a `!'
marker, `org-add-log-setup' is called twice: Once by `org-todo' directly
and once by `org-auto-repeat-maybe' resulting in the two state log
entries.
Emacs: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.16.0)
Leon Vack
reply other threads:[~2021-06-03 21:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87o8cmx0d4.fsf@sol.hw.lgcl.de \
--to=dev@lgcl.de \
--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).