From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: Mode line face is not updated when clock overruns [9.1.7 (release_9.1.7-466-ga16590.dirty @ /home/luke/elisp/org-mode/lisp/)] Date: Tue, 06 Mar 2018 10:16:53 +0100 Message-ID: <87po4h36nu.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et8iO-0007yr-7P for emacs-orgmode@gnu.org; Tue, 06 Mar 2018 04:16:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1et8iN-0006wA-Ft for emacs-orgmode@gnu.org; Tue, 06 Mar 2018 04:16:56 -0500 Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:37573) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1et8iN-0006vE-8o for emacs-orgmode@gnu.org; Tue, 06 Mar 2018 04:16:55 -0500 In-Reply-To: (Luke's message of "Sun, 4 Mar 2018 08:01:43 +0800") 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: Luke Cc: emacs-orgmode@gnu.org Hello, Luke writes: > The face of the clocked time does not seem to change when the clock > overruns (typically it changes to a red background). > > I'm no lisp expert, but after digging around in the code it looks like > the problem is in org-clock-get-clock-string(): > > 662 (defun org-clock-get-clock-string () > 663 "Form a clock-string, that will be shown in the mode line. > 664 If an effort estimate was defined for the current item, use > 665 01:30/01:50 format (clocked/estimated). > 666 If not, show simply the clocked time like 01:50." > 667 (let ((clocked-time (org-clock-get-clocked-time))) > 668 (propertize > 669 (if org-clock-effort > > ... > > 683 'face 'org-mode-line-clock))) > > It seems like the call to propertize (on line #668) is overwriting the > face ('org-mode-line-clock-overrun) of the resulting string with > 'org-mode-line-clock. I think this change was introduced in commit > 6655429b8d. Fixed. Thank you. Regards, -- Nicolas Goaziou