From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/2686 Path: news.gmane.org!not-for-mail From: calmar Newsgroups: gmane.emacs.gnus.user Subject: notify after automatic mail recieving Date: Thu, 26 Jun 2003 00:31:54 +0200 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138669024 15999 80.91.229.2 (31 Jan 2006 00:57:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:57:04 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:31:04 2006 Original-Newsgroups: gnu.emacs.gnus X-MyHomePage: http://www.calmar.ws User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, windows-nt) Hamster/1.3.23.4 windows-nt) Cancel-Lock: sha1:GwEehtssiuqSHi8tlPvPF/xt9wI= Original-NNTP-Posting-Host: 80.218.222.4 Original-X-Trace: news.swissonline.ch 1056580165 80.218.222.4 (26 Jun 2003 00:29:25 +0200) Original-X-Complaints-To: abuse@swissonline.ch Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!nsc.no!nextra.com!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!news100.image.dk!fi.sn.net!newsfeed2.fi.sn.net!newsfeed3.funet.fi!newsfeeds.funet.fi!irazu.switch.ch!news-zh.switch.ch!switch.ch!news.swissonline.ch!not-for-mail Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:2826 Original-Lines: 48 X-Gnus-Article-Number: 2826 Tue Jan 17 17:31:04 2006 Xref: news.gmane.org gmane.emacs.gnus.user:2686 Archived-At: calmar wrote: > > What I would like is when gnus can notify me when new mails > arrived. > p.e with a pop-up windows, or just an external program which > might play a nice sound or however. > Obviously this could be a solution: ,---- | (defun gnus-notify-if-new-news-arrived() | "are there new unread mails in `the' Group?" | (if (nnmail-new-mail-p (gnus-group-real-name "INBOX")) | (call-process "your-notify-program"))) ; | | (defun my-gnus-get-new-mail () | "Fetch new mails at group-level x only." | (when (gnus-alive-p) | (let ((gnus-verbose-backends 1) | (gnus-verbose 1) | (win (current-window-configuration))) | (unwind-protect | (save-window-excursion | (save-excursion | (set-buffer gnus-group-buffer) | (gnus-group-get-new-news 3) ; x ->group-level | (gnus-notify-if-new-news-arrived))) ; <<<<<<<<<<<<<<< | (set-window-configuration win))))) | | (gnus-demon-add-handler 'my-gnus-get-new-mail 7 nil) ;time | (gnus-demon-init) `---- the nnmail-new-mail-p seems to work AFAI was able to see so far. I have also the idea of renaming the title of the (x)emacs main-window, which will be visible when the program is minimized in the taskbar I think (instead of `your-notify-program'). Title with the number of unread messages. Greetings calmar