summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-07-12 22:46:46 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-07-13 19:00:55 -0700
commit48885ee51a7fd5df4d9862ee6e09b02bd09f47f5 (patch)
tree936c8cf44afaae837a2ca44c36227e63840188e6
parent13ef0dc9e86d9c64be41b7155a3a573062ac9c80 (diff)
downloaddotfiles-48885ee51a7fd5df4d9862ee6e09b02bd09f47f5.tar.gz
put inbox and annex maildirs on level 7 & space out code
gnus-options-not-subscribe is not sufficient even for putting them on level 6 because it is overridden by gnus-auto-subscribed-groups.
-rw-r--r--.emacs.d/init.el17
1 files changed, 16 insertions, 1 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index f84813b8..b8701ab5 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -217,7 +217,6 @@ windows side-by-side in the frame."
'(gnus-mark-article-hook '(spw/gnus-mark-article-hook))
'(gnus-message-archive-group "sent")
'(gnus-message-archive-method '(nnmaildir "fmail" (directory "~/.fmail/")))
- '(gnus-options-not-subscribe "^nnmaildir\\+fmail:inbox$")
'(gnus-permanently-visible-groups "^nnmaildir\\+fmail:\\(?:notes\\|sent\\)$")
'(gnus-read-newsrc-file nil)
'(gnus-save-killed-list
@@ -2953,11 +2952,27 @@ mutt's review view, after exiting EDITOR."
(and (not (string-prefix-p "Process-Week" group2))
(string< group1 group2)))))
nil)
+
;; Any nnselect groups in the root group at this point must be old
;; searches I've dropped from .gnus.el.
(cl-loop for group in (cdr (assoc "Gnus" gnus-topic-alist #'string=))
when (string-prefix-p "nnselect:" group) do
(gnus-group-jump-to-group group) (gnus-topic-kill-group 1))
+
+ ;; Ensure inbox maildir group is unsubscribed because it will have
+ ;; unread messages whenever any nnselect group does, but we don't want
+ ;; to read any of them by entering it. Do this here instead of
+ ;; modifying `gnus-auto-subscribed-groups' to exclude the inbox
+ ;; because we want to re-unsubscribe in case I subscribed to it since
+ ;; this function last ran.
+ ;;
+ ;; Put inbox and annex maildirs on a level >`gnus-activate-level' such
+ ;; that they are each activated only when entering an nnselect group
+ ;; with messages from that maildir. This speeds up Gnus startup.
+ (gnus-group-set-subscription "nnmaildir+fmail:inbox" 7)
+ (when (gnus-group-entry "nnmaildir+fmail:annex")
+ (gnus-group-set-subscription "nnmaildir+fmail:annex" 7))
+
(gnus-group-list-groups)
(gnus-group-first-unread-group)))))
(with-eval-after-load 'gnus-start