From 26624d3174aec15a13447f891ffab01b42a6099d Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 18 Jul 2022 13:51:19 -0700 Subject: Revert "add workaround for Emacs bug#56592" This reverts commit ec1ce8e8592332eb1a21da12b5193086ab9301a8. Turning on Gnus duplicate suppression seems to be sufficient to work around the bug, and it's much faster than this advice. --- .emacs.d/init.el | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 5fdec9e5..42b771ea 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -2986,17 +2986,12 @@ mutt's review view, after exiting EDITOR." (with-eval-after-load 'gnus-start (add-hook 'gnus-started-hook #'spw/sync-notmuch-nnselect-groups)) -;; Work around Emacs bug#56592. -;; -;; Also rescans nnmaildir+fmail:inbox whenever we M-g in an nnselect group, -;; which ensures new mail is displayed. (Previously we achieved the latter by -;; advising `gnus-request-group-scan' (see b9adb797). We will likely need to -;; restore that when removing this workaround, when bug#56592 is fixed.) -(defun spw/gnus-summary-exit (&rest _ignore) - (call-process "notmuch" nil nil nil "new" "--no-hooks") - (with-current-buffer gnus-group-buffer - (gnus-group-get-new-news t))) -(advice-add 'gnus-summary-exit :after #'spw/gnus-summary-exit) +;; Rescan nnmaildir+fmail:inbox too, else rescanning the nnselect group will +;; not display any new mail. +(defun spw/gnus-request-group-scan (group _info) + (when (eq 'nnselect (car (gnus-find-method-for-group group))) + (gnus-activate-group "nnmaildir+fmail:inbox" 'scan))) +(advice-add 'gnus-request-group-scan :before #'spw/gnus-request-group-scan) (defun spw/gnus-group-nnselect-query (group) (when-let ((specs (gnus-group-get-parameter group 'nnselect-specs t))) -- cgit v1.2.3