emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Manish <mailtomanish.sharma@gmail.com>
To: Richard Riley <rileyrgdev@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: clock and WAIT
Date: Fri, 15 Jan 2010 23:47:25 +0530	[thread overview]
Message-ID: <e7cdbe31001151017k6b0f68dr565da215dce4eb1d@mail.gmail.com> (raw)
In-Reply-To: <hiq7he$b63$1@ger.gmane.org>

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

  reply	other threads:[~2010-01-15 18:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2010-01-15 17:16 ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7cdbe31001151017k6b0f68dr565da215dce4eb1d@mail.gmail.com \
    --to=mailtomanish.sharma@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rileyrgdev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).