From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Control flow in org-todo drives me crazy
Date: Sat, 07 Jun 2014 17:16:06 +0200 [thread overview]
Message-ID: <87bnu47nt5.fsf@gmail.com> (raw)
Hi List,
assume I call `org-todo' with this in my init.el:
,--------------------------------------------------------
| (setq org-todo-keywords
| (quote
| ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!/!)")
| (sequence
| "WAITING(w@/!)" "HOLD(h@/!)" "|"
| "CANCELLED(c@/!)" "PHONE"))))
`--------------------------------------------------------
Then:
1. State changes from e.g. TODO to NEXT and vice versa are not logged
at all.
2. State changes _to_ e.g. WAITING and CANCELLED are logged with a
user message:
,----------------------------------------------------------------
| - State "CANCELLED" from "TODO" [2014-06-07 Sa 15:26] \\
| hallo
`----------------------------------------------------------------
3. State changes _from_ e.g. WAITING and CANCELLED are logged without
a user message, but with time and state info:
,-------------------------------------------------------------
| - State "TODO" from "CANCELLED" [2014-06-07 Sa 16:07]
`-------------------------------------------------------------
Now, abstracting away all the details and the use-case:
1. [don't care]
2. takes a note from the user, then calls `org-finish-function'
,------------------------------
| TODO state changed to WAITING
| org-log-note-how: note
`------------------------------
OK for me, because I can use 'org-finish-function' to "hook in" with my
own functions after command `org-todo' (and subsequent functions) did
their work.
3. does not take a note from the user (=> and thus does not call
`org-finish-function')
,------------------------------------------
| TODO state changed (from WAITING) to NEXT
| org-log-note-how: time
`------------------------------------------
How and where can I "hook in" after org-todo and org-store-log-note
did their work in this case? There is no hook, no finish-function,
and I can't even find the point in the code where control flow enters
this third branch (well, except the place where `org-log-note-how' is
evaluated maybe, but its kind of opaque ...)
Maybe somebody with good knowledge of this code could give me a hint?
--
cheers,
Thorsten
reply other threads:[~2014-06-07 15:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87bnu47nt5.fsf@gmail.com \
--to=tjolitz@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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).