Hi Luca,

Luca Ferrari <fluca1...@infinito.it> writes:

> I'd like to advice the function org-todo to check in and check out the
> clock automatically.

I would not advice `org-todo', I would explore the idea of adding a
function to `org-after-todo-state-change-hook'.

> I've defined the org-todo-keywords so that they have a choice letter as 
> follows:
>
> (setq org-todo-keywords
>       '( (sequence "TODO(t!)" "|" "DONE(d!)")
>          (sequence "FEATURE(f!)" "BUG(b!)"  "IMPLEMENTING(i!)" "|"
> "COMPLETED(c!)")
>          ))
>
> and I'd like to start the clock each time the "i" (implementing) is
> chosen, stopping the clock each time the "c" (completed) is selected.

You can use (setq org-clock-out-when-done t) for this.

> However I've a little problem doing the advice because the argument is
> null and therefore I don't know which letter the user has pressed.
> Anyone can provide a little help?

HTH,

-- 
 Bastien

Reply via email to