[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Re: [Bug] [Version 7.5] org-capture : the clock doesn't resume on th
From: |
Frederic Couchet |
Subject: |
[O] Re: [Bug] [Version 7.5] org-capture : the clock doesn't resume on the original clocking task |
Date: |
Mon, 04 Apr 2011 12:17:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>>>>> "Bernt" == Bernt Hansen <address@hidden> 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.