[mew-int 02107] Re: A few questions

Otto Diesenbacher diesenbacher at example.com
Tue Jan 24 19:42:34 JST 2006


Ken Deeter <ken at example.com> writes:

> * Could a hook be added for when mew-biff stuff detects new messages?
>   I'd like to plug it in to other notification mechanisms.

you could - f.e. to play a special sound , when new mail arrives - put
in your .emacs:

,----
|   (setq mew-arrivedmail-pending 0)
|   (defadvice mew-biff-bark (before mew-biff-sound (arg))
|     "Play a sound, if new Mail arrives"
|     (cond ((and (> arg 0) (> arg mew-arrivedmail-pending))
| 	   (setq mew-arrivedmail-pending arg)
| 	   (start-process-shell-command    "mail-sound"   "*Messages*"
|                                         "sndplay ~/.elisp/mail.wav"))
|                     ;; replace sndplay with your favorite command to
|                     ;; play a sound-file
| 	  ((= arg 0)
| 	   (if (> mew-arrivedmail-pending 0)
| 	       (setq mew-arrivedmail-pending 0)))))
|   (ad-activate 'mew-biff-bark)
`----

DISCLAIMER: I  am a Lisp-Newbie -  better ideas to  implement that are
welcome :)

lg
        okflo


-- 

Otto Diesenbacher                     mailto:diesenbacher at example.com
Salzburg, Austria                     http://okflo.homelinux.net/




More information about the Mew-int mailing list