emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Hook after handling repeating TODO?
@ 2014-11-05  3:08 James Harkins
  0 siblings, 0 replies; only message in thread
From: James Harkins @ 2014-11-05  3:08 UTC (permalink / raw)
  To: orgmode

Is there a hook that runs after a TODO state change triggers a repeat?

I have a few weekly tasks that I've set up as habits. These refer to scheduled lessons. I have the idea that it would be pretty cool to include in the habit entry a link pointing to the next lesson. When I mark the habit DONE, it processes the repeat (updates the habit's scheduled time and switches the state back to TODO). That would be the point to find the next lesson for that group of students and update the link text. The most reliable way would be to search for the earliest lesson whose scheduled time is later than the updated timestamp for the habit.

I did some searching but didn't find a hook that appeared obviously to be suitable. I suppose a TODO state-change hook might have worked, provided that the repeating timestamp will be processed before the state change. Unfortunately, it appears that it goes in the opposite order: in org-auto-repeat-maybe, (org-todo to-state) occurs at line 13152, well before processing the new timestamp (13172-13209). So I guess not that one.

Any ideas? Thanks,
hjh

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

only message in thread, other threads:[~2014-11-05  3:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-05  3:08 Hook after handling repeating TODO? James Harkins

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