emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] [PATCH] Fix clocking on capture completion


From: Viktor Rosenfeld
Subject: Re: [Orgmode] [PATCH] Fix clocking on capture completion
Date: Sat, 24 Jul 2010 20:41:51 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

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.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode



reply via email to

[Prev in Thread] Current Thread [Next in Thread]