diff options
author | Aliaksey Artamonau <aliaksiej.artamonau@gmail.com> | 2018-01-08 16:53:20 +0300 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-01-10 12:48:28 +0100 |
commit | 0a8711a0a5580a288821157559936980f00db3fe (patch) | |
tree | 3623bf69b8d3486698613bb4426e1debb49c7cca | |
parent | 8c7a14a850e7b988fe4c9d0eea9207793e2af368 (diff) | |
download | org-mode-0a8711a0a5580a288821157559936980f00db3fe.tar.gz |
org-clock.el: Fix one time continuous clock in
* org-clock.el (org-clock-in): Abort after calling `org-clock-in'
recursively with `org-clock-continuously' set.
Without the change the recursive call to `org-clock-in' would
insert a clock of last clock-out, but then the original call
would continue by inserting another clock at
current-time. As a result of that, clocking out uses the latter
of the two clocks and leaves the other one dangling.
TINYCHANGE
-rw-r--r-- | lisp/org-clock.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 20bffbf..af0ebaa 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1235,7 +1235,8 @@ the default behavior." (when (equal select '(64)) ;; Set start-time to `org-clock-out-time' (let ((org-clock-continuously t)) - (org-clock-in nil org-clock-out-time))) + (org-clock-in nil org-clock-out-time) + (throw 'abort nil))) (when (equal select '(4)) (setq selected-task (org-clock-select-task "Clock-in on task: ")) |