summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2019-01-13 00:10:04 -0500
committerKyle Meyer <kyle@kyleam.com>2019-01-13 00:13:33 -0500
commitf3584ecc3b437a53da4ecfe5c7e04a4d8f659ad5 (patch)
treed86367255869b141e42e906f2620076cf5beec89
parent87c4635c889c907c9acbc0675fe1c377d4a7a6ce (diff)
downloadorg-mode-f3584ecc3b437a53da4ecfe5c7e04a4d8f659ad5.tar.gz
org-clock: Correctly locate heading when resolving clock
* lisp/org-clock.el (org-clock-resolve-clock): Store heading location as marker instead of raw position to ensure that org-clock-in is called in the correct buffer. This fixes a regression introduced by 503ede74b (org-clock: Fix resolving clocks, 2018-12-06).
-rw-r--r--lisp/org-clock.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 5677700..08e545b 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -928,7 +928,9 @@ CLOCK is a cons cell of the form (MARKER START-TIME)."
;; contents, and leave point on the /next/ headline. We store
;; the current entry location to be able to get back here when
;; we need to clock in again the previously clocked task.
- (heading (org-with-point-at (car clock) (org-back-to-heading t))))
+ (heading (org-with-point-at (car clock)
+ (org-back-to-heading t)
+ (point-marker))))
(pcase resolve-to
(`nil
(org-clock-clock-cancel clock)