[Gnus] Trying to reenable automatic scans for new mail
This commit is contained in:
parent
217dce1e20
commit
71e97dd967
23
gnus
23
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue