From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/1008 Path: news.gmane.org!not-for-mail From: Nevin Kapur Newsgroups: gmane.emacs.gnus.user Subject: Re: mail delivery notification (using color) -- a solution found Date: Thu, 29 Aug 2002 21:38:53 -0400 Organization: Mathematical Sciences, The Johns Hopkins University Message-ID: References: <8z2p64co.fsf@random.localnet.UnwiredUniverse.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138667856 9343 80.91.229.2 (31 Jan 2006 00:37:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:37:36 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:28:29 2006 Original-Path: quimby.gnus.org!news.ccs.neu.edu!news.dfci.harvard.edu!news.cis.ohio-state.edu!news.ems.psu.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!fermat.mts.jhu.EDU!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: fermat.mts.jhu.edu (128.220.17.18) Original-X-Trace: fu-berlin.de 1030671533 53439476 128.220.17.18 (16 [77476]) X-Face: #i!d%y+1tilG}1ua9z&9waMLqE>H+;pUwWFetZe]4uWiv;VE:GHLnT1\Gj]>l^(]R#}sD@E"(@?vMv,yb@`?32;i~D$6x6m*%!3gPyp-rb$}.%QpxZ!3Y+jESN5[s7SL_68Sc`Aek)A$M|h++b/2VjR.k+Tw4X+0a%:K-kcUeMZ(rs?}v\eG({5J&IPS Mail-Copies-To: never User-Agent: Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Informed Management, i686-pc-linux) Cancel-Lock: sha1:RnzuQ8KFwMErYax3Aipb2MXL4yE= Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:1148 Original-Lines: 35 X-Gnus-Article-Number: 1148 Tue Jan 17 17:28:29 2006 Xref: news.gmane.org gmane.emacs.gnus.user:1008 Archived-At: 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