help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Advising appt-mode


From: Richard Lewis
Subject: Advising appt-mode
Date: Fri, 13 Nov 2009 13:19:58 +0000
User-agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Goj┼Ź) APEL/10.7 Emacs/23.1 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi there,

I'm trying to make appt-mode display popup messages on my desktop
(using a small wrapper function for libnotify) by advising the
appt-check function like this:

(defadvice appt-check (after appt-notify)
  (when (and appt-issue-message appt-time-msg-list)
    (when (and (<= min-to-app appt-message-warning-time)
               (>= min-to-app 0))
      (rjl/notify (format "%s <b>in %d minutes</b>" (cadr (car 
appt-time-msg-list)) min-to-app) "Appointment"))))

I've not tried using defadvice before and this attempt isn't
working. It doesn't even work if I remove both the (when) conditions
and leave just the (rjl/notify) call. (BTW, (rjl/notify) works fine in
all other contexts.)

Any ideas?
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard Lewis
ISMS, Computing
Goldsmiths, University of London
JID: address@hidden
http://www.richard-lewis.me.uk/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+-------------------------------------------------------+
|Please avoid sending me Word or PowerPoint attachments.|
|http://www.gnu.org/philosophy/no-word-attachments.html |
+-------------------------------------------------------+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]