From mboxrd@z Thu Jan 1 00:00:00 1970 From: me@bcc32.com Subject: [PATCH] org-clock.el: Clear org-clock-current-task on clock cancel Date: Sat, 15 Jun 2019 01:20:15 -0400 Message-ID: <20190615052015.8995-1-me@bcc32.com> Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50927) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hc172-0007h9-NG for emacs-orgmode@gnu.org; Sat, 15 Jun 2019 01:20:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hc170-0000L1-OF for emacs-orgmode@gnu.org; Sat, 15 Jun 2019 01:20:24 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:33433) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hc170-0000Fb-KS for emacs-orgmode@gnu.org; Sat, 15 Jun 2019 01:20:22 -0400 Received: by mail-qt1-f195.google.com with SMTP id x2so5037949qtr.0 for ; Fri, 14 Jun 2019 22:20:18 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Cc: "Aaron L. Zeng" From: "Aaron L. Zeng" * 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)