From: Ihor Radchenko <yantar92@posteo.net>
To: Ilya Chernyshov <ichernyshovvv@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Logging previous SCHEDULED property before changing TODO state of a habit
Date: Fri, 13 Oct 2023 12:30:35 +0000 [thread overview]
Message-ID: <8734ye3dsk.fsf@localhost> (raw)
In-Reply-To: <8734yjlhwi.fsf@gmail.com>
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>
prev parent reply other threads:[~2023-10-13 12:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=8734ye3dsk.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=ichernyshovvv@gmail.com \
/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).