From 05bc3712e1da0c060a2d97780ed7f808db578a65 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 18 Jul 2022 21:38:28 -0700 Subject: restore slight variant of the fast part of workaround from ec1ce8e8 This time use a hook, not advice. Third attempt to work around the bug. --- .emacs.d/init.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 3ea4cabe..8cb361d7 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -233,7 +233,7 @@ windows side-by-side in the frame." '(gnus-sum-thread-tree-vertical "│") '(gnus-summary-line-format "%U%R%z %(%12&user-date; %*%-23,23f%) %B%s\12") '(gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references) - '(gnus-suppress-duplicates t nil nil "Works around Emacs bug#56592, and wanted anyway.") + '(gnus-suppress-duplicates t) '(gnus-thread-sort-functions '(gnus-thread-sort-by-number gnus-thread-sort-by-total-score)) '(gnus-topic-display-empty-topics nil) @@ -2993,6 +2993,13 @@ 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)) + (defun spw/gnus-group-nnselect-query (group) (when-let ((specs (gnus-group-get-parameter group 'nnselect-specs t))) (cdr (assq 'query -- cgit v1.2.3