* checking for new mail with a directory source...
@ 2001-11-11 0:27 Josh Huber
0 siblings, 0 replies; only message in thread
From: Josh Huber @ 2001-11-11 0:27 UTC (permalink / 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-11-11 0:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-11 0:27 checking for new mail with a directory source Josh Huber
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).