Require org-clock.el where needed.

Also declare org-notify instead of org-show-notification.

This was reported by Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl>
See http://article.gmane.org/gmane.emacs.orgmode/29900
This commit is contained in:
Bastien Guerry 2010-09-07 02:28:06 +02:00
parent 7c73bf1f74
commit 413caacfd7
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,7 @@
(require 'org) (require 'org)
(declare-function org-show-notification "org-clock" (parameters)) (declare-function org-notify "org-clock" (notification &optional play-sound))
(declare-function org-agenda-error "org-agenda" ()) (declare-function org-agenda-error "org-agenda" ())
(defvar org-timer-start-time nil (defvar org-timer-start-time nil
@ -374,6 +374,7 @@ replace any running timer."
(y-or-n-p "Replace current timer? "))) (y-or-n-p "Replace current timer? ")))
(not org-timer-current-timer)) (not org-timer-current-timer))
(progn (progn
(require 'org-clock)
(when org-timer-current-timer (when org-timer-current-timer
(cancel-timer org-timer-current-timer)) (cancel-timer org-timer-current-timer))
(setq org-timer-current-timer (setq org-timer-current-timer