unofficial mirror of emacs-orgmode@gnu.org
 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

unofficial mirror of emacs-orgmode@gnu.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/orgmode/0 orgmode/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 orgmode orgmode/ https://yhetil.org/orgmode \
		emacs-orgmode@gnu.org
	public-inbox-index orgmode

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git