summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-01-08 15:24:21 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-01-08 15:24:21 +0100
commitc0a1fb4138115ace4b6f776fa264147f042e99e0 (patch)
tree51a856d18359888386df21d77dcb3afd9928e45d
parent7544f2b6d7f0790dba77f30cf12b6f103bfb80f9 (diff)
parent3566a3eeeec847ba46a89cc1ba6a2195cf423e81 (diff)
downloadorg-mode-c0a1fb4138115ace4b6f776fa264147f042e99e0.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org-clock.el39
1 files changed, 19 insertions, 20 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 3704730..8352f5a 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1932,8 +1932,7 @@ Use `\\[org-clock-remove-overlays]' to remove the subtree times."
(prop (cond ((not arg) :org-clock-minutes-default)
(todayp :org-clock-minutes-today)
(customp :org-clock-minutes-custom)
- (t :org-clock-minutes)))
- time h m p)
+ (t :org-clock-minutes))))
(cond ((not arg) (org-clock-sum-custom
nil org-clock-display-default-range prop))
(todayp (org-clock-sum-today))
@@ -1942,27 +1941,27 @@ Use `\\[org-clock-remove-overlays]' to remove the subtree times."
(unless (equal arg '(64))
(save-excursion
(goto-char (point-min))
- (while (or (and (equal (setq p (point)) (point-min))
- (get-text-property p prop))
- (setq p (next-single-property-change
- (point) prop)))
- (goto-char p)
- (when (setq time (get-text-property p prop))
- (org-clock-put-overlay time)))
- (setq h (/ org-clock-file-total-minutes 60)
- m (- org-clock-file-total-minutes (* 60 h)))
+ (let ((p nil))
+ (while (or (and (equal (setq p (point)) (point-min))
+ (get-text-property p prop))
+ (setq p (next-single-property-change (point) prop)))
+ (goto-char p)
+ (let ((time (get-text-property p prop)))
+ (when time (org-clock-put-overlay time)))))
;; Arrange to remove the overlays upon next change.
(when org-remove-highlights-with-change
(add-hook 'before-change-functions 'org-clock-remove-overlays
- nil 'local))))
- (message (concat (format "Total file time%s: "
- (cond (todayp " for today")
- (customp " (custom)")
- (t "")))
- (org-duration-from-minutes
- org-clock-file-total-minutes)
- " (%d hours and %d minutes)")
- h m)))
+ nil 'local))))
+ (let* ((h (/ org-clock-file-total-minutes 60))
+ (m (- org-clock-file-total-minutes (* 60 h))))
+ (message (concat (format "Total file time%s: "
+ (cond (todayp " for today")
+ (customp " (custom)")
+ (t "")))
+ (org-duration-from-minutes
+ org-clock-file-total-minutes)
+ " (%d hours and %d minutes)")
+ h m))))
(defvar-local org-clock-overlays nil)