diff options
-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))) |