summaryrefslogtreecommitdiffhomepage
path: root/custom
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-10-08 16:09:56 +0100
committerjao <jao@gnu.org>2022-10-08 16:09:56 +0100
commit96aaa1e413c763c7c6d0bbf97adc3f0806df01a5 (patch)
tree241d9221fa027259eb24682db702abe2b870383e /custom
parent23e0ce59dd3b52e13bc3358db33f5bf4cc28a921 (diff)
downloadelibs-96aaa1e413c763c7c6d0bbf97adc3f0806df01a5.tar.gz
elibs-96aaa1e413c763c7c6d0bbf97adc3f0806df01a5.tar.bz2
gnus: afio hook
Diffstat (limited to 'custom')
-rw-r--r--custom/jao-custom-gnus.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el
index d0ca3d4..9b82c74 100644
--- a/custom/jao-custom-gnus.el
+++ b/custom/jao-custom-gnus.el
@@ -256,7 +256,8 @@
(expiry-target . delete)
(comment . "feeds.\\1")
(jao-gnus--archiving-group "nnml:feeds.trove"))
- ("nnml:feeds\\.\\(news\\)$" (expiry-wait . 2))
+ ("nnml:feeds\\.\\(news\\|emacs-\\(bugs\\|diffs|\\github\\)\\)$"
+ (expiry-wait . 2))
("nnml:feeds\\.trove"
(auto-expire . nil)
(total-expire . nil))
@@ -691,6 +692,14 @@
(org-gnus-follow-link group id)
(message "Couldn't get relevant info for switching to Gnus."))))
+;;;; afio
+(defun jao-gnus--on-afio-switch ()
+ (when (derived-mode-p 'gnus-group-mode)
+ (let ((no (or (gnus-group-unread (gnus-group-group-name)) 0)))
+ (unless (> no 0) (gnus-group-first-unread-group)))))
+
+(add-hook 'jao-afio-switch-hook #'jao-gnus--on-afio-switch)
+
;;;; gnus-icalendar
(require 'ol-gnus)
(use-package gnus-icalendar