org-clock.el: Set the marker for `org-clock-history' at a safer position.
* org-clock.el (org-clock-in): Set the marker for `org-clock-history' at a safer position. The clock marker stored in `org-clock-history' used to be at the beginning of the heading. When manually inserting content here, the marker is not updated because it is *before* the point. So set the clock marker right after the first "*" of the headline so that it will always be correctly updated.
This commit is contained in:
parent
eb7a9a1d8d
commit
796b4ec43b
|
@ -1146,7 +1146,12 @@ clock in by using the last clock-out time as the start time
|
|||
(goto-char target-pos)
|
||||
(org-back-to-heading t)
|
||||
(or interrupting (move-marker org-clock-interrupted-task nil))
|
||||
(org-clock-history-push)
|
||||
(save-excursion
|
||||
(forward-char) ;; make sure the marker is not at the
|
||||
;; beginning of the heading, since the
|
||||
;; user is liking to insert stuff here
|
||||
;; manually
|
||||
(org-clock-history-push))
|
||||
(org-clock-set-current)
|
||||
(cond ((functionp org-clock-in-switch-to-state)
|
||||
(looking-at org-complex-heading-regexp)
|
||||
|
|
Loading…
Reference in New Issue