diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-08-07 17:00:48 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-08-07 17:05:53 -0700 |
commit | 6e3830d21a2cea48e3fa8caaddcab63d68daab38 (patch) | |
tree | 4b7a4a4cca61f91d17ac939b1241b9e620840e9e | |
parent | c6869fb034ca5e513c5598c8f2e556dcdafd6304 (diff) | |
download | dotfiles-6e3830d21a2cea48e3fa8caaddcab63d68daab38.tar.gz |
work around Emacs bug#56592 by advising gnus-summary-read-group
-rw-r--r-- | .emacs.d/init.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 68a9c99d..00edbb7f 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -3025,12 +3025,14 @@ mutt's review view, after exiting EDITOR." (gnus-activate-group "nnmaildir+fmail:inbox" 'scan))) (advice-add 'gnus-request-group-scan :before #'spw/gnus-request-group-scan) -;; This, plus `gnus-suppress-duplicates' t, works around Emacs bug#56592 -;; (though want duplicate suppression turned on independently of that). -(defun spw/update-notmuch () - (call-process "notmuch" nil nil nil "new" "--no-hooks")) -(with-eval-after-load 'gnus-sum - (add-hook 'gnus-summary-exit-hook #'spw/update-notmuch)) +;; This works around Emacs bug#56592 without relying on duplicate suppression. +(defun spw/gnus-summary-read-group (group &rest _ignore) + (when (string-prefix-p "nnselect:" group) + (with-current-buffer gnus-group-buffer + (save-excursion + (gnus-group-goto-group group) + (gnus-group-get-new-news-this-group 1))))) +(advice-add 'gnus-summary-read-group :before #'spw/gnus-summary-read-group) (defun spw/gnus-group-nnselect-query (group) (when-let ((specs (gnus-group-get-parameter group 'nnselect-specs t))) |