`notmuch-escape-boolean-term': Broken for non-ascii characters

Moritz Ulrich moritz at tarn-vedra.de
Mon Aug 11 13:38:16 PDT 2014


Hello,

I recently adopted notmuch as my primary way to read mail, so thank you
for this great tool!

Unfortunately, I ran into a problem of the Emacs side of the project
when used in a non-ascii environment:

Having a tag named 'uni-köln', the tag:-completion doesn't work.

This is caused by `notmuch-escape-boolean-term' errornously escaping the
above string:

(notmuch-escape-boolean-term "uni-köln") => "\"uni-köln\""

This is caused by `string-match' with the following errornously matching
my tag:

(string-match "[^!#-'*-~]" "uni-köln") => 5
(string-match "[^!#-'*-~]" "uni-koln") => nil

I'm not exactly sure how to tackle this - the Regexp was crafted to match
(, ), " if I understand it correct. A simple way would be just adding
more characters as a sort-of whitelist. A nicer solution would be
converting it from [^...] to [...] to explicitly mark letters that needs
to be escaped.

Cheers,
Moritz Ulrich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20140811/5be67b1f/attachment.pgp>


More information about the notmuch mailing list