unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48834: 28.0.50; [PATCH] gnus-summary-limit functions with prefix fail when no articles are left to display
@ 2021-06-04 19:24 Alex Bochannek
  2021-06-05 20:30 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Bochannek @ 2021-06-04 19:24 UTC (permalink / raw)
  To: 48834

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1516 bytes --]

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


[-- Attachment #3: Type: text/plain, Size: 10 bytes --]

-- 
Alex.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#48834: 28.0.50; [PATCH] gnus-summary-limit functions with prefix fail when no articles are left to display
  2021-06-04 19:24 bug#48834: 28.0.50; [PATCH] gnus-summary-limit functions with prefix fail when no articles are left to display Alex Bochannek
@ 2021-06-05 20:30 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-05 20:30 UTC (permalink / raw)
  To: Alex Bochannek; +Cc: 48834

Alex Bochannek <alex@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-05 20:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 19:24 bug#48834: 28.0.50; [PATCH] gnus-summary-limit functions with prefix fail when no articles are left to display Alex Bochannek
2021-06-05 20:30 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).