From: Josh Huber <huber@alum.wpi.edu>
Subject: checking for new mail with a directory source...
Date: Sat, 10 Nov 2001 19:27:27 -0500 [thread overview]
Message-ID: <874ro2tamo.fsf@mclinux.com> (raw)
Well, I've finally come up with a solution for polling a directory
source for new mail. I noticed that the messages were actually read
with gnus-read-active-file, and not gnus-get-unread-articles, and
gnus-read-active-file is not called when a level is specified. Even
if it were, there seems to be not way to specify to
gnus-read-active-file to only check the primary server. You can tell
it to skip the primary server, and only check for secondary sources
however.
So, here's my hack...
;; Gnus demon setup
(defun jmh-check-mail ()
"Check for new mail only at level 1 (inboxes ONLY)."
(interactive "P")
(let ((gnus-inhibit-demon t)
;; Binding this variable will inhibit multiple fetchings
;; of the same mail source.
(nnmail-fetched-sources (list t))
;; wow, this seems like a hack, but it makes sure
;; gnus-read-active-file doesn't check nntp servers.
(gnus-secondary-select-methods nil))
(gnus-read-active-file)
(gnus-get-unread-articles 1)
(gnus-message 7 "Finished checking for new mail")))
(add-hook 'gnus-startup-hook
'(lambda ()
(gnus-demon-add-handler 'jmh-check-mail 2 t)))
Should we make a way for gnus-read-active-file to only check the
primary server, and have a way for gnus-group-get-new-news to use that
new functionality?
Basically I just want to scan my directory sources (into (nnml "")),
and update the level 1 group article count.
ttyl,
--
Josh Huber
reply other threads:[~2001-11-11 0:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=874ro2tamo.fsf@mclinux.com \
--to=huber@alum.wpi.edu \
/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).