emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Triggering clock in/out from org state change and progress loggi


From: Alexis Roda
Subject: Re: [O] Triggering clock in/out from org state change and progress logging
Date: Mon, 01 Sep 2014 19:32:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Hi list,
after struggling a bit with edebug (too many things to learn) I have traced what the problem is. For the archives:

State-change logging is deferred until the command finishes and is implemented by the function 'org-add-log-setup' adding the function 'org-add-log-note' to the hook 'post-command-hook'. The details of the note are stored in global variables 'org-log-note-xxx'.

That implementation prevents recursive calls to 'org-todo' (that's what my code does in order the pause the active task) from logging both the paused and the started log messages.

'org-add-log-note' will be called only once since the hook won't accept duplicated entries. Anyway, the innermost call to 'org-add-log-setup' will overwrite the variables 'org-log-note-xxx' with the details of the note being paused.

The outcome is that only the state change for the paused note is being logged.


Now that I know what the problem is I only have to figure a workaround. Any clue?



Regards




reply via email to

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