]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Gnus summary exclusion when everything matches
authorAlex Bochannek <alex@bochannek.com>
Sat, 5 Jun 2021 20:29:09 +0000 (22:29 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 5 Jun 2021 20:30:36 +0000 (22:30 +0200)
* lisp/gnus/gnus-sum.el (gnus-summary-limit-to-recipient):
* lisp/gnus/gnus-sum.el (gnus-summary-limit-to-subject):
(gnus-summary-limit-to-address, gnus-summary-limit-to-extra):
Don't claim that there aren't any matches when everything matches
an exclusion (bug#48834).

lisp/gnus/gnus-sum.el

index 48794ceb3feefb52177e18543d7352caca970a1e..3279c3221ea30bb498db54e75cf59910cd643be5 100644 (file)
@@ -8247,7 +8247,7 @@ If NOT-MATCHING, excluding articles that have subjects that match a regexp."
        (let ((articles (gnus-summary-find-matching
                         (or header "subject") subject 'all nil nil
                         not-matching)))
-         (unless articles
+         (unless (or articles not-matching)
            (error "Found no matches for \"%s\"" subject))
          (gnus-summary-limit articles))
       (gnus-summary-position-point))))
@@ -8318,7 +8318,7 @@ To and Cc headers are checked.  You need to include them in
                                 (and (memq a to) a))
                               cc)
                     (nconc to cc))))
-            (unless articles
+            (unless (or articles not-matching)
               (error "Found no matches for \"%s\"" recipient))
             (gnus-summary-limit articles))
       (gnus-summary-position-point))))
@@ -8374,7 +8374,7 @@ in `nnmail-extra-headers'."
                     (nconc (if (eq to t) nil to)
                            (if (eq cc t) nil cc)
                            from))))
-            (unless articles
+            (unless (or articles not-matching)
               (error "Found no matches for \"%s\"" address))
             (gnus-summary-limit articles))
       (gnus-summary-position-point))))
@@ -8465,7 +8465,7 @@ articles that are younger than AGE days."
        (let ((articles (gnus-summary-find-matching
                         (cons 'extra header) regexp 'all nil nil
                         not-matching)))
-         (unless articles
+         (unless (or articles not-matching)
            (error "Found no matches for \"%s\"" regexp))
          (gnus-summary-limit articles))
       (gnus-summary-position-point))))