On Fri, Jan 15, 2010 at 10:40 PM, Richard Riley wrote:
Manish writes:
On Fri, Jan 15, 2010 at 4:52 PM, Richard Riley wrote:
When I put a task into certain states it would be nice to stop the clock
automatically. It is done for DONE at the moment.
Would it make sense to make
org-clock-out-when-done
a list of state names rather than (or in addition to) a bool?
That way I could make it DONE, WAIT so when I cycle the state to WAIT (eg
for
an email confirming something works) the clock is stopped automatically?
Or is there another mechanism for this? Or is the mantra more to keep
stop/start manual until the obvious state for DONE?
Not for a list of states but it can be done for at least one state.
See variable org-clock-out-switch-to-state.
HTH
Thats a different issue. That determines which state the task is
automatically switched to when you actually remember to clock out.
You are right. I misunderstood. Sorry.
I'm not sure I would find that useful since there are multiple states I
might be in with and without the clock running and I wouldnt want stopping the
clock to reset the state.
How about this?
--8---cut here---start-8---
(add-hook 'org-after-todo-state-change-hook
'(lambda ()
;; clock out when switching to WAIT
;; based on Eric Fraga's recent post to org-mode list
(if (string= state WAIT) (org-clock-out t
--8---cut here---end---8---
Not sure if this is exactly what you need but guess it's a starting point..
--
Manish
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode