From 96aaa1e413c763c7c6d0bbf97adc3f0806df01a5 Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 8 Oct 2022 16:09:56 +0100 Subject: gnus: afio hook --- custom/jao-custom-gnus.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'custom/jao-custom-gnus.el') 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 -- cgit v1.2.3