From: Alex Bochannek Date: Sat, 5 Jun 2021 20:29:09 +0000 (+0200) Subject: Fix Gnus summary exclusion when everything matches X-Git-Tag: emacs-28.0.90~2186 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4fda37fc7d83a555c597269954b5717b874cf2ee;p=emacs.git Fix Gnus summary exclusion when everything matches * 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). --- diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 48794ceb3fe..3279c3221ea 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -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))))