From: No Wayman <iarchivedmywholelife@gmail.com>
To: Timothy <tecosaur@gmail.com>
Cc: emacs-orgmode@gnu.org, Allen Li <darkfeline@felesatra.moe>
Subject: Re: [BUG] [BUG] inconsistent behavior when reading multiple tags [9.4.6 (9.4.6-g366444 @ /home/n/.emacs.d/straight/build/org/)]
Date: Fri, 17 Sep 2021 13:09:59 -0400 [thread overview]
Message-ID: <87bl4rce4j.fsf@gmail.com> (raw)
In-Reply-To: <87wnnym650.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 219 bytes --]
Tim, Allen:
The attached compromise implements the bare minimum.
Tags can be separated with "," or ":" in the previously mentioned
cases.
Scrapped the defcustom and showing delimiters in the prompt.
Any objections?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: allow-comma-to-separate-tags --]
[-- Type: text/x-patch, Size: 2026 bytes --]
From 31fbfca4884083adacd95054155cda9ed0128fba Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer <iarchivedmywholelife@gmail.com>
Date: Fri, 3 Sep 2021 14:50:48 -0400
Subject: [PATCH] Allow "," to delimit tags
* org.el: Add `org-tags-crm-separtor' regexp
(org-set-tags-command, org-capture-fill-template): Use `org-tags-crm-separators'.
---
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 cbdb30c03..cd65f8e6d 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1739,7 +1739,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-tags-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 8b9d57157..572e291c7 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12007,6 +12007,9 @@ tags."
;; it now points to BLANK-START. Use COLUMN instead.
(if in-blank? (org-move-to-column column) (goto-char origin))))))
+(defvar org-tags-crm-separator (format "[ \t]*%s[ \t]*" (regexp-opt '("," ":")))
+ "Regexp to separate tags in commands which use `completing-read-multiple'.")
+
(defun org-set-tags-command (&optional arg)
"Set the tags for the current visible entry.
@@ -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-tags-crm-separator))
(mapconcat #'identity
(completing-read-multiple
"Tags: "
--
2.33.0
next prev parent reply other threads:[~2021-09-17 17:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 17:04 [BUG] [BUG] inconsistent behavior when reading multiple tags [9.4.6 (9.4.6-g366444 @ /home/n/.emacs.d/straight/build/org/)] No Wayman
2021-08-31 10:17 ` Timothy
2021-09-03 2:05 ` No Wayman
2021-09-03 7:22 ` Timothy
2021-09-03 17:00 ` No Wayman
2021-09-03 6:51 ` Allen Li
2021-09-03 8:08 ` Timothy
2021-09-03 19:20 ` No Wayman
2021-09-17 17:09 ` No Wayman [this message]
2021-09-03 17:13 ` No Wayman
2021-09-03 19:42 ` No Wayman
2021-09-03 23:37 ` No Wayman
2021-09-27 8:35 ` Bastien
2021-09-27 15:19 ` No Wayman
2021-09-27 15:49 ` Bastien
2021-09-27 15:56 ` No Wayman
2021-09-06 0:48 ` Allen Li
2021-09-06 23:23 ` No Wayman
2021-09-12 3:37 ` Allen Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bl4rce4j.fsf@gmail.com \
--to=iarchivedmywholelife@gmail.com \
--cc=darkfeline@felesatra.moe \
--cc=emacs-orgmode@gnu.org \
--cc=tecosaur@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).