Re: [PATCH v2] Omit User-Agent: header by default
[notmuch-archives.git] / e8 / a21f1fbd5f78c4e4f22796671b2b6927e28931
1 Return-Path: <aclements@csail.mit.edu>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 17787431FBC\r
6         for <notmuch@notmuchmail.org>; Tue, 12 Aug 2014 07:33:11 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id dJLrDEuSwQPP for <notmuch@notmuchmail.org>;\r
16         Tue, 12 Aug 2014 07:33:03 -0700 (PDT)\r
17 Received: from outgoing.csail.mit.edu (outgoing.csail.mit.edu [128.30.2.149])\r
18         by olra.theworths.org (Postfix) with ESMTP id B7346431FAF\r
19         for <notmuch@notmuchmail.org>; Tue, 12 Aug 2014 07:33:03 -0700 (PDT)\r
20 Received: from webmail.csail.mit.edu ([128.30.2.164] helo=webmail)\r
21         by outgoing.csail.mit.edu with esmtpsa\r
22         (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72)\r
23         (envelope-from <aclements@csail.mit.edu>)\r
24         id 1XHD8G-0007qi-Rh; Tue, 12 Aug 2014 10:33:00 -0400\r
25 Received: from 216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
26         (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com [216.15.114.40])\r
27         by webmail.csail.mit.edu (Horde Framework) with HTTP;\r
28         Tue, 12 Aug 2014 10:33:00 -0400\r
29 Date: Tue, 12 Aug 2014 10:33:00 -0400\r
30 Message-ID:\r
31  <20140812103300.Horde.O1lIjfCL-Lh8XGn65RO2Cg1@webmail.csail.mit.edu>\r
32 From: "Austin T. Clements" <aclements@csail.mit.edu>\r
33 To: Moritz Ulrich <moritz@tarn-vedra.de>\r
34 Subject: Re: `notmuch-escape-boolean-term': Broken for non-ascii characters\r
35 References: <874mxiu5hj.fsf@tarn-vedra.de>\r
36 In-Reply-To: <874mxiu5hj.fsf@tarn-vedra.de>\r
37 User-Agent: Internet Messaging Program (IMP) H5 (6.1.4)\r
38 Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes\r
39 MIME-Version: 1.0\r
40 Content-Disposition: inline\r
41 Content-Transfer-Encoding: 8bit\r
42 Cc: notmuch@notmuchmail.org\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\r
46 List-Id: "Use and development of the notmuch mail system."\r
47         <notmuch.notmuchmail.org>\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
51 List-Post: <mailto:notmuch@notmuchmail.org>\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
55 X-List-Received-Date: Tue, 12 Aug 2014 14:33:11 -0000\r
56 \r
57 Quoting Moritz Ulrich <moritz@tarn-vedra.de>:\r
58 > Hello,\r
59 >\r
60 > I recently adopted notmuch as my primary way to read mail, so thank you\r
61 > for this great tool!\r
62 >\r
63 > Unfortunately, I ran into a problem of the Emacs side of the project\r
64 > when used in a non-ascii environment:\r
65 >\r
66 > Having a tag named 'uni-köln', the tag:-completion doesn't work.\r
67 >\r
68 > This is caused by `notmuch-escape-boolean-term' errornously escaping the\r
69 > above string:\r
70 >\r
71 > (notmuch-escape-boolean-term "uni-köln") => "\"uni-köln\""\r
72 >\r
73 > This is caused by `string-match' with the following errornously matching\r
74 > my tag:\r
75 >\r
76 > (string-match "[^!#-'*-~]" "uni-köln") => 5\r
77 > (string-match "[^!#-'*-~]" "uni-koln") => nil\r
78 >\r
79 > I'm not exactly sure how to tackle this - the Regexp was crafted to match\r
80 > (, ), " if I understand it correct. A simple way would be just adding\r
81 > more characters as a sort-of whitelist. A nicer solution would be\r
82 > converting it from [^...] to [...] to explicitly mark letters that needs\r
83 > to be escaped.\r
84 \r
85 notmuch-escape-boolean-term used to use a blacklist, but we switched\r
86 to a whitelist because Xapian's own parser has changed over the years\r
87 in its handling of non-ASCII characters and invalidated our blacklist.\r
88 Ultimately it seemed much safer to go with a whitelist.  Quoting\r
89 "uni-köln" isn't erroneous, it's just conservative.\r
90 \r
91 Could you explain in more detail what's broken?  I tried adding the\r
92 tag uni-köln to a message in Emacs, then hitting "s" to start a search\r
93 then "tag:<TAB>" and that tag (surrounded by quotes) was one of the\r
94 completion options.  Upon completing to that tag, the search worked\r
95 fine.\r
96 \r
97 Are you objecting to the unnecessary (but legal) quotes in the\r
98 completion?  We might be able to include Unicode word characters in\r
99 the quoting whitelist, though that seems like a spot fix (probably a\r
100 fairly broad one, so maybe that's fine) and might be tricky because of\r
101 Emacs' somewhat weird Unicode regexp support (using [[:alpha:]] might\r
102 Just Work, but we'd have to be careful of the active syntax table).\r
103 Or tab completion could recognize that, say, tag:uni doesn't require\r
104 quoting, but still expand it to tag:"uni-köln".\r
105 \r
106 \r