Case sensitivity in searches and autocomplete of tags

I think it would be great if autocomplete of tags offered completions on a case insensitive basis.
Not saying that @Item and @item should be equivalent tags, but rather, when returning a list of possible matches, both should be offered when @i or @I is typed.

Just pure curiosity. Why would you use upper case for a tag?

Oh, People’s names, that sort of thing…

I think I did initially implement these things in a case insensitive way, but then it was requested to make them case sensitive. I think I’ll keep as it is now. My logic being:

First it’s how things work currently, so requires no change of behavior.

Second it’s the most strait forward option and should make TaskPaper documents generally more consistent and easy to understand. For example if you see @done and @Done and @DONE tags all in the same document then there becomes a question… are they the same or not.

With all the various scripts and such that run through TaskPaper files I’m sure some script writers will come to one conclusion and other’s to another conclusion. Creating a mess. I think better to force case sensitive inside TaskPaper so that people keep the case consistent in tags that they expect to be equal. Then no question comes up if they are already all the same case.

So that’s all for how TaskPaper evaluates tags in searches and such.

I do think it’s OK to make autocomplete of tags case insensitive (maybe that’s all you were asking for in the first place) and I will add that to the next release.

1 Like

Thanks for the detailed response, and the plan re autocomplete. Just to be clear, I’m quite happy with case sensitivity when it comes to matching tags…
While on the subject of autocomplete, it would also be great if matching could be fuzzy for the case where you can’t quite remember the tag name. So autocomplete would offer @thisIsAreallyLongAndUselessTag when you type @really or @useless , not just @this. Just a thought.

Unfortunately I don’t think this is possible with the way that autocomplete currently works (I’m just plugging into Apples standard autocomplete system). I think the matches need to be exact otherwise you’d start to get messy behavior. The just released version 3.2 Preview supports the case-insensitive tags… also makes autocomplete a little less aggressive (only activates when editing at end of a tag) which has taken out some frustrating cases.

Thanks so much for implementing this. I think it’s wonderful.
One slight downside, which I hope doesn’t spoil anything for others. If you want to create a new tag that partially matches an existing one, Taskpaper follows the capitalisation of the existing tag and you have to go back and correct it.
I am happy to live with this for the convenience of being able to match tags without pressing the shift key.

I notice that with Preview 3.5 autocompletion of tags is once again Case Sensitive if you start by typing “@”. The workaround is to use cmd-T to add a tag using the nifty palette that comes up with a search field.
Trouble with that is, the tag is added at the end of the line, whereas I use a lot of tags inline. That works OK when I’m typing a new line because I can continue with text after the tag.
On the upside, this approach gets rid of the problem mentioned in my previous post about adding new tags, so maybe it’s better overall to leave it. Fascinating, these trade-offs. Too bad Microsoft software designers don’t get these subtleties. If they did we wouldn’t have the crappy user interface in Microsoft Office!

"That works OK when I’m typing a new line because I can continue with text after the tag."
Actually, the cursor is moved to the start of the tag. I can cmd-right arrow to get past it, but that’s unnecessary key strokes. Could we have the cursor at the end of the tag please? That would also mean that additional tags can be entered in order, if order matters to someone.

I am one vote for case IN-sensitive tags!
Reason - it is incredibly easy to accidentally capitalize a tag.

The @ key requires Shift-hold (on most keyboards).
Then, if typing quickly, very easy to produce @Tag instead of desired @tag.

What’s the upside of making it easy to mis-tag something?

Case sensitivity creates a world where one might think one is viewing and entire tag-class, but in fact several items are missing / hidden because of case issues.

What is the upside? Are there ~really~ people out there who want to search on

tag vs Tag vs TAg vs TAG as if these are different things??

My point is all about searching BTW - a search on TAG and tag should find all capitailzation versions of tags.

Or, make this a setting? Tag Case Sensitivity On/Off

My feeling is that anytime tags don’t match case is bad because adds confusion. Are these tags really the same, or not? Why are the cases different?

It’s true that if I make tag searches case insensitive it will help catch some accidental input cases. But it will also lead to more confusing TaskPaper documents generally because mixed case tags will be allowed. I think TaskPaper documents are always better off if tag case is consistent.

Because of that I don’t really want to allow it, or even make an option. What about if instead I built in some sort of check that would alert you when tag case is inconsistent? That would get rid of the error (or at least alert you too it) while keeping TaskPaper documents clean.

2 Likes

If accidents are an issue, Mac OS X has basic text replacement functionality located in System Preferences > Keyboard > Text

If that isn’t enough, Keyboard Maestro, TextExpander and TypeIt4Me are very capable of fixing repeated typing accidents.

Finally, if you want to insert tags without any errors, I’d recommend the script that I and @complexpoint worked on, which is here. I use this every day—I love it.