From 71e97dd9676e61a3339e86f1d85605df0115cc8d Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Tue, 1 Aug 2017 12:16:59 +0200 Subject: [PATCH] [Gnus] Trying to reenable automatic scans for new mail --- gnus | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gnus b/gnus index a48ec43..0396127 100644 --- a/gnus +++ b/gnus @@ -506,6 +506,29 @@ If found, imports the certificate via gpgsm." (setq nntp-connection-timeout nil) + +;;; Daemons + +(defun db/gnus-demon-scan-news-on-level-2 () + "Scan for news in Gnus on level 2." + ;; from https://www.emacswiki.org/emacs/GnusDemon + (let ((win (current-window-configuration)) + (gnus-read-active-file 'some) + (gnus-check-new-newsgroups nil) + (gnus-verbose 2) + (gnus-verbose-backends 5) + (level 2)) + (while-no-input + (unwind-protect + (save-window-excursion + (when (gnus-alive-p) + (with-current-buffer gnus-group-buffer + (gnus-group-get-new-news level)))) + (set-window-configuration win))))) + +(gnus-demon-add-handler 'gnus-demon-close-connections nil 10) +(gnus-demon-add-handler 'db/gnus-demon-scan-news-on-level-2 5 5) + ;;; Agents