emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Duplicated TODO state change logging with `!' per-keyword markers and repeater [9.4.6]
@ 2021-06-03 18:35 Leon Vack
  0 siblings, 0 replies; only message in thread
From: Leon Vack @ 2021-06-03 18:35 UTC (permalink / raw)
  To: emacs-orgmode


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-03 21:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-03 18:35 Bug: Duplicated TODO state change logging with `!' per-keyword markers and repeater [9.4.6] Leon Vack

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).