todotxt / todo.txt

‼️ A complete primer on the whys and hows of todo.txt.
GNU General Public License v3.0
2.32k stars 102 forks source link

Priority Can Include Characters Description Does Not State It Can Include #24

Open sydneyfalk opened 5 years ago

sydneyfalk commented 5 years ago

I think I may have found either a bug or a missed opportunity for data validation.

Creating a task with (A-) as the priority seemed to work -- it's stored that way, it's prioritized just under 'A', etc.

However, the stated requirements are one English alphabet letter, A-Z, uppercase only. So this probably is unintentional.

(Having said that, when I did see that (A-) worked, I was pleased as punch about the idea we could divide things more finely that way -- however, A+ comes 'after' A. So I figure it's probably unintentional behavior. It'd be neat if it did do 'plus and minus', but I understand that might run counter to the minimalist nature of the tool, too. So not requesting that by any means, but if it's interesting enough to anyone to run with, I wouldn't be unhappy about it.)

(Also, I'm not 100% sure if this should be under the CLI. I haven't tested it with any other interfaces, but I have no idea if they're doing validation above and beyond or what. Sorry if this is in the wrong place!)

devingfx commented 3 years ago

I think right now the +/- sign is ordered alphabetically (without math meaning)...

Btw, I'm not against the idea, but having already 26 level of priority isn't enough? Do you really needs 26 * 3 = 78 level of priority?

loziniak commented 3 years ago

having already 26 level of priority isn't enough

Can be troublesome if you want to put one task just after all (A)s but before (B)s. Then you have to change all Bs to C, all Cs to D etc.

It'd be neat if it did do 'plus and minus'

Sorting is done probably using ASCII codes (at least in Sublime Text when I press [F9], as I use it), so maybe instead of + you can use !, as it has code 33, which is sorted before )'s code 41?