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

David Bremner david at tethera.net
Mon Oct 8 16:54:51 PDT 2018


Justin Humm <justin.humm at 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 at 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 at 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.


More information about the notmuch mailing list