emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56442: closed (gnus-search-run-search: Hits notmuch command line len


From: GNU bug Tracking System
Subject: bug#56442: closed (gnus-search-run-search: Hits notmuch command line length limits)
Date: Thu, 14 Jul 2022 18:51:01 +0000

Your message dated Thu, 14 Jul 2022 11:50:13 -0700
with message-id <87cze7ttp6.fsf@athena.silentflame.com>
and subject line Re: bug#56442: gnus-search-run-search: Hits notmuch command 
line length limits
has caused the debbugs.gnu.org bug report #56442,
regarding gnus-search-run-search: Hits notmuch command line length limits
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
56442: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56442
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: gnus-search-run-search: Hits notmuch command line length limits Date: Thu, 07 Jul 2022 09:56:05 -0700 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
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=threads to obtain a list of
thread ids, and then runs another query with --output=files 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:{<something>} as
    expanding to all of the thread IDs which match <something>; not‐
    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.

-- 
Sean Whitton

Attachment: 0001-Use-notmuch-thread-operator-instead-of-performing-tw.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#56442: gnus-search-run-search: Hits notmuch command line length limits Date: Thu, 14 Jul 2022 11:50:13 -0700 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
Hello,

On Sat 09 Jul 2022 at 11:01AM -07, Sean Whitton wrote:

> On Sat 09 Jul 2022 at 09:11AM -07, Eric Abrahamsen wrote:
>
>> 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.
>
> Let me know the results of your test, and if it's also continuing to
> work for me by then, I'll install the change.  Thanks for taking a look.

I've been testing it with a variety of complex queries for a week now,
and you indicated you were happy with making a change like this, so I've
gone ahead and pushed to master.

-- 
Sean Whitton


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]