From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#45770: 28.0.50; `gnus-search-run-search' for imap does not take parentheses into account Date: Sun, 10 Jan 2021 10:36:01 -0800 Message-ID: <87eeisljvy.fsf@ericabrahamsen.net> References: <87ft388yy7.fsf@md5i.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27313"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 45770@debbugs.gnu.org To: Michael Welsh Duggan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 10 19:37:23 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 1kyfac-0006xu-Fx for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Jan 2021 19:37:22 +0100 Original-Received: from localhost ([::1]:36092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyfab-0001QA-GZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Jan 2021 13:37:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyfaI-0001Pe-7R for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2021 13:37:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43386) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kyfaI-0001gO-0Q for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2021 13:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kyfaH-0000jz-Qd; Sun, 10 Jan 2021 13:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Sun, 10 Jan 2021 18:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45770 X-GNU-PR-Package: emacs,gnus Original-Received: via spool by 45770-submit@debbugs.gnu.org id=B45770.16103037722752 (code B ref 45770); Sun, 10 Jan 2021 18:37:01 +0000 Original-Received: (at 45770) by debbugs.gnu.org; 10 Jan 2021 18:36:12 +0000 Original-Received: from localhost ([127.0.0.1]:54931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyfZU-0000iK-5E for submit@debbugs.gnu.org; Sun, 10 Jan 2021 13:36:12 -0500 Original-Received: from ericabrahamsen.net ([52.70.2.18]:43920 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyfZR-0000hz-UZ for 45770@debbugs.gnu.org; Sun, 10 Jan 2021 13:36:11 -0500 Original-Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 09D12FA013; Sun, 10 Jan 2021 18:36:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1610303763; bh=+33C684EFb1tYJlt5hu2Dzz8371fHMn056owPH71Z4Q=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=AIvk40R4HPfVhuxTqogQsSFJDkoBOGmCZOeg7MR9wywtXJX8riYfisu8dU2yy2aOA sNVAiW8soqVmGR2EqfIDwzvpFMYwWzbkk5cOLJUkfVjKaVAOV+kMIpWw4mnsEH3+YC EJlEYlHrIzOKJh63XMNI+BooeHdz2C+PLmT/y5Uk= In-Reply-To: <87ft388yy7.fsf@md5i.com> (Michael Welsh Duggan's message of "Sun, 10 Jan 2021 12:49:04 -0500") 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:197660 Archived-At: Michael Welsh Duggan writes: > When using the `gnus-search-imap' backend for `gnus-search', there is a > bug in the `gnus-search-run-search' method. When the search query > begins with parentheses (such as "(OR FROM A FROM B)"), the naive check > for a known IMAP keyword at the beginning fails due to the parenthesis, > and gnus-search adds "TEXT " to the beginning of the query. Thanks for the report. This is a known problem, one which I actually thought I'd already fixed! But apparently I wavered on whether the TEXT-appending "convenience" was actually a convenience or not, and then got distracted. > Moreover, these are several search keys that are not in > `gnus-search-imap-search-keys'. These are "new", "not", "old", and > "or". Thanks for "new" and "old", I missed those somehow. I was thinking I'd just check for "not" and "or" explicitly. Anyway, I'll get this fixed later today. > I include a minimal patch for these problems. > > There's another misfeature which I have not attempted to fix that made > debugging the problem much more difficult. If the result of a query is > not OK, this fact just gets ignored by `gnus-search-run-search' and the > search group is considered empty. Even after fixing the above problems, > this is a problem when doing a raw search, as one doesn't know whether > the query is bad or if it just does not result in any messages. This is another known problem, one that is requiring some coordination with Andy Cohen on the nnselect backend (it's actually nnselect that is swallowing the errors). This will get fixed before too long. Thanks, Eric