From: Karl Kleinpaste <karl@charcoal.com>
Subject: Re: batch email reading?
Date: Tue, 16 May 2006 09:43:19 -0400 [thread overview]
Message-ID: <vxkpsiedr0o.fsf@mesquite.charcoal.com> (raw)
In-Reply-To: <1147782145.394634.8030@v46g2000cwv.googlegroups.com>
"jacques.wainer@gmail.com" <jacques.wainer@gmail.com> writes:
> Anyone has a batch email reading function for gnus?
Assuming your Gnus is left running overnight, then the gnus-daemon
functions will do what you want.
;; automatic group re-scan without manual effort.
;; assumes: mail groups, level <= 2; nntp groups, level >= 3.
;; look up arg interpretation for gnus-demon-add-handler.
;; overall meaning: check mail every 5 regardless, and
;; check nntp every 20 iff idle for 20.
;;
;; level-specified group scanner.
(defun gnus-demon-scan-mail-or-news-and-update (level)
"Scan for new mail, updating the *Group* buffer."
(let ((win (current-window-configuration)))
(unwind-protect
(save-window-excursion
(save-excursion
(when (gnus-alive-p)
(save-excursion
(set-buffer gnus-group-buffer)
(gnus-group-get-new-news level)))))
(set-window-configuration win))))
;;
;; level 2: only mail groups are scanned.
(defun gnus-demon-scan-mail-and-update ()
"Scan for new mail, updating the *Group* buffer."
(gnus-demon-scan-mail-or-news-and-update 2))
(gnus-demon-add-handler 'gnus-demon-scan-mail-and-update 5 nil)
;;
;; level 3: mail and local news groups are scanned.
(defun gnus-demon-scan-news-and-update ()
"Scan for new mail, updating the *Group* buffer."
(gnus-demon-scan-mail-or-news-and-update 3))
(gnus-demon-add-handler 'gnus-demon-scan-news-and-update 20 20)
prev parent reply other threads:[~2006-05-16 13:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-16 12:22 jacques.wainer
2006-05-16 12:41 ` Katsumi Yamaoka
2006-05-16 13:43 ` Karl Kleinpaste [this message]
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=vxkpsiedr0o.fsf@mesquite.charcoal.com \
--to=karl@charcoal.com \
--cc=karl+usenet@charcoal.com \
/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).