Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Re: mail delivery notification (using color) -- a solution found
       [not found]   ` <8z2p64co.fsf@random.localnet.UnwiredUniverse.com>
@ 2002-08-30  1:38     ` Nevin Kapur
  0 siblings, 0 replies; only message in thread
From: Nevin Kapur @ 2002-08-30  1:38 UTC (permalink / raw)


Derrell.Lipman@UnwiredUniverse.com writes:


[...]

> This is wicked cool!  Now, how do I modify it so that it only notifies me of
> new mail with a color change if mail has been added to certain groups?  I
> split spam and unimportant stuff to various groups.  I don't need to be
> interrupted with the color change just to tell me that I have new spam.
> Anyone able to help me with this?

Here is some code-snippet that I use.  It plays a should when I get
mail in certain folders.  You can easily modify it so that it changes
color instead of playing a sound.

(defvar nk-gnus-beepable-groups "mail/Mailbox"
  "A regexp that matches groups for which mail notification should \
take place.")

(defun nk-gnus-notify ()
  "Beep if we got mail in an interesting folder."
  (let ((you-got-mail nil)
	(case-fold-search t))
    (dolist (group nnmail-split-history)
      (when (string-match nk-gnus-beepable-groups (caar group))
	  (setq you-got-mail t)))
    (when you-got-mail 
      (progn (call-process "esdplay" nil 0 nil "/usr/share/sounds/phone.wav")
	     (ding)))))

(add-hook 'gnus-after-getting-new-news-hook 'nk-gnus-notify)



-Nevin


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-08-30  1:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <m2ptw3icew.fsf@boiko_linux.demogr.mpg.de>
     [not found] ` <m23csy2e3e.fsf@boiko_linux.demogr.mpg.de>
     [not found]   ` <8z2p64co.fsf@random.localnet.UnwiredUniverse.com>
2002-08-30  1:38     ` mail delivery notification (using color) -- a solution found Nevin Kapur

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 NNTP newsgroup(s).