]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: relax tag syntax check in `notmuch-tag' function
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Sun, 5 Feb 2012 07:13:50 +0000 (11:13 +0400)
committerDavid Bremner <bremner@debian.org>
Wed, 8 Feb 2012 15:19:23 +0000 (11:19 -0400)
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.

emacs/notmuch.el

index 862d9e8f39ca7e11d26921bd62e8398738dd5ce7..b06d8a113d8fce4f178b0e1f54783704761cc487 100644 (file)
@@ -550,7 +550,7 @@ notmuch-after-tag-hook will be run."
   ;; Perform some validation
   (when (null tags) (error "No tags given"))
   (mapc (lambda (tag)
   ;; 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)
            (error "Tag must be of the form `+this_tag' or `-that_tag'")))
        tags)
   (run-hooks 'notmuch-before-tag-hook)