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

Justin Humm justin.humm at posteo.de
Wed Oct 10 03:44:28 PDT 2018


> I don't think the issue with your test is the same problem.

What let's me think that my test triggers a bug is that notmuch doesn't
show any information about the sender in the overview of all messages.
This is from the test log:

  -thread:XXX   2000-01-01 [1/1] Search By From Name [with brackets]; search by from (name with brackets) (inbox unread)
  +thread:XXX   2000-01-01 [1/1] ; search by from (name with brackets) (inbox unread)

Also, leaving the brackets out of the search query in the test doesn't
help either.

Anyway, I attached a real message.


Quoting David Bremner (2018-10-09 01:54:51)
> 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.
-------------- next part --------------
An embedded message was scrubbed...
From: unknown sender
Subject: no subject
Date: no date
Size: 7905
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20181010/2066ceba/attachment-0001.mht>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20181010/2066ceba/attachment-0001.sig>


More information about the notmuch mailing list