Re: [BUG] Can't search for some square brackets in From:

Subject: Re: [BUG] Can't search for some square brackets in From:

Date: Mon, 08 Oct 2018 20:54:51 -0300

To: Justin Humm, notmuch@notmuchmail.org

Cc:

From: David Bremner


Justin Humm <justin.humm@posteo.de> writes:

> Hello,
>
> I struggle with searching the From field of mails, that have square brackets
> in it. The first instance of that problem I found is
>
>   From: =?UTF-8?Q?Shedhalle_T=c3=bcbingen_[Festival]?= <festival@shedhalle.de>
>
> In this case, on 0.27 I'm unable to find any mail with
>
>   from:"Shedhalle"
>   from:"Tübingen"
>   from:"Festival"
>
> However I can find mails with 
>
>   From: "dependabot[bot]" <notifications@github.com>
>
> by searching for
>
>   from:"dependabot"
>   from:"bot"
>
> I managed to write a short test, that reproduces the problem. It fails on
> master, but should pass imho. It is attached below this mail. For me it
> generates the following output:

I don't think the issue with your test is the same problem. With that
sample data, 'from:"Search By From Name"' works fine to match the
thread. I'm not really sure why your test is failing, but in general it
doesn't really make sense to search for punctuation, unless you use a
(slower) regexp search. The details are in notmuch-search-terms(7),
under "Terms and phrases"

Can you provide a sample complete message where searching doesn't work?
I suspect it's most likely a problem with the encoded header. I tried
copying your "Shedhalle" from header into a test message and it seemed
like the terms for phrase search were not being generated at index
time. That looks like a bug, but I'd prefer to see a real message, if
possible.
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: