emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Logging previous SCHEDULED property before changing TODO state of a


From: Ihor Radchenko
Subject: Re: Logging previous SCHEDULED property before changing TODO state of a habit
Date: Fri, 13 Oct 2023 12:30:35 +0000

Ilya Chernyshov <ichernyshovvv@gmail.com> writes:

> 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:
> ...
> 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:
> ...
> ...
> 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?

There is no easy way, especially since you probably want a different
note depending on the todo keyword (scheduled time for MISSED and today
for DONE, for example).

The %t placeholder from `org-log-note-headings' is not exactly the
current time, but rather the return value of
`org-current-effective-time'.

`org-current-effective-time', is somewhat customizeable.
We allow to use the last clock out time as the timestamp via
`org-use-last-clock-out-time-as-effective-time'.

To get what you need, it will be necessary to add more customization.
For example, we can allow a user function that returns the time that
should be used. Feel free to submit a patch to that effect.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]