Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2017-08-07 13:27:39 +02:00
commit 5c1d9c53f0
1 changed files with 11 additions and 11 deletions

View File

@ -1424,11 +1424,13 @@ for a todo state to switch to, overriding the existing value
(defun org-clock-get-sum-start () (defun org-clock-get-sum-start ()
"Return the time from which clock times should be counted. "Return the time from which clock times should be counted.
This is for the currently running clock as it is displayed
in the mode line. This function looks at the properties This is for the currently running clock as it is displayed in the
LAST_REPEAT and in particular CLOCK_MODELINE_TOTAL and the mode line. This function looks at the properties LAST_REPEAT and
corresponding variable `org-clock-mode-line-total' and then in particular CLOCK_MODELINE_TOTAL and the corresponding variable
decides which time to use." `org-clock-mode-line-total' and then decides which time to use.
The time is always returned as UTC."
(let ((cmt (or (org-entry-get nil "CLOCK_MODELINE_TOTAL") (let ((cmt (or (org-entry-get nil "CLOCK_MODELINE_TOTAL")
(symbol-name org-clock-mode-line-total))) (symbol-name org-clock-mode-line-total)))
(lr (org-entry-get nil "LAST_REPEAT"))) (lr (org-entry-get nil "LAST_REPEAT")))
@ -1438,13 +1440,13 @@ decides which time to use."
(current-time)) (current-time))
((equal cmt "today") ((equal cmt "today")
(setq org--msg-extra "showing today's task time.") (setq org--msg-extra "showing today's task time.")
(let* ((dt (decode-time)) (let* ((dt (decode-time nil t))
(hour (nth 2 dt)) (hour (nth 2 dt))
(day (nth 3 dt))) (day (nth 3 dt)))
(if (< hour org-extend-today-until) (setf (nth 3 dt) (1- day))) (if (< hour org-extend-today-until) (setf (nth 3 dt) (1- day)))
(setf (nth 2 dt) org-extend-today-until) (setf (nth 2 dt) org-extend-today-until)
(setq dt (append (list 0 0) (nthcdr 2 dt))) (setq dt (append (list 0 0) (nthcdr 2 dt) '(nil t)))
(apply 'encode-time dt))) (apply #'encode-time dt)))
((or (equal cmt "all") ((or (equal cmt "all")
(and (or (not cmt) (equal cmt "auto")) (and (or (not cmt) (equal cmt "auto"))
(not lr))) (not lr)))
@ -1454,9 +1456,7 @@ decides which time to use."
(and (or (not cmt) (equal cmt "auto")) (and (or (not cmt) (equal cmt "auto"))
lr)) lr))
(setq org--msg-extra "showing task time since last repeat.") (setq org--msg-extra "showing task time since last repeat.")
(if (not lr) (and lr (org-time-string-to-time lr t)))
nil
(org-time-string-to-time lr)))
(t nil)))) (t nil))))
(defun org-clock-find-position (find-unclosed) (defun org-clock-find-position (find-unclosed)