info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run a function when new mail arrives


From: Tassilo Horn
Subject: Re: Run a function when new mail arrives
Date: Thu, 18 Jan 2007 20:54:13 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.92 (gnu/linux)

Ted Zlatanov <tzz@lifelogs.com> writes:

Hi Ted,

>>> I use Gnus with an IMAP account and let gnus demon check for new
>>> mail every 5 minutes of emacs idle time.
>>>
>>> Now I'd like to run a function whenever new mail arrives.
>
> You could run something in the nn*-split-fancy list, and always return
> nil (so it will not actually affect the splitting).

I tried this:

,----[ ~/.gnus.el ]
| (defun th-new-imap-mail ()
|   (shell-command (concat "append-to-dwm-statusbar.fish "
|                          "Gnus: New mail!"))
|   nil)
| 
| (setq nnimap-split-rule 'nnimap-split-fancy
|       nnimap-split-fancy '(: th-new-imap-mail))
`----

But the function `th-new-imap-mail' is never run.

Any ideas?

Bye,
Tassilo
-- 
The glass is neither half-full nor half-empty: it's twice as big as it
needs to be.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]