* [Bug] [Version 7.5] org-capture : the clock doesn't resume on the original clocking task
@ 2011-04-02 13:41 Frederic Couchet
2011-04-02 17:57 ` Bernt Hansen
0 siblings, 1 reply; 3+ messages in thread
From: Frederic Couchet @ 2011-04-02 13:41 UTC (permalink / raw)
To: emacs-orgmode
Hello,
I use ":clock-in t" and ":clock-resume t" in some org-capture templates.
Under org-mode 7.5, after the captured task is filed with C-c C-c the
clock doesn't resume on the original clocking task.
If I use the git version of org-capture, the clock resumes on the
original clocking task.
Here is the template :
(custom-set-variables
'(org-capture-templates (quote (("t" "Todo" entry (file+headline "timesheet.org" "Next Actions") "* TODO %^{Brief Description} :REFILE:
%^{Effort}p %? Added: %U" :clock-in t :clock-resume t)))
...
Fred.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bug] [Version 7.5] org-capture : the clock doesn't resume on the original clocking task
2011-04-02 13:41 [Bug] [Version 7.5] org-capture : the clock doesn't resume on the original clocking task Frederic Couchet
@ 2011-04-02 17:57 ` Bernt Hansen
2011-04-04 10:17 ` Frederic Couchet
0 siblings, 1 reply; 3+ messages in thread
From: Bernt Hansen @ 2011-04-02 17:57 UTC (permalink / raw)
To: Frederic Couchet; +Cc: emacs-orgmode
Frederic Couchet <fcouchet@april.org> writes:
> I use ":clock-in t" and ":clock-resume t" in some org-capture templates.
>
> Under org-mode 7.5, after the captured task is filed with C-c C-c the
> clock doesn't resume on the original clocking task.
>
> If I use the git version of org-capture, the clock resumes on the
> original clocking task.
Hi Frederic,
So does this mean it's fixed in origin/master but broken in release_7.5?
Is your original task in the same file as the target of your capture?
There were a few fixes to the codebase for clocking after the 7.5
release.
Regards,
Bernt
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bug] [Version 7.5] org-capture : the clock doesn't resume on the original clocking task
2011-04-02 17:57 ` Bernt Hansen
@ 2011-04-04 10:17 ` Frederic Couchet
0 siblings, 0 replies; 3+ messages in thread
From: Frederic Couchet @ 2011-04-04 10:17 UTC (permalink / raw)
To: emacs-orgmode
>>>>> "Bernt" == Bernt Hansen <bernt@norang.ca> writes:
Bernt> Hi Frederic,
Bernt> So does this mean it's fixed in origin/master but broken in
Bernt> release_7.5? Is your original task in the same file as the
Bernt> target of your capture?
Yes, it is.
Bernt> There were a few fixes to the codebase for clocking after the
Bernt> 7.5 release.
Ok.
That works with the git version, that is the main thing.
Here is the diff between the 7.5 version and git version.
--- org-7.5/lisp/org-capture.el 2011-03-07 15:29:01.000000000 +0100
+++ org-7.5-git/lisp/org-capture.el 2011-03-30 16:46:41.000000000 +0200
@@ -54,7 +54,7 @@
(require 'org-mks)
(declare-function org-datetree-find-date-create "org-datetree"
- (DATE &optional KEEP-RESTRICTION))
+ (date &optional keep-restriction))
(declare-function org-table-get-specials "org-table" ())
(declare-function org-table-goto-line "org-table" (N))
(defvar org-remember-default-headline)
@@ -460,7 +460,7 @@
(org-capture-get :key)
(nth 1 error))))
(if (org-capture-get :immediate-finish)
- (org-capture-finalize nil (not (org-capture-get :clock-keep)))
+ (org-capture-finalize nil (org-capture-get :clock-keep))
(if (and (org-mode-p)
(org-capture-get :clock-in))
(condition-case nil
@@ -491,12 +491,12 @@
(t (setq txt "* Invalid capture template")))
(org-capture-put :template txt)))
-(defun org-capture-finalize (&optional stay-with-capture clock-out)
+(defun org-capture-finalize (&optional stay-with-capture clock-keep)
"Finalize the capture process.
With prefix argument STAY-WITH-CAPTURE, jump to the location of the
captured item after finalizing.
A second optional argument tells whether finalizing the capture
-process should clock-out the captured entry."
+process should keep the clock running in the filed entry."
(interactive "P")
(unless (and org-capture-mode
(buffer-base-buffer (current-buffer)))
@@ -509,8 +509,8 @@
(> org-clock-marker (point-min))
(< org-clock-marker (point-max)))
;; Looks like the clock we started is still running. Clock out.
- (when clock-out (let (org-log-note-clock-out) (org-clock-out)))
- (when (and clock-out
+ (when (not clock-keep) (let (org-log-note-clock-out) (org-clock-out)))
+ (when (and (not clock-keep)
(org-capture-get :clock-resume 'local)
(markerp (org-capture-get :interrupted-clock 'local))
(buffer-live-p (marker-buffer
Librement,
Fred.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-04 10:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-02 13:41 [Bug] [Version 7.5] org-capture : the clock doesn't resume on the original clocking task Frederic Couchet
2011-04-02 17:57 ` Bernt Hansen
2011-04-04 10:17 ` Frederic Couchet
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.