From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8AD17431FAF for ; Sun, 19 Feb 2012 12:55:31 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DHDygNhRxF8G for ; Sun, 19 Feb 2012 12:55:31 -0800 (PST) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id C5FBB431FAE for ; Sun, 19 Feb 2012 12:55:30 -0800 (PST) Received: by wibhi8 with SMTP id hi8so3112374wib.26 for ; Sun, 19 Feb 2012 12:55:29 -0800 (PST) Received-SPF: pass (google.com: domain of pieter@praet.org designates 10.180.86.105 as permitted sender) client-ip=10.180.86.105; Authentication-Results: mr.google.com; spf=pass (google.com: domain of pieter@praet.org designates 10.180.86.105 as permitted sender) smtp.mail=pieter@praet.org Received: from mr.google.com ([10.180.86.105]) by 10.180.86.105 with SMTP id o9mr12082813wiz.4.1329684929715 (num_hops = 1); Sun, 19 Feb 2012 12:55:29 -0800 (PST) Received: by 10.180.86.105 with SMTP id o9mr10108269wiz.4.1329684929632; Sun, 19 Feb 2012 12:55:29 -0800 (PST) Received: from localhost (104.218-242-81.adsl-dyn.isp.belgacom.be. [81.242.218.104]) by mx.google.com with ESMTPS id dr5sm29418049wib.0.2012.02.19.12.55.28 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Feb 2012 12:55:29 -0800 (PST) From: Pieter Praet To: Jani Nikula , Dmitry Kurochkin Subject: Re: [PATCH 7/6] emacs: relax tag syntax check in `notmuch-tag' function In-Reply-To: References: <1327725684-5887-1-git-send-email-dmitry.kurochkin@gmail.com> <1327727143-24455-1-git-send-email-dmitry.kurochkin@gmail.com> User-Agent: Notmuch/0.11.1+210~g6afc43e (http://notmuchmail.org) Emacs/23.3.1 (x86_64-unknown-linux-gnu) Date: Sun, 19 Feb 2012 21:53:19 +0100 Message-ID: <87fwe6sfy8.fsf@praet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gm-Message-State: ALoCoQnoIY1DpczZU7ThbuWQE897pegR8aoH61aYbblMMqce+8I9ooSe1PoeKExtNU6ovHRQVjAN Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2012 20:55:31 -0000 On Sat, 28 Jan 2012 10:56:21 +0200, Jani Nikula wrote: > On Jan 28, 2012 7:06 AM, "Dmitry Kurochkin" > wrote: > > > > The tag syntax check in `notmuch-tag' function was too strict and did > > not allow nmbug tags with "::". Since the check is done for all > > tagging operations in Emacs UI, this basically means that no nmbug > > tags can be changed. The patch relaxes the tag syntax check to allow > > any tag names that do not include whitespace characters. > > Imho the syntax check should be in cli, or lib even. I posted a patch to > cli some time ago when I realized it's possible to add tag "-" but you > can't remove it with the current cli. (On the road, can't find the message > id now.) > Here you go: id:"3da260c7687fafe2cbc17bad129a8b1edb05c6d0.1320958534.git.jani@nikula.org" > > --- > > emacs/notmuch.el | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el > > index 9813e0a..0de6123 100644 > > --- a/emacs/notmuch.el > > +++ b/emacs/notmuch.el > > @@ -555,7 +555,7 @@ notmuch-after-tag-hook will be run." > > ;; Perform some validation > > (when (null tags) (error "No tags given")) > > (mapc (lambda (tag) > > - (unless (string-match-p "^[-+][-+_.[:word:]]+$" tag) > > + (unless (string-match-p "^[-+]\\S-+$" tag) > > (error "Tag must be of the form `+this_tag' or `-that_tag'"))) > > tags) > > (run-hooks 'notmuch-before-tag-hook) > > -- > > 1.7.8.3 > > > > _______________________________________________ > > notmuch mailing list > > notmuch@notmuchmail.org > > http://notmuchmail.org/mailman/listinfo/notmuch Non-text part: text/html > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch Peace -- Pieter