emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Viktor Rosenfeld <listuser36@googlemail.com>
To: Bernt Hansen <bernt@norang.ca>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Fix clocking on capture completion
Date: Sun, 25 Jul 2010 00:09:26 +0200	[thread overview]
Message-ID: <20100724220926.GA251@stan> (raw)
In-Reply-To: <878w50vhuh.fsf@gollum.intra.norang.ca>

Hi Bernt,

thanks for the updated version.  It works as expected.

Cheers,
Viktor

Bernt Hansen wrote:

> Viktor Rosenfeld <listuser36@googlemail.com> writes:
> 
> > A somewhat related question: I use your bh/clock-in-to-next function to
> > change the todo state to STARTED when clocking in TODO tasks.
> > Unfortunately it is being applied to Capture buffers.  I tried changing
> > the buffer-name to "CAPTURE-*" but that didn't help.
> 
> I've updated the function for capture mode but not posted the changes to
> my doc.norang.ca yet.  Here's the function that works for me with
> capture and remember mode.  I'm going to be removing the remember mode
> logic since I no longer use that.
> 
> (defun bh/clock-in-to-next (kw)
>   "Switch task from TODO to NEXT when clocking in.
> Skips remember tasks and tasks with subtasks"
>   (if (and (string-equal kw "TODO")
> 	   (not (string-equal (buffer-name) "*Remember*"))
> 	   (not (and (boundp 'org-capture-mode) org-capture-mode)))
>       (let ((subtree-end (save-excursion (org-end-of-subtree t)))
> 	    (has-subtask nil))
> 	(save-excursion
> 	  (forward-line 1)
> 	  (while (and (not has-subtask)
> 		      (< (point) subtree-end)
> 		      (re-search-forward "^\*+ " subtree-end t))
> 	    (when (member (org-get-todo-state) org-not-done-keywords)
> 	      (setq has-subtask t))))
> 	(when (not has-subtask)
> 	  "NEXT"))))

      reply	other threads:[~2010-07-24 22:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-23 12:59 Issue with correctly resuming interrupted timer Benjamin Beckwith
2010-07-24  5:59 ` Bernt Hansen
2010-07-24 14:20 ` [PATCH] Fix clocking on capture completion Bernt Hansen
2010-07-24 18:41   ` Viktor Rosenfeld
2010-07-24 18:45     ` Bernt Hansen
2010-07-24 22:09       ` Viktor Rosenfeld [this message]

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=20100724220926.GA251@stan \
    --to=listuser36@googlemail.com \
    --cc=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    /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).