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).
This commit is contained in:
Kyle Meyer 2019-01-13 00:10:04 -05:00
parent 87c4635c88
commit f3584ecc3b

View file

@ -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)