emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-clock.el: Clear org-clock-current-task on clock cancel
@ 2019-06-15  5:20 me
  2019-06-15  9:56 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: me @ 2019-06-15  5:20 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Aaron L. Zeng

From: "Aaron L. Zeng" <me@bcc32.com>

* 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.
---
 lisp/org-clock.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 12b412f7b..3d8e1136a 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -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)
-- 
2.20.1 (Apple Git-117)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] org-clock.el: Clear org-clock-current-task on clock cancel
  2019-06-15  5:20 [PATCH] org-clock.el: Clear org-clock-current-task on clock cancel me
@ 2019-06-15  9:56 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2019-06-15  9:56 UTC (permalink / raw)
  To: me; +Cc: emacs-orgmode

Hello,

me@bcc32.com writes:

> From: "Aaron L. Zeng" <me@bcc32.com>
>
> * 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.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-15  9:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-15  5:20 [PATCH] org-clock.el: Clear org-clock-current-task on clock cancel me
2019-06-15  9:56 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).