From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luke Subject: 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: Sun, 4 Mar 2018 08:01:43 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esHKs-0000ZG-EO for emacs-orgmode@gnu.org; Sat, 03 Mar 2018 19:17:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1esHKp-0001Pl-98 for emacs-orgmode@gnu.org; Sat, 03 Mar 2018 19:17:06 -0500 Received: from [195.159.176.226] (port=34293 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1esHKp-0001Ox-0i for emacs-orgmode@gnu.org; Sat, 03 Mar 2018 19:17:03 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1esH48-00042R-96 for emacs-orgmode@gnu.org; Sun, 04 Mar 2018 00:59:48 +0100 Content-Language: en-US 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 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. Emacs : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-09-21 on lcy01-07, modified by Debian Package: Org mode version 9.1.7 (release_9.1.7-466-ga16590.dirty @ /home/luke/elisp/org-mode/lisp/)