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

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48834 in the body.
You can then email your comments to 48834 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#48834; Package emacs. (Fri, 04 Jun 2021 19:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex Bochannek <alex <at> bochannek.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 04 Jun 2021 19:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alex Bochannek <alex <at> bochannek.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; [PATCH] gnus-summary-limit functions with prefix fail when
 no articles are left to display
Date: Fri, 04 Jun 2021 12:24:52 -0700
[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.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#48834; Package emacs. (Sat, 05 Jun 2021 20:31:02 GMT) Full text and rfc822 format available.

Message #8 received at 48834 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alex Bochannek <alex <at> bochannek.com>
Cc: 48834 <at> debbugs.gnu.org
Subject: Re: bug#48834: 28.0.50; [PATCH] gnus-summary-limit functions with
 prefix fail when no articles are left to display
Date: Sat, 05 Jun 2021 22:30:16 +0200
Alex Bochannek <alex <at> bochannek.com> writes:

> 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.)

Thanks; applied to Emacs 28.

In future patches, can you also include ChangeLog-style commit messages?
(I added them myself here.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 48834 <at> debbugs.gnu.org and Alex Bochannek <alex <at> bochannek.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 05 Jun 2021 20:31:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 04 Jul 2021 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 294 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.