all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Advising appt-mode
@ 2009-11-13 13:19 Richard Lewis
  2009-11-15 19:06 ` Michael Heerdegen
  2009-11-17  4:51 ` Glenn Morris
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Lewis @ 2009-11-13 13:19 UTC (permalink / raw)
  To: help-gnu-emacs

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: ironchicken@jabber.earth.li
http://www.richard-lewis.me.uk/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+-------------------------------------------------------+
|Please avoid sending me Word or PowerPoint attachments.|
|http://www.gnu.org/philosophy/no-word-attachments.html |
+-------------------------------------------------------+



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-11-18 12:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13 13:19 Advising appt-mode Richard Lewis
2009-11-15 19:06 ` Michael Heerdegen
2009-11-17  4:51 ` Glenn Morris
2009-11-17  6:08   ` Richard Riley
     [not found]   ` <mailman.10870.1258438170.2239.help-gnu-emacs@gnu.org>
2009-11-17 10:18     ` Fabrice Niessen
2009-11-18 12:27   ` Richard Lewis

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.