From: Urban Engberg <ue@cci.dk>
Subject: Hooking on to new messages
Date: 25 Nov 1997 09:16:34 +0100 [thread overview]
Message-ID: <n7afetl76l.fsf@cci.dk> (raw)
I am trying to make Gnus notify me whenever there is new mail, but
only when it's personal. I don't want to use procmail, so I use Gnus'
mail-splitting (nnmail-split-fancy) and add a mail scanning daemon
like this:
(gnus-demon-add-handler 'gnus-demon-scan-mail 1 nil)
Now, to detect when there is some interesting mail, I have tried
(add-hook 'nnml-prepare-save-mail-hook 'ue-gnus-article-notify)
(or alternatively nnmail-prepare-save-mail-hook).
ue-gnus-article-notify should thus get called on each new message, and
may for instance look for the new X-ref header and produce some sort
of notification when I want it to.
The strange thing is that this seems to work most of the time -- when
I am actively working inside Emacs, that is. When I leave Emacs for
some time, I can see that gnus-demon-scan-mail gets called as it
should every minute, but ue-gnus-article-notify is never being
called. I've tried to debug, but without success (as I said, when I
am working in Emacs, it seems to work). Am I using the right hook?
Some better way to do this?
Urban
--
ue * 105
next reply other threads:[~1997-11-25 8:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-11-25 8:16 Urban Engberg [this message]
1997-11-25 13:45 ` Urban Engberg
1997-11-25 19:07 ` Lars Magne Ingebrigtsen
1997-11-26 9:05 ` Urban Engberg
1997-11-26 9:31 ` Lars Magne Ingebrigtsen
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=n7afetl76l.fsf@cci.dk \
--to=ue@cci.dk \
/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).