Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 92 / 0f1a9ee86f43565ef685eead797242ef24e488
1 Return-Path: <jani@nikula.org>\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 A3BFE431FB6\r
6         for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 00:56:29 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.699\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
12         tests=[HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 Yy1h-pRww3GV for <notmuch@notmuchmail.org>;\r
16         Sat, 28 Jan 2012 00:56:29 -0800 (PST)\r
17 Received: from mail-pz0-f53.google.com (mail-pz0-f53.google.com\r
18         [209.85.210.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id E0145431FAE\r
21         for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 00:56:28 -0800 (PST)\r
22 Received: by dadv6 with SMTP id v6so2734198dad.26\r
23         for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 00:56:27 -0800 (PST)\r
24 MIME-Version: 1.0\r
25 Received: by 10.68.189.6 with SMTP id ge6mr21611631pbc.93.1327740981755; Sat,\r
26         28 Jan 2012 00:56:21 -0800 (PST)\r
27 Received: by 10.68.236.137 with HTTP; Sat, 28 Jan 2012 00:56:21 -0800 (PST)\r
28 Received: by 10.68.236.137 with HTTP; Sat, 28 Jan 2012 00:56:21 -0800 (PST)\r
29 In-Reply-To: <1327727143-24455-1-git-send-email-dmitry.kurochkin@gmail.com>\r
30 References: <1327725684-5887-1-git-send-email-dmitry.kurochkin@gmail.com>\r
31         <1327727143-24455-1-git-send-email-dmitry.kurochkin@gmail.com>\r
32 Date: Sat, 28 Jan 2012 10:56:21 +0200\r
33 Message-ID:\r
34  <CAB+hUn834oJ+XGx-YyYSGxSnzrBYCMvcu4Vd73ws28qTS2riuA@mail.gmail.com>\r
35 Subject: Re: [PATCH 7/6] emacs: relax tag syntax check in `notmuch-tag'\r
36         function\r
37 From: Jani Nikula <jani@nikula.org>\r
38 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
39 Content-Type: multipart/alternative; boundary=e89a8ff1c3e89240a304b792c9df\r
40 Cc: notmuch@notmuchmail.org\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Sat, 28 Jan 2012 08:56:29 -0000\r
54 \r
55 --e89a8ff1c3e89240a304b792c9df\r
56 Content-Type: text/plain; charset=UTF-8\r
57 \r
58 On Jan 28, 2012 7:06 AM, "Dmitry Kurochkin" <dmitry.kurochkin@gmail.com>\r
59 wrote:\r
60 >\r
61 > The tag syntax check in `notmuch-tag' function was too strict and did\r
62 > not allow nmbug tags with "::".  Since the check is done for all\r
63 > tagging operations in Emacs UI, this basically means that no nmbug\r
64 > tags can be changed.  The patch relaxes the tag syntax check to allow\r
65 > any tag names that do not include whitespace characters.\r
66 \r
67 Imho the syntax check should be in cli, or lib even. I posted a patch to\r
68 cli some time ago when I realized it's possible to add tag "-" but you\r
69 can't remove it with the current cli. (On the road, can't find the message\r
70 id now.)\r
71 \r
72 > ---\r
73 >  emacs/notmuch.el |    2 +-\r
74 >  1 files changed, 1 insertions(+), 1 deletions(-)\r
75 >\r
76 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
77 > index 9813e0a..0de6123 100644\r
78 > --- a/emacs/notmuch.el\r
79 > +++ b/emacs/notmuch.el\r
80 > @@ -555,7 +555,7 @@ notmuch-after-tag-hook will be run."\r
81 >   ;; Perform some validation\r
82 >   (when (null tags) (error "No tags given"))\r
83 >   (mapc (lambda (tag)\r
84 > -         (unless (string-match-p "^[-+][-+_.[:word:]]+$" tag)\r
85 > +         (unless (string-match-p "^[-+]\\S-+$" tag)\r
86 >            (error "Tag must be of the form `+this_tag' or `-that_tag'")))\r
87 >        tags)\r
88 >   (run-hooks 'notmuch-before-tag-hook)\r
89 > --\r
90 > 1.7.8.3\r
91 >\r
92 > _______________________________________________\r
93 > notmuch mailing list\r
94 > notmuch@notmuchmail.org\r
95 > http://notmuchmail.org/mailman/listinfo/notmuch\r
96 \r
97 --e89a8ff1c3e89240a304b792c9df\r
98 Content-Type: text/html; charset=UTF-8\r
99 Content-Transfer-Encoding: quoted-printable\r
100 \r
101 <p><br>\r
102 On Jan 28, 2012 7:06 AM, &quot;Dmitry Kurochkin&quot; &lt;<a href=3D"mailto=\r
103 :dmitry.kurochkin@gmail.com">dmitry.kurochkin@gmail.com</a>&gt; wrote:<br>\r
104 &gt;<br>\r
105 &gt; The tag syntax check in `notmuch-tag&#39; function was too strict and =\r
106 did<br>\r
107 &gt; not allow nmbug tags with &quot;::&quot;. =C2=A0Since the check is don=\r
108 e for all<br>\r
109 &gt; tagging operations in Emacs UI, this basically means that no nmbug<br>\r
110 &gt; tags can be changed. =C2=A0The patch relaxes the tag syntax check to a=\r
111 llow<br>\r
112 &gt; any tag names that do not include whitespace characters.</p>\r
113 <p>Imho the syntax check should be in cli, or lib even. I posted a patch to=\r
114  cli some time ago when I realized it&#39;s possible to add tag &quot;-&quo=\r
115 t; but you can&#39;t remove it with the current cli. (On the road, can&#39;=\r
116 t find the message id now.)<br>\r
117 </p>\r
118 <p>&gt; ---<br>\r
119 &gt; =C2=A0emacs/notmuch.el | =C2=A0 =C2=A02 +-<br>\r
120 &gt; =C2=A01 files changed, 1 insertions(+), 1 deletions(-)<br>\r
121 &gt;<br>\r
122 &gt; diff --git a/emacs/notmuch.el b/emacs/notmuch.el<br>\r
123 &gt; index 9813e0a..0de6123 100644<br>\r
124 &gt; --- a/emacs/notmuch.el<br>\r
125 &gt; +++ b/emacs/notmuch.el<br>\r
126 &gt; @@ -555,7 +555,7 @@ notmuch-after-tag-hook will be run.&quot;<br>\r
127 &gt; =C2=A0 ;; Perform some validation<br>\r
128 &gt; =C2=A0 (when (null tags) (error &quot;No tags given&quot;))<br>\r
129 &gt; =C2=A0 (mapc (lambda (tag)<br>\r
130 &gt; - =C2=A0 =C2=A0 =C2=A0 =C2=A0 (unless (string-match-p &quot;^[-+][-+_.=\r
131 [:word:]]+$&quot; tag)<br>\r
132 &gt; + =C2=A0 =C2=A0 =C2=A0 =C2=A0 (unless (string-match-p &quot;^[-+]\\S-+=\r
133 $&quot; tag)<br>\r
134 &gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(error &quot;Tag must be of t=\r
135 he form `+this_tag&#39; or `-that_tag&#39;&quot;)))<br>\r
136 &gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0tags)<br>\r
137 &gt; =C2=A0 (run-hooks &#39;notmuch-before-tag-hook)<br>\r
138 &gt; --<br>\r
139 &gt; 1.7.8.3<br>\r
140 &gt;<br>\r
141 &gt; _______________________________________________<br>\r
142 &gt; notmuch mailing list<br>\r
143 &gt; <a href=3D"mailto:notmuch@notmuchmail.org">notmuch@notmuchmail.org</a>=\r
144 <br>\r
145 &gt; <a href=3D"http://notmuchmail.org/mailman/listinfo/notmuch">http://not=\r
146 muchmail.org/mailman/listinfo/notmuch</a><br>\r
147 </p>\r
148 \r
149 --e89a8ff1c3e89240a304b792c9df--\r