[Top][All Lists]

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

[O] Control flow in org-todo drives me crazy

From: Thorsten Jolitz
Subject: [O] Control flow in org-todo drives me crazy
Date: Sat, 07 Jun 2014 17:16:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

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


 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

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


reply via email to

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