* Re: [PATCH] org-notify - treat notification as a variable not a function
2009-08-26 19:35 ` [PATCH] org-notify - treat notification as a variable not a function Bernt Hansen
@ 2009-08-26 3:29 ` Bastien
0 siblings, 0 replies; 3+ messages in thread
From: Bastien @ 2009-08-26 3:29 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode
Bernt Hansen <bernt@norang.ca> writes:
> notification is passed to org-show-notification and should not be
> invoked as a function.
Applied, thanks! (and sorry for the silly mistake.)
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
* Clock in error - (void-function notification)
@ 2009-08-26 18:51 Bernt Hansen
2009-08-26 19:35 ` [PATCH] org-notify - treat notification as a variable not a function Bernt Hansen
0 siblings, 1 reply; 3+ messages in thread
From: Bernt Hansen @ 2009-08-26 18:51 UTC (permalink / raw)
To: Bastien Guerry, Carsten Dominik; +Cc: emacs-orgmode
Hi,
The following commit breaks notification for me:
754694d (Use org-notify to show a notification and possibly play a sound., 2009-08-24)
I'm trying to clock in a task that has exceeded its estimated time. I
have a sound set up for notification and that is no longer working. I
get the following error and backtrace instead.
-Bernt
----8<----
Debugger entered--Lisp error: (void-function notification)
(notification)
(org-show-notification (notification))
org-notify(#("Task 'Weekly Review [1/8]' should be finished by now. (1:00)" 0 6 nil 6 25 (:org-clock-minutes 331 org-category "norang" fontified nil face nil) 25 60 nil) t)
(if org-clock-notification-was-shown nil (setq org-clock-notification-was-shown t) (org-notify (format "Task '%s' should be finished by now. (%s)" org-clock-heading org-clock-effort) t))
(unless org-clock-notification-was-shown (setq org-clock-notification-was-shown t) (org-notify (format "Task '%s' should be finished by now. (%s)" org-clock-heading org-clock-effort) t))
(if (>= clocked-time effort-in-minutes) (unless org-clock-notification-was-shown (setq org-clock-notification-was-shown t) (org-notify ... t)) (setq org-clock-notification-was-shown nil))
(let ((effort-in-minutes ...) (clocked-time ...)) (if (>= clocked-time effort-in-minutes) (unless org-clock-notification-was-shown ... ...) (setq org-clock-notification-was-shown nil)))
(progn (let (... ...) (if ... ... ...)))
(if (marker-buffer org-clock-marker) (progn (let ... ...)))
(when (marker-buffer org-clock-marker) (let (... ...) (if ... ... ...)))
org-clock-notify-once-if-expired()
(if org-clock-effort (org-clock-notify-once-if-expired))
org-clock-update-mode-line()
(save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (or interrupting (move-marker org-clock-interrupted-task nil)) (org-clock-history-push) (cond (... ... ...) (... ...)) (setq org-clock-heading-for-remember (and ... ... ...)) (setq org-clock-heading (cond ... ... ...)) (setq org-clock-heading (org-propertize org-clock-heading ... nil)) (org-clock-find-position org-clock-in-resume) (cond (... ... ... ... ... ... ...) (... ... ... ... ...) (t ... ... ... ... ... ... ... ... ...)) (move-marker org-clock-marker (point) (buffer-base-buffer)) (move-marker org-clock-hd-marker (save-excursion ... ...) (buffer-base-buffer)) (or global-mode-string (setq global-mode-string ...)) (or (memq ... global-mode-string) (setq global-mode-string ...)) (org-clock-update-mode-line) (setq
org-clock-mode-line-timer (run-with-timer 60 60 ...)) (message "Clock starts at %s - %s" ts msg-extra) (run-hooks (quote org-clock-in-hook)))
(save-excursion (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) (or interrupting ...) (org-clock-history-push) (cond ... ...) (setq org-clock-heading-for-remember ...) (setq org-clock-heading ...) (setq org-clock-heading ...) (org-clock-find-position org-clock-in-resume) (cond ... ... ...) (move-marker org-clock-marker ... ...) (move-marker org-clock-hd-marker ... ...) (or global-mode-string ...) (or ... ...) (org-clock-update-mode-line) (setq org-clock-mode-line-timer ...) (message "Clock starts at %s - %s" ts msg-extra) (run-hooks ...)))
(save-excursion (when (and selected-task ...) (set-buffer ...) (setq target-pos ...) (move-marker selected-task nil)) (save-excursion (save-restriction ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)))
(let ((interrupting ...) ts selected-task target-pos (msg-extra "")) (when (equal select ...) (setq selected-task ...) (if selected-task ... ...)) (when interrupting (move-marker org-clock-interrupted-task ... ...) (org-clock-out t)) (when (equal select ...) (org-clock-mark-default-task)) (setq target-pos (point)) (run-hooks (quote org-clock-in-prepare-hook)) (save-excursion (when ... ... ... ...) (save-excursion ...)))
(catch (quote abort) (let (... ts selected-task target-pos ...) (when ... ... ...) (when interrupting ... ...) (when ... ...) (setq target-pos ...) (run-hooks ...) (save-excursion ... ...)))
org-clock-in(nil)
(save-current-buffer (set-buffer (marker-buffer marker)) (widen) (goto-char pos) (org-show-context (quote agenda)) (org-show-entry) (org-cycle-hide-drawers (quote children)) (org-clock-in arg) (setq newhead (org-get-heading)))
(with-current-buffer (marker-buffer marker) (widen) (goto-char pos) (org-show-context (quote agenda)) (org-show-entry) (org-cycle-hide-drawers (quote children)) (org-clock-in arg) (setq newhead (org-get-heading)))
(let ((_cline ...) (_cmd this-command) (_buf1 ...) (_buf2 ...) (_undo1 buffer-undo-list) (_undo2 ...) _c1 _c2) (with-current-buffer (marker-buffer marker) (widen) (goto-char pos) (org-show-context ...) (org-show-entry) (org-cycle-hide-drawers ...) (org-clock-in arg) (setq newhead ...)) (org-agenda-change-all-lines newhead hdmarker) (when org-agenda-allow-remote-undo (setq _c1 ... _c2 ...) (when ... ... ... ...)))
(org-with-remote-undo (marker-buffer marker) (with-current-buffer (marker-buffer marker) (widen) (goto-char pos) (org-show-context ...) (org-show-entry) (org-cycle-hide-drawers ...) (org-clock-in arg) (setq newhead ...)) (org-agenda-change-all-lines newhead hdmarker))
(let* ((marker ...) (hdmarker ...) (pos ...) newhead) (org-with-remote-undo (marker-buffer marker) (with-current-buffer ... ... ... ... ... ... ... ...) (org-agenda-change-all-lines newhead hdmarker)))
(if (equal arg (quote ...)) (org-clock-in arg) (let* (... ... ... newhead) (org-with-remote-undo ... ... ...)))
org-agenda-clock-in(nil)
call-interactively(org-agenda-clock-in)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] org-notify - treat notification as a variable not a function
2009-08-26 18:51 Clock in error - (void-function notification) Bernt Hansen
@ 2009-08-26 19:35 ` Bernt Hansen
2009-08-26 3:29 ` Bastien
0 siblings, 1 reply; 3+ messages in thread
From: Bernt Hansen @ 2009-08-26 19:35 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Bernt Hansen
notification is passed to org-show-notification and should not be
invoked as a function.
---
This patch is available at git://git.norang.ca/org-mode for-carsten
lisp/org-clock.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 90f780a..2cc9376 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -446,7 +446,7 @@ Notification is shown only once."
(defun org-notify (notification &optional play-sound)
"Send a NOTIFICATION and maybe PLAY-SOUND."
- (org-show-notification (notification))
+ (org-show-notification notification)
(if play-sound (org-clock-play-sound)))
(defun org-show-notification (notification)
--
1.6.4.1.331.gda1d56
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-26 21:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-26 18:51 Clock in error - (void-function notification) Bernt Hansen
2009-08-26 19:35 ` [PATCH] org-notify - treat notification as a variable not a function Bernt Hansen
2009-08-26 3:29 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).