diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-07-06 05:59:52 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-07-11 18:37:32 -0700 |
commit | fcc6ba877104ff97d8630082a714bfa2979ce77f (patch) | |
tree | 6668cb5db15b548b1e52f4db8536531d9984a780 | |
parent | 2261f5f71e4d390826980597838969dbfbf216d3 (diff) | |
download | dotfiles-fcc6ba877104ff97d8630082a714bfa2979ce77f.tar.gz |
add some sorting of the groups buffer
-rw-r--r-- | .emacs.d/init.el | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 30638c4e..da9d0cfc 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -2830,7 +2830,21 @@ mutt's review view, after exiting EDITOR." (nnselect-artlist . nil)))) ;; Finally, minor group buffer setup. (gnus-group-jump-to-group "nnmaildir+fmail:inbox") - (gnus-group-set-subscription-at-point 1 'unsubscribe)))))) + (gnus-group-set-subscription-at-point 1 'unsubscribe) + (gnus-group-sort-groups + (lambda (info1 info2) + (let ((g1 (gnus-group-real-name (gnus-info-group info1))) + (g2 (gnus-group-real-name (gnus-info-group info2)))) + (cl-flet ((browsep (g) (string-prefix-p "Browse-" g)) + (processp (g) (string-prefix-p "Process-" g))) + ;; Ensure we can't move Weekend->Weekday at end of group, and + ;; similarly not from any browse group to a processing group. + (or (string= g1 "Process-Weekday") + (and (string= g1 "Process-Weekend") + (not (string= g2 "Process-Weekday"))) + (and (processp g1) (not (processp g2))) + (and (or (processp g1) (browsep g1)) + (not (or (processp g2) (browsep g2)))))))))))))) (with-eval-after-load 'gnus-start (add-hook 'gnus-started-hook #'spw/sync-notmuch-nnselect-groups)) |