From 9914c187c3b5ff1dcabfd15a4588e7dbb676231d Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 2 Dec 2014 23:35:49 -0500 Subject: [PATCH 3/4] org-timer.el: Reset properly after countdown timer * lisp/org-timer.el (org-timer-set-timer): Reset org-timer-start-time after countdown completes. * lisp/org-timer.el (org-timer-cancel-timer): Reset org-timer-start-time when canceling countdown timer. --- lisp/org-timer.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/org-timer.el b/lisp/org-timer.el index 1c4153c..6cecd7e 100644 --- a/lisp/org-timer.el +++ b/lisp/org-timer.el @@ -359,6 +359,7 @@ (defun org-timer-cancel-timer () (run-hooks 'org-timer-cancel-hook) (cancel-timer org-timer-current-timer) (setq org-timer-current-timer nil + org-timer-start-time nil org-timer-timer-is-countdown nil) (org-timer-set-mode-line 'off) (message "Last timer canceled"))) @@ -446,6 +447,7 @@ (defun org-timer-set-timer (&optional opt) (run-with-timer secs nil `(lambda () (setq org-timer-current-timer nil) + (setq org-timer-start-time nil) (org-notify ,(format "%s: time out" hl) ,org-clock-sound) (setq org-timer-timer-is-countdown nil) (org-timer-set-mode-line 'off) -- 2.1.3