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
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
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
34 <CAB+hUn834oJ+XGx-YyYSGxSnzrBYCMvcu4Vd73ws28qTS2riuA@mail.gmail.com>
\r
35 Subject: Re: [PATCH 7/6] emacs: relax tag syntax check in `notmuch-tag'
\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
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
55 --e89a8ff1c3e89240a304b792c9df
\r
56 Content-Type: text/plain; charset=UTF-8
\r
58 On Jan 28, 2012 7:06 AM, "Dmitry Kurochkin" <dmitry.kurochkin@gmail.com>
\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
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
73 > emacs/notmuch.el | 2 +-
\r
74 > 1 files changed, 1 insertions(+), 1 deletions(-)
\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
88 > (run-hooks 'notmuch-before-tag-hook)
\r
92 > _______________________________________________
\r
93 > notmuch mailing list
\r
94 > notmuch@notmuchmail.org
\r
95 > http://notmuchmail.org/mailman/listinfo/notmuch
\r
97 --e89a8ff1c3e89240a304b792c9df
\r
98 Content-Type: text/html; charset=UTF-8
\r
99 Content-Transfer-Encoding: quoted-printable
\r
102 On Jan 28, 2012 7:06 AM, "Dmitry Kurochkin" <<a href=3D"mailto=
\r
103 :dmitry.kurochkin@gmail.com">dmitry.kurochkin@gmail.com</a>> wrote:<br>
\r
105 > The tag syntax check in `notmuch-tag' function was too strict and =
\r
107 > not allow nmbug tags with "::". =C2=A0Since the check is don=
\r
109 > tagging operations in Emacs UI, this basically means that no nmbug<br>
\r
110 > tags can be changed. =C2=A0The patch relaxes the tag syntax check to a=
\r
112 > 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's possible to add tag "-&quo=
\r
115 t; but you can't remove it with the current cli. (On the road, can'=
\r
116 t find the message id now.)<br>
\r
119 > =C2=A0emacs/notmuch.el | =C2=A0 =C2=A02 +-<br>
\r
120 > =C2=A01 files changed, 1 insertions(+), 1 deletions(-)<br>
\r
122 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el<br>
\r
123 > index 9813e0a..0de6123 100644<br>
\r
124 > --- a/emacs/notmuch.el<br>
\r
125 > +++ b/emacs/notmuch.el<br>
\r
126 > @@ -555,7 +555,7 @@ notmuch-after-tag-hook will be run."<br>
\r
127 > =C2=A0 ;; Perform some validation<br>
\r
128 > =C2=A0 (when (null tags) (error "No tags given"))<br>
\r
129 > =C2=A0 (mapc (lambda (tag)<br>
\r
130 > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 (unless (string-match-p "^[-+][-+_.=
\r
131 [:word:]]+$" tag)<br>
\r
132 > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 (unless (string-match-p "^[-+]\\S-+=
\r
134 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(error "Tag must be of t=
\r
135 he form `+this_tag' or `-that_tag'")))<br>
\r
136 > =C2=A0 =C2=A0 =C2=A0 =C2=A0tags)<br>
\r
137 > =C2=A0 (run-hooks 'notmuch-before-tag-hook)<br>
\r
141 > _______________________________________________<br>
\r
142 > notmuch mailing list<br>
\r
143 > <a href=3D"mailto:notmuch@notmuchmail.org">notmuch@notmuchmail.org</a>=
\r
145 > <a href=3D"http://notmuchmail.org/mailman/listinfo/notmuch">http://not=
\r
146 muchmail.org/mailman/listinfo/notmuch</a><br>
\r
149 --e89a8ff1c3e89240a304b792c9df--
\r