From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex Bochannek Newsgroups: gmane.emacs.bugs 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 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36096"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) To: 48834@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 04 21:26:19 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpFST-0009Cw-Vm for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Jun 2021 21:26:17 +0200 Original-Received: from localhost ([::1]:40874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpFSR-0005RP-NA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Jun 2021 15:26:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpFSE-0005Qx-Rf for bug-gnu-emacs@gnu.org; Fri, 04 Jun 2021 15:26:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36343) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpFSE-000147-KW for bug-gnu-emacs@gnu.org; Fri, 04 Jun 2021 15:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lpFSE-0007Rs-Ek for bug-gnu-emacs@gnu.org; Fri, 04 Jun 2021 15:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Bochannek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Jun 2021 19:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48834 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162283470928562 (code B ref -1); Fri, 04 Jun 2021 19:26:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Jun 2021 19:25:09 +0000 Original-Received: from localhost ([127.0.0.1]:47889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpFRN-0007Qc-D8 for submit@debbugs.gnu.org; Fri, 04 Jun 2021 15:25:09 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpFRK-0007QQ-EW for submit@debbugs.gnu.org; Fri, 04 Jun 2021 15:25:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpFRK-0005Hd-88 for bug-gnu-emacs@gnu.org; Fri, 04 Jun 2021 15:25:06 -0400 Original-Received: from ns.lapseofthought.com ([50.0.39.240]:5441 helo=mail.lapseofthought.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpFRG-0000D5-UA for bug-gnu-emacs@gnu.org; Fri, 04 Jun 2021 15:25:05 -0400 Original-Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:6d0d:ee85:8d40:371e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4FxXlT2mLGz3pkm1 for ; Fri, 4 Jun 2021 12:24:53 -0700 (PDT) Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com Received-SPF: pass client-ip=50.0.39.240; envelope-from=alex@bochannek.com; helo=mail.lapseofthought.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:208037 Archived-At: --=-=-= Content-Type: text/plain 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.) --=-=-= Content-Type: text/x-patch Content-Disposition: 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)))) --=-=-= Content-Type: text/plain -- Alex. --=-=-=--