[PATCH v2 09/13] emacs: relax tag syntax check in `notmuch-tag' function

Dmitry Kurochkin dmitry.kurochkin at gmail.com
Sun Jan 29 18:26:18 PST 2012


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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 5adcac5..7e8f185 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -557,7 +557,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



More information about the notmuch mailing list