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: Sat, 24 Jul 2010 20:41:51 +0200	[thread overview]
Message-ID: <20100724184151.GA97728@stan> (raw)
In-Reply-To: <1279981217-14625-1-git-send-email-bernt@norang.ca>

Hi,

this patch fixes the problem for me.  I'm on
release_7.01g.24.g6b5cf.dirty

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.

Thanks,
Viktor

Bernt Hansen wrote:

> * lisp/org-capture.el (org-capture-finalize): Fix clock in of interrupted
> task during capture finalize
> 
> Calling org-capture-get inside the org-with-point-at macro does not
> work when the current clocking task and the capture target buffer are
> the same.  In this case the captured task would continue clocking
> instead of switching back to the previously clocking task.
> ---
> I think this patch fixes the issue but it should receive more testing.
> Please report back if this works or not.
> 
> -Bernt
> 
> 
>  lisp/org-capture.el |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lisp/org-capture.el b/lisp/org-capture.el
> index cf09dce..2efed78 100644
> --- a/lisp/org-capture.el
> +++ b/lisp/org-capture.el
> @@ -467,8 +467,9 @@ bypassed."
>  	       (markerp (org-capture-get :interrupted-clock 'local))
>  	       (buffer-live-p (marker-buffer
>  			       (org-capture-get :interrupted-clock 'local))))
> -      (org-with-point-at (org-capture-get :interrupted-clock 'local)
> -	(org-clock-in))
> +      (let ((clock-in-task (org-capture-get :interrupted-clock 'local)))
> +	(org-with-point-at clock-in-task
> +	  (org-clock-in)))
>        (message "Interrupted clock has been resumed")))
>  
>    (let ((beg (point-min))
> -- 
> 1.7.2
> 
> 
> _______________________________________________
> 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

  reply	other threads:[~2010-07-24 18:50 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 [this message]
2010-07-24 18:45     ` Bernt Hansen
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

  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=20100724184151.GA97728@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).