0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-15 10:46:26 +00:00

Fix to idle-time notice in the minibuffer

This commit is contained in:
John Wiegley 2009-11-05 02:07:06 -05:00
parent e946c7d239
commit cec499dc6f
2 changed files with 13 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2009-11-05 John Wiegley <jwiegley@gmail.com>
* org-clock.el (org-resolve-clocks-if-idle): Another fix to the
way the amount of idle time is presented in the minibuffer.
2009-11-05 Carsten Dominik <carsten.dominik@gmail.com> 2009-11-05 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-refile): Refile to clock only if the prefix arg is * org.el (org-refile): Refile to clock only if the prefix arg is

View file

@ -796,8 +796,10 @@ if the user really wants to stay clocked in after being idle for
so long." so long."
(when (and org-clock-idle-time (not org-clock-resolving-clocks) (when (and org-clock-idle-time (not org-clock-resolving-clocks)
org-clock-marker) org-clock-marker)
(let ((org-clock-user-idle-start (current-time)) (let ((org-clock-user-idle-seconds (org-user-idle-seconds))
(org-clock-user-idle-seconds (org-user-idle-seconds)) (org-clock-user-idle-start
(time-subtract (current-time)
(seconds-to-time org-clock-user-idle-seconds)))
(org-clock-resolving-clocks-due-to-idleness t)) (org-clock-resolving-clocks-due-to-idleness t))
(if (> org-clock-user-idle-seconds (* 60 org-clock-idle-time)) (if (> org-clock-user-idle-seconds (* 60 org-clock-idle-time))
(org-clock-resolve (org-clock-resolve
@ -805,12 +807,12 @@ so long."
org-clock-start-time) org-clock-start-time)
(function (function
(lambda (clock) (lambda (clock)
(format "Clocked in & idle for %d mins" (format "Clocked in & idle for %.1f mins"
(/ (org-float-time (/ (org-float-time
(time-subtract (current-time) (time-subtract (current-time)
org-clock-user-idle-start)) 60)))) org-clock-user-idle-start))
(time-subtract (current-time) 60.0))))
(seconds-to-time org-clock-user-idle-seconds))))))) org-clock-user-idle-start)))))
(defun org-clock-in (&optional select) (defun org-clock-in (&optional select)
"Start the clock on the current item. "Start the clock on the current item.