Allen Li <darkfel...@felesatra.moe> writes:
green-blue is recoverable, and green:blue is not. Consider a
file where
some headings are tagged :green:blue: and some are tagged
:green_blue:.
If green-blue gets changed into :green:blue:, then it is no
longer
possible to tell which :green:blue: headings are supposed to be
:green_blue:. If they were left as green-blue, it is trivial to
fix
them with a search-replace. It is also easy to notice that they
were
typed incorrectly because the tags would be highlighted
differently (as
they are invalid).
It's not so easy to notice such corruption in the case of captures
which are filed away and then searched for (by tag) at a later
time.
But that's neither here nor there. We both agree the behavior
should be more consistent, and the patch I've proposed takes care
of that.
Yes, I think using only ":" and "," is the best default option.
I still
don't think there is a need to make it customizable (I doubt
anyone is
typing tags separated with ! or @ or #), but I suppose
there's minimal harm from doing so.
I don't see the need to prevent customization here, either.
There may be use cases we don't anticiapte and it adds very little
in the way of maitenance.
Consider if the author of crm.el decided to hardcode the
separator.
Your original patch would not have been so trivial.
I am -0.5 on showing the delimiters since this is not
conventional for
completing-read-multiple, especially after we add support for
"," like
most other uses of completing-read-multiple. It needlessly
inflates the
length of the prompt.
I don't know what you mean by -0.5, but I wouldn't say it's
needless.
`org-todo-list' adds the following to the prompt:
"Keyword (or KWD1|KWD2|...): "
We're talking a handful of characters at most. e.g.
"Tags (: , to delimit): "
Actually shorter than what `org-todo-list' does now.
I'm open to suggestions on improving that prompt format as well.
I suggest adding a helper function for the:
(separators (or org-tags-crm-separators '(?: ?,)))
(crm-separator (org-tags-crm-regexp separators))
so you can call it like:
(crm-separator (org-tags--crm-separator-regexp))
since you repeat this verbatim below.
The separators are stored in a separate variable for use in the
prompt.
I'll have to take another look to see if we can eliminate the
duplicate code.
I do agree the function can be "private" and named more
appropriately.
I'll change that in the next revision.
You should make the :type a list of characters so the widget is
more
user friendly
Agreed. I'll tidy that up as well once a solution is agreed upon.
(IME Org/Emacs patches require more discussion up front, so I'd
rather deal with that first
instead of putting too much time into a trivial patch up front)
So it looks like the remaining issue is whether or not it's worth
displaying the tag delimiters in the prompt. I'll think on it some
more and give it some time to see if anyone else has any arguments
in favor or against the idea. If I don't see anything by the
weekend, I'll amend the patch with the changes suggested above.