emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* clock and WAIT
@ 2010-01-15 11:22 Richard Riley
  2010-01-15 15:47 ` Manish
  2010-01-15 17:16 ` Carsten Dominik
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Riley @ 2010-01-15 11:22 UTC (permalink / raw)
  To: emacs-orgmode


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

regards

r.


-- 
Google Talk : rileyrgdev@googlemail.com  http://www.google.com/talk

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: clock and WAIT
  2010-01-15 11:22 clock and WAIT Richard Riley
@ 2010-01-15 15:47 ` Manish
  2010-01-15 17:10   ` Richard Riley
  2010-01-15 17:16 ` Carsten Dominik
  1 sibling, 1 reply; 5+ messages in thread
From: Manish @ 2010-01-15 15:47 UTC (permalink / raw)
  To: Richard Riley; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: clock and WAIT
  2010-01-15 15:47 ` Manish
@ 2010-01-15 17:10   ` Richard Riley
  2010-01-15 18:17     ` Manish
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Riley @ 2010-01-15 17:10 UTC (permalink / raw)
  To: emacs-orgmode

Manish <mailtomanish.sharma@gmail.com> 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.

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.

-- 
Google Talk : rileyrgdev@googlemail.com  http://www.google.com/talk

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: clock and WAIT
  2010-01-15 11:22 clock and WAIT Richard Riley
  2010-01-15 15:47 ` Manish
@ 2010-01-15 17:16 ` Carsten Dominik
  1 sibling, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2010-01-15 17:16 UTC (permalink / raw)
  To: Richard Riley; +Cc: emacs-orgmode


On Jan 15, 2010, at 12:22 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?

I think that is a useful extension, so it now works like this.

Thanks.

- Carsten

>
> 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"?
>
> regards
>
> r.
>
>
> -- 
> Google Talk : rileyrgdev@googlemail.com  http://www.google.com/talk
>
>
>
> _______________________________________________
> 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

- Carsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: clock and WAIT
  2010-01-15 17:10   ` Richard Riley
@ 2010-01-15 18:17     ` Manish
  0 siblings, 0 replies; 5+ messages in thread
From: Manish @ 2010-01-15 18:17 UTC (permalink / raw)
  To: Richard Riley; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-01-15 18:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-15 11:22 clock and WAIT Richard Riley
2010-01-15 15:47 ` Manish
2010-01-15 17:10   ` Richard Riley
2010-01-15 18:17     ` Manish
2010-01-15 17:16 ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).