emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 6d4c367: Fix gnus subject matching when subject is empty


From: Andrew G Cohen
Subject: master 6d4c367: Fix gnus subject matching when subject is empty
Date: Tue, 21 Dec 2021 00:50:34 -0500 (EST)

branch: master
commit 6d4c367f3f1f75372022afcef0ce6e200907ba3d
Author: Andrew G Cohen <cohen@andy.bu.edu>
Commit: Andrew G Cohen <cohen@andy.bu.edu>

    Fix gnus subject matching when subject is empty
    
    * lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Don't try
    to limit to a matching subject when the simplified subject is empty.
---
 lisp/gnus/gnus-sum.el | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 1bd0e88..adcc0db 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -8658,20 +8658,20 @@ these articles."
        (gnus-fetch-old-headers nil)
        (gnus-build-sparse-threads nil))
     (prog1
-       (gnus-summary-limit (if thread-only articles
-                             (nconc articles gnus-newsgroup-limit)))
-      (gnus-summary-limit-include-matching-articles
-       "subject"
-       (regexp-quote (gnus-general-simplify-subject
-                     (mail-header-subject (gnus-id-to-header id)))))
-      ;; the previous two calls each push a limit onto the limit
-      ;; stack. the first pop remove the articles that match the
-      ;; subject, while the second pop gets us back to the state
-      ;; before we started to deal with the thread. presumably we want
-      ;; to think of the thread and its associated subject matches as
-      ;; a single thing so that we need to pop only once to get back
-      ;; to the original view.
-      (pop gnus-newsgroup-limits)
+        (gnus-summary-limit (if thread-only articles
+                              (nconc articles gnus-newsgroup-limit)))
+      (let ((matching-subject (gnus-general-simplify-subject
+                              (mail-header-subject (gnus-id-to-header id)))))
+        (when matching-subject
+          (gnus-summary-limit-include-matching-articles
+           "subject"
+           matching-subject)
+          ;; Each of the previous two limit calls push a limit onto
+          ;; the limit stack. Presumably we want to think of the
+          ;; thread and its associated subject matches as a single
+          ;; thing so we probably want a single pop to restore the
+          ;; original view. Hence we pop this last limit off.
+          (pop gnus-newsgroup-limits)))
       (gnus-summary-position-point))))
 
 (defun gnus-summary-limit-include-matching-articles (header regexp)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]