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,gmane.mail.notmuch.general Subject: bug#56442: gnus-search-run-search: Hits notmuch command line length limits Date: Sat, 09 Jul 2022 09:11:22 -0700 Message-ID: <87czeeuuz9.fsf@ericabrahamsen.net> References: <875yk850be.fsf__40907.3059143097$1657213041$gmane$org@athena.silentflame.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15006"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: notmuch@notmuchmail.org, 56442@debbugs.gnu.org To: Sean Whitton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 09 18:12:29 2022 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 1oAD4G-0003i5-MP for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Jul 2022 18:12:28 +0200 Original-Received: from localhost ([::1]:59252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAD4E-0001cN-PP for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Jul 2022 12:12:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAD3r-0001cE-8Y for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2022 12:12:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oAD3q-0001rM-Mu for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2022 12:12:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oAD3q-00044V-BC for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2022 12:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Jul 2022 16:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56442 X-GNU-PR-Package: emacs Original-Received: via spool by 56442-submit@debbugs.gnu.org id=B56442.165738309215599 (code B ref 56442); Sat, 09 Jul 2022 16:12:02 +0000 Original-Received: (at 56442) by debbugs.gnu.org; 9 Jul 2022 16:11:32 +0000 Original-Received: from localhost ([127.0.0.1]:35801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAD3L-00043X-V0 for submit@debbugs.gnu.org; Sat, 09 Jul 2022 12:11:32 -0400 Original-Received: from mail.ericabrahamsen.net ([52.70.2.18]:60416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAD3K-00043K-Hq for 56442@debbugs.gnu.org; Sat, 09 Jul 2022 12:11:31 -0400 Original-Received: from localhost (c-71-197-232-41.hsd1.wa.comcast.net [71.197.232.41]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 51706FA0C3; Sat, 9 Jul 2022 16:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1657383084; bh=zslbbM/yc4WBcPvKy3KB8MW5FomvNWlxtyF9wb3lw28=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ZSX6N6rauG8q0Nw6O3tyht7AGWwPJmLVTrXCYdI+y9CaZZiVpJbDIIIQujQDc2cSc pQxay9lhMGlyE7dXe6eG1UGPj0MfSs9lQ5J95ViOMb8gbTuJNbVxfEWTwcHdFbwuf6 TwaPQuIeG2zHU1Gs9OhWC2A59FJuPCta75RJd8Io= In-Reply-To: <875yk850be.fsf__40907.3059143097$1657213041$gmane$org@athena.silentflame.com> (Sean Whitton's message of "Thu, 07 Jul 2022 09:56:05 -0700") 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:236524 gmane.mail.notmuch.general:33616 Archived-At: Sean Whitton writes: > Hello, > > I'm running a pretty innocent notmuch query over a fairly small Maildir: > > "((List:debian-devel.lists.debian.org) or ... or > (List:debian-haskell.lists.debian.org) or > (List:debconf-discuss.lists.debian.org)) and (not path:annex/**)" > > but gnus-search-run-search fails to return any results. The reason is > that Gnus first runs the query with --output=3Dthreads to obtain a list of > thread ids, and then runs another query with --output=3Dfiles and a query > constructed from the output of the first query: "thread:000000000000d9d0 > or thread:000000000000d9e0 or thread:000000000000d268 or ..." > > The resulting command fails completely: > > emacs: /usr/bin/notmuch: Argument list too long > > Instead of running two searches like this, we can just surround the > whole query like this: "thread:{QUERY}". The manual says it's exactly > equivalent: > > ... the user should think of the query thread:{} as > expanding to all of the thread IDs which match ; not=E2=80= =90 > much then performs a second search using the expanded query. > > This should be faster, too, with only running a single external command. > Here is the patch I'm thinking I'll apply, if anyone has comments. Huh, I tried this a couple months ago with a more complicated query, like: thread:{from:bob or from:jane} and I remember notmuch barking at me about spaces or the "or" or something -- anyway I got the impression that it couldn't accept multi-part queries inside the "thread:{}" syntax. But looking at your patch maybe I just needed to quote differently? Anyway I'll give this a test this weekend. It would be *very* nice if we could use this syntax rather than the ugly home-grown one. Thanks for the report! Eric