0
Fixed

Some characters do not trigger the tag auto suggestion

ChrisCN 12 years ago updated by Alex Jenter 12 years ago 1
I use special characters as prefix to tags or as part of tags.
Here are a few examples:
:[Task]
:[Task]/()open
:[Task]/()open/(..)inProgress
:[Task]/()open/(#)planned
:[Task]/()open/(~)later
.public

If I type such special characters into the search box or inside of the 'add tags' dialog I get different results:

"~" suggests "(~)later" as expected
"."
suggests ".public" but NOT "(..)inProgress"
"#" no suggestion
"(#" no suggestion
"(" no suggestion
":" suggests ":[Task]" as expected
"[" no suggestion
and so on...

I am not sure if you will consider this as a bug - at least it is strange and inconsistent. Is there an explanation for this behaviour? Is this necessary or can it be fixed?
searching organizing

Answer

Answer
Fixed
Completed in V1.8

 

Here is how it works:
All tags are tried to find out which should be suggested.
1) First, tag beginning is matched, verbatim
2) If 1 fails, tag is split into parts treating any non-alpha symbol as a separator. Then all resulting parts (which are alphanumeric) are matched from the beginning.

Example:
All tags: #tag1, tag2/subtag, tag3/#subtag
You have entered: #
 #tag1 is tried - tag beginning matches => #tag1 is suggested
 tag2/subtag is tried - beginning doesn't match, splitting gives ['tag2', 'subtag']. From these parts, none match.
 tag3/#subtag - begginning doesn't match, splitting gives ['tag3', 'subtag'], also no match.

So as you can see, the behavior you are observing is explained by the algorithm.
I think the algorithm could be improved introducing a two-stage split: first, split by '/' and match all child tags, then, split by punctuation.
Answer
Fixed
Completed in V1.8