diff options
author | Bernt Hansen <bernt@norang.ca> | 2010-07-24 19:20:17 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-07-28 02:35:38 -0400 |
commit | 95212c22024e81fc32d2f4d76d5901b85e952826 (patch) | |
tree | 39ecf15444009ea84e6392757586af188cd8b06c | |
parent | f47a27ae407fc17a19ccebfb5caa334f66daac8c (diff) | |
download | org-mode-95212c22024e81fc32d2f4d76d5901b85e952826.tar.gz |
Fix clocking on capture completion
* 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.
-rw-r--r-- | 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)) |