>From 2ec28b530eb28cf788c38556ec3cb97f3bacd4af Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Thu, 26 Aug 2021 12:51:27 -0400 Subject: [PATCH] RFC: broader regexp for lexically bound crm-separator For testing purposes. Ammended commit message pending. --- lisp/org-capture.el | 2 +- lisp/org.el | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index c51744680..47b47c3ca 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1740,7 +1740,7 @@ The template may still contain \"%?\" for cursor positioning." (org-add-colon-after-tag-completion t) (ins (mapconcat #'identity - (let ((crm-separator "[ \t]*:[ \t]*")) + (let ((crm-separator org-tag-crm-separator)) (completing-read-multiple (if prompt (concat prompt ": ") "Tags: ") org-last-tags-completion-table nil nil nil diff --git a/lisp/org.el b/lisp/org.el index ce68f4692..f5e396cba 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -602,6 +602,9 @@ not contribute to the agenda listings.") (defconst org-tag-re "[[:alnum:]_@#%]+" "Regexp matching a single tag.") +(defconst org-tag-crm-separator "[ \t]*[^[:alnum:]_@#%][ \t]*" + "Regexp used to determine `crm-separator' when reading multiple tags.") + (defconst org-tag-group-re "[ \t]+\\(:\\([[:alnum:]_@#%:]+\\):\\)[ \t]*$" "Regexp matching the tag group at the end of a line, with leading spaces. Tags are stored in match group 1. Match group 2 stores the tags @@ -12066,7 +12069,7 @@ in Lisp code use `org-set-tags' instead." table (and org-fast-tag-selection-include-todo org-todo-key-alist)) (let ((org-add-colon-after-tag-completion (< 1 (length table))) - (crm-separator "[ \t]*:[ \t]*")) + (crm-separator org-tag-crm-separator)) (mapconcat #'identity (completing-read-multiple "Tags: " -- 2.33.0