GNU bug report logs -
#48834
28.0.50; [PATCH] gnus-summary-limit functions with prefix fail when no articles are left to display
Previous Next
Reported by: Alex Bochannek <alex <at> bochannek.com>
Date: Fri, 4 Jun 2021 19:26:02 UTC
Severity: normal
Tags: patch
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hello!
I noticed that when I am trying to exclude articles from summary view, I
incorrectly get the "Found no matches" error when all articles match
(i.e., no articles are left to display.)
[Message part 2 (text/x-patch, inline)]
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 48794ceb3f..3279c3221e 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -8247,7 +8247,7 @@ gnus-summary-limit-to-subject
(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 @@ gnus-summary-limit-to-recipient
(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 @@ gnus-summary-limit-to-address
(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 @@ gnus-summary-limit-to-extra
(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))))
[Message part 3 (text/plain, inline)]
--
Alex.
This bug report was last modified 4 years and 45 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.