0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 22:07:49 +00:00

org-clock: Clear org-clock-current-task on clock cancel

* org-mode/lisp/org-clock.el (org-clock-cancel): Clear
`org-clock-current-task' when a clock is canceled.

This variable is used by some mode line packages (e.g.,
spaceline-all-the-icons), so not clearing the variable incorrectly
displays the previous task as ongoing.
This commit is contained in:
Aaron L. Zeng 2019-06-15 01:20:15 -04:00 committed by Nicolas Goaziou
parent 439782ae00
commit 1b74ae0ba3

View file

@ -1741,6 +1741,7 @@ Optional argument N tells to change by that many units."
(sit-for 2)))
(move-marker org-clock-marker nil)
(move-marker org-clock-hd-marker nil)
(setq org-clock-current-task nil)
(setq global-mode-string
(delq 'org-mode-line-string global-mode-string))
(org-clock-restore-frame-title-format)