summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-03-06 10:13:12 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-03-06 10:13:12 +0100
commit9449939ca063500ba78438b65c9dde59390b1920 (patch)
treef5050e92c29b23c72ff6954829e986ffb253a0e0
parent74f6ed1eb0a7fffee930c7ddd8a7c7b408a27a9a (diff)
downloadorg-mode-9449939ca063500ba78438b65c9dde59390b1920.tar.gz
org-clock: Fix face for clock overruns
* lisp/org-clock.el (org-clock-get-clock-string): Fix 6655429b8. Reported-by: Luke <mideniko1234-org@yahoo.co.uk> <http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00078.html>
-rw-r--r--lisp/org-clock.el31
1 files changed, 15 insertions, 16 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 2aae043..ff32e28 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -667,22 +667,21 @@ If an effort estimate was defined for the current item, use
01:30/01:50 format (clocked/estimated).
If not, show simply the clocked time like 01:50."
(let ((clocked-time (org-clock-get-clocked-time)))
- (propertize
- (if org-clock-effort
- (let* ((effort-in-minutes (org-duration-to-minutes org-clock-effort))
- (work-done-str
- (propertize (org-duration-from-minutes clocked-time)
- 'face
- (if (and org-clock-task-overrun
- (not org-clock-task-overrun-text))
- 'org-mode-line-clock-overrun
- 'org-mode-line-clock)))
- (effort-str (org-duration-from-minutes effort-in-minutes)))
- (format " [%s/%s] (%s)" work-done-str effort-str org-clock-heading))
- (format " [%s] (%s)"
- (org-duration-from-minutes clocked-time)
- org-clock-heading))
- 'face 'org-mode-line-clock)))
+ (if org-clock-effort
+ (let* ((effort-in-minutes (org-duration-to-minutes org-clock-effort))
+ (work-done-str
+ (propertize (org-duration-from-minutes clocked-time)
+ 'face
+ (if (and org-clock-task-overrun
+ (not org-clock-task-overrun-text))
+ 'org-mode-line-clock-overrun
+ 'org-mode-line-clock)))
+ (effort-str (org-duration-from-minutes effort-in-minutes)))
+ (format (propertize " [%s/%s] (%s)" 'face 'org-mode-line-clock)
+ work-done-str effort-str org-clock-heading))
+ (format (propertize " [%s] (%s)" 'face 'org-mode-line-clock)
+ (org-duration-from-minutes clocked-time)
+ org-clock-heading))))
(defun org-clock-get-last-clock-out-time ()
"Get the last clock-out time for the current subtree."