[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] help advicing org-todo
From: |
Bastien |
Subject: |
Re: [O] help advicing org-todo |
Date: |
Thu, 03 Jan 2013 17:48:44 +0100 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) |
Hi Luca,
Luca Ferrari <address@hidden> 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