Use the correct keybinding for org-timer-set-timer.

Also use the new variable `org-timer-last-timer' to fix a bug
in `org-timer-show-remaining-time' about not pick up the right
timer.
This commit is contained in:
Bastien Guerry 2009-07-27 04:12:31 +08:00
parent 7cdff7b1eb
commit d8a0f2949d
3 changed files with 7 additions and 5 deletions

View File

@ -1,5 +1,7 @@
2009-07-26 Bastien Guerry <bzg@altern.org>
* org-timer.el (org-timer-last-timer): New variable.
* org-agenda.el (org-agenda-mode-map): New key for
org-timer-set-timer called from the agenda.

View File

@ -256,6 +256,7 @@ VALUE can be `on', `off', or `pause'."
(defvar org-timer-timer1 nil)
(defvar org-timer-timer2 nil)
(defvar org-timer-timer3 nil)
(defvar org-timer-last-timer nil)
(defun org-timer-reset-timers ()
"Reset all timers."
@ -278,9 +279,7 @@ VALUE can be `on', `off', or `pause'."
(not org-timer-timer3))
(message "No timer set")
(let* ((rtime (decode-time
(time-subtract (timer--time (or org-timer-timer3
org-timer-timer2
org-timer-timer1))
(time-subtract (timer--time org-timer-last-timer)
(current-time))))
(rsecs (nth 0 rtime))
(rmins (nth 1 rtime)))
@ -315,7 +314,8 @@ VALUE can be `on', `off', or `pause'."
(setq timer-set t
timer
(run-with-timer secs nil 'org-show-notification
(format "%s: time out" hl)))))
(format "%s: time out" hl))
org-timer-last-timer timer)))
'(org-timer-timer1
org-timer-timer2
org-timer-timer3)))))

View File

@ -13998,7 +13998,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
(org-defkey org-mode-map "\C-c\C-xp" 'org-set-property)
(org-defkey org-mode-map "\C-c\C-xo" 'org-toggle-ordered-property)
(org-defkey org-mode-map "\C-c\C-xi" 'org-insert-columns-dblock)
(org-defkey org-mode-map [(control ?c) (control ?x) (control ?\;)] 'org-timer-set-timer)
(org-defkey org-mode-map [(control ?c) (control ?x) ?\;] 'org-timer-set-timer)
(org-defkey org-mode-map "\C-c\C-x." 'org-timer)
(org-defkey org-mode-map "\C-c\C-x-" 'org-timer-item)