summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-07-18 13:51:19 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-07-18 13:51:19 -0700
commit26624d3174aec15a13447f891ffab01b42a6099d (patch)
tree7c0244aa015be80d4dea5e038bcea64bb311969b
parentcc3ff3077f248f30d3ab7a7652806e2c94d71d9a (diff)
downloaddotfiles-26624d3174aec15a13447f891ffab01b42a6099d.tar.gz
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.
-rw-r--r--.emacs.d/init.el17
1 files 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)))