From: Alex Bochannek <alex@bochannek.com>
To: 48834@debbugs.gnu.org
Subject: bug#48834: 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 [thread overview]
Message-ID: <m2k0n9ph4r.fsf@bochannek.com> (raw)
[-- 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.
next reply other threads:[~2021-06-04 19:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 19:24 Alex Bochannek [this message]
2021-06-05 20:30 ` bug#48834: 28.0.50; [PATCH] gnus-summary-limit functions with prefix fail when no articles are left to display Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2k0n9ph4r.fsf@bochannek.com \
--to=alex@bochannek.com \
--cc=48834@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).