unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: notmuch@notmuchmail.org
Subject: quoting: (was: Re: bug#56442: gnus-search-run-search: Hits notmuch command line length limits)
Date: Sat, 09 Jul 2022 22:19:47 +0300	[thread overview]
Message-ID: <y3fijym.6f8wlf-too@iki.fi> (raw)
In-Reply-To: <87czeeuuz9.fsf@ericabrahamsen.net>

On Sat, Jul 09 2022, Eric Abrahamsen wrote:

>
> 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?

I am not sure whether this is relevant, but I give a shot...

I tried the following queries from command line:

$ notmuch search 'thread:"{from:bob or from:jane}"'

thread:0000000000000b91   2009-01-20 [6/6] ...
thread:00000000000015fa   2008-11-26 [2/2] ...

and

$ notmuch search 'from:bob or from:jane}':

thread:0000000000000b91   2009-01-20 [1/6] ...
thread:00000000000015fa   2008-11-26 [1/2] ...


The outer '':s protect from shell expansion so what is
inside those goes verbatim to notmuch and from there to
xapian query parser (IIRC). 

Former includes all messages in thread where at least
one message matched to the query and latter just those
messages that match the query.

Like Sean mentioned in another message, Xapian converts ""
to " in query string (probably something irrelevant in this
discussion) the thread:"{...}" syntax binds the whole expression
to this thread: prefix (Why {...} is not enough is beyond me ;D)

Tomi

>
> 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

      parent reply	other threads:[~2022-07-09 19:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <875yk850be.fsf__40907.3059143097$1657213041$gmane$org@athena.silentflame.com>
2022-07-09 16:11 ` bug#56442: gnus-search-run-search: Hits notmuch command line length limits Eric Abrahamsen
2022-07-09 18:01   ` Sean Whitton
2022-07-09 19:19   ` Tomi Ollila [this message]

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://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=y3fijym.6f8wlf-too@iki.fi \
    --to=tomi.ollila@iki.fi \
    --cc=eric@ericabrahamsen.net \
    --cc=notmuch@notmuchmail.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://yhetil.org/notmuch.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).