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

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

Date: Wed, 10 Oct 2018 12:44:28 +0200

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Justin Humm


> 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@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.
UmV0dXJuLVBhdGg6IDxvd25lci1mZXN0aXZhbHRlYW1Ad3d3LnNoZWRoYWxsZS5kZT4KRGVsaXZl
cmVkLVRvOiBqdXN0a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WQgaW4gdGhlIG91dGxpbmVkIHN1YmplY3QgYXJlYSBvZiB0aGUgR0VO
RVJBVEUhwrAgCkZlc3RpdmFsIGZvciBFbGVjdHJvbmljIEFydHMuCgoKX18KU2hlZGhhbGxlIFTD
vGJpbmdlbgpGb3J1bSBmw7xyIHplaXRnZW7DtnNzaXNjaGUgS8O8bnN0ZSBlLlYuClNjaGxhY2h0
aGF1c3N0cmHDn2UgMTMKNzIwNzQgVMO8YmluZ2VuCkdlcm1hbnkKClRlbC4gKzQ5IDcwNzEgMTQ2
MiA3MDUKd3d3LnNoZWRoYWxsZS5kZQp3d3cuZmFjZWJvb2suY29tL3NoZWRoYWxsZXR1ZWJpbmdl
bgoKTWl0Z2xpZWQgZGVyIEFES1YgLSBBcmJlaXRzZ2VtZWluc2NoYWZ0IERldXRzY2hlciBLdW5z
dHZlcmVpbmUK
signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: