emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Logging previous SCHEDULED property before changing TODO state of a habit
@ 2023-10-09 19:23 Ilya Chernyshov
  2023-10-13 12:30 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Ilya Chernyshov @ 2023-10-09 19:23 UTC (permalink / raw)
  To: emacs-orgmode


Hi.

Is there anything I can do with my Org config so that every time I
change the TODO state of my habit (example below), Org logs inactive
timestamp from SCHEDULED property before TODO state change?

For example, I have this habit, which I have been forgetting to mark as
DONE/MISSED/WHATEVER for the past several days:


* TODO heading
SCHEDULED: <2023-10-05 Thu +1d>
:PROPERTIES:
:CREATED:  [2023-10-01 Sun 01:25]
:END:


Now, I want Org to log when I done the task and when I missed it, but
instead it inserts the timestamp of current time:


* TODO heading
SCHEDULED: <2023-10-08 Sun +1d>
:PROPERTIES:
:CREATED:  [2023-10-01 Sun 01:25]
:LAST_REPEAT: [2023-10-10 Tue 02:08]
:END:
:LOGBOOK:
- State "DONE"       from "TODO"       [2023-10-10 Tue 02:08]
- State "MISSED"     from "TODO"       [2023-10-10 Tue 02:08]
- State "DONE"       from "TODO"       [2023-10-10 Tue 02:08]
:END:


What I want to get instead is:


* TODO heading
SCHEDULED: <2023-10-08 Sun +1d>
:PROPERTIES:
:CREATED:  [2023-10-01 Sun 01:25]
:LAST_REPEAT: [2023-10-10 Tue 02:08]
:END:
:LOGBOOK:
- State "DONE"       from "TODO"       [2023-10-08 Sun]
- State "MISSED"     from "TODO"       [2023-10-07 Sat]
- State "DONE"       from "TODO"       [2023-10-06 Fri]
:END:


It would be awesome, if there was a placeholder in org-log-note-headings
(for example "%e") that is replaced with previous SCHEDULED
timestamp. Can we do that? Or is there a better option to achieve that?


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-13 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-09 19:23 Logging previous SCHEDULED property before changing TODO state of a habit Ilya Chernyshov
2023-10-13 12:30 ` Ihor Radchenko

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