Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: calmar <mac@calmar.ws>
Subject: notify after automatic mail recieving
Date: Wed, 25 Jun 2003 10:47:41 +0200	[thread overview]
Message-ID: <llvqa6he.fsf@calmar.ws> (raw)

Hi,
based on a previous threat I stole this function:
,----
| (defun my-gnus-get-new-mail ()
|   "Fetch new mails at 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 4)))
| 	(set-window-configuration win)))))
`----

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, as far as I was able to
understand, gnus-group-get-new-news does not really have a return
value which I could exploit.

But obvioudly this function has a hook:
gnus-after-getting-new-news-hook
(I assume this is executed everytime after trying to get new
news, or only when there really came-in new news?)

So when there is a function which can check a group for new
news/mails, probably I should be able to write this hook myself.

Probably something like this: 
(if  (gnus-check-if-unread-messages-in-group)  
       (call-process  "whatever"))
; or pop up (x)emacs own pop-up messagewindow/sound


Does anybody know the name of this ((fantasy-name):
`gnus-check-if-unread-messages-in-group') function if it exists?

Many Thanks
-- 
calmar (o_         
       //\   <--- GNU/Linux is GREAT     
       V_/_       www.calmar.ws 


             reply	other threads:[~2003-06-25  8:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-25  8:47 calmar [this message]
2003-06-25 22:31 calmar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=llvqa6he.fsf@calmar.ws \
    --to=mac@calmar.ws \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).