"Qing Xiu" <[EMAIL PROTECTED]> writes: > How can I set up Emacs to make itself check for new news every, say, > 5 minutes?
;; 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) _______________________________________________ info-gnus-english mailing list info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english