From: Bernt Hansen <bernt@norang.ca>
To: Viktor Rosenfeld <listuser36@googlemail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Fix clocking on capture completion
Date: Sat, 24 Jul 2010 14:45:58 -0400 [thread overview]
Message-ID: <878w50vhuh.fsf@gollum.intra.norang.ca> (raw)
In-Reply-To: <20100724184151.GA97728@stan> (Viktor Rosenfeld's message of "Sat, 24 Jul 2010 20:41:51 +0200")
Viktor Rosenfeld <listuser36@googlemail.com> writes:
> this patch fixes the problem for me. I'm on
> release_7.01g.24.g6b5cf.dirty
Thanks for the feedback.
> 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"))))
HTH,
Bernt
next prev parent reply other threads:[~2010-07-24 18:46 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 [this message]
2010-07-24 22:09 ` Viktor Rosenfeld
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878w50vhuh.fsf@gollum.intra.norang.ca \
--to=bernt@norang.ca \
--cc=emacs-orgmode@gnu.org \
--cc=listuser36@googlemail.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.