[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scan-mail daemon
From: |
Andrew A. Raines |
Subject: |
Re: Scan-mail daemon |
Date: |
Tue, 18 Jan 2005 22:01:45 -0600 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
> "Andrew A. Raines" <aaraines@pobox.com> writes:
>
>> Maybe you mean one of these instead of gnus-demon-scan-mail?
>>
>> ,----[ C-h f gnus-demon-scan-mail-and-update RET ]
>> | gnus-demon-scan-mail-and-update is a Lisp function in `~/.gnus'.
> ^
> Note ----------------------------------------------------------´
Oh yeah! I forgot I copied those from somewhere a long time
ago. I don't use them anymore.
David, here is that setup. It makes Gnus check for mail
every 5 minutes and news every 30.
;; automatic mail scan without manual effort.
;;
;; 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 t)
;;
;; 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 30 t)
--
aaraines@pobox.com (Andrew A. Raines)