Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguity in the current todo.txt "spec" #70

Open
camoz opened this issue Jan 19, 2022 · 9 comments
Open

Ambiguity in the current todo.txt "spec" #70

camoz opened this issue Jan 19, 2022 · 9 comments

Comments

@camoz
Copy link

camoz commented Jan 19, 2022

The current spec of the todo.txt format (I'm referring to the README.md in this repo) contains several ambiguities, as is shown by some issues, e.g.

It would greatly help to have a precise, unambiguous specification. This way, programs can interoperate better which each other. It should not be too hard to make one, since the format seems quite simple. IMO, the current situation is quite bad, the README.md gives a general overview about the todo.txt format, but there are things left unspecified and things that contradict each other.

This is of course a different issue from the issue talking about versioning.

@clach04
Copy link

clach04 commented Sep 11, 2022

@camoz recommend closing this, looks like spec was updated to remove ambiguity on these two points.

@camoz
Copy link
Author

camoz commented Sep 16, 2022

@clach04: Where was the spec updated? Since I created this issue there was no commit to this repo, and no activity on the issues I linked.

Also, the two mentioned issues were merely random examples to illustrate my point.

@clach04
Copy link

clach04 commented Sep 16, 2022

@camoz for number 2 see https://github.com/todotxt/todo.txt/blob/master/description.svg - I take it to be optional - EDIT see #70 (comment) this point is wrong!

for number 1 - completion rule 2 https://github.com/todotxt/todo.txt#rule-2-the-date-of-completion-appears-directly-after-the-x-separated-by-a-space which indicates priority is removed. NOTE this does mismatch with https://github.com/todotxt/todo.txt/blob/master/description.svg but I think the text version is definitive and clear (but that's my opinion 😉 )

I recommend checking the cli implementation https://github.com/todotxt/todo.txt-cli as it's seen as the reference one to check it's behavior.

Simpletask for Android (third party) does:

x date (A) date text

where (A) is the original priority so it's not really following the text spec properly.

I'm speculating that this changed in the spec after you posted your question, you can run annotate/blame to determine timeline.

@clach04
Copy link

clach04 commented Sep 16, 2022

@camoz lol, I may have proved your point about spec being unclear as I made a mistake when posting the above message! 😆

Completion date is required as per completion rule 2 https://github.com/todotxt/todo.txt#rule-2-the-date-of-completion-appears-directly-after-the-x-separated-by-a-space - my comment about about the svg showing optional is wrong!

@drbogar
Copy link

drbogar commented Oct 29, 2022

Which version is correct? There is still a contradiction in the description.

  • What is mandatory and what is not?
    • According to the svg image, both the completion date and the creation date are optional, but if the completion date is specified, the creation date is mandatory.
    • According to the text description, the completion date is mandatory and the creation date is optional.
  • What is the correct order?
    • The svg image shows the priority immediately after the completion mark.
    • According to the text description, the priority is placed after the completion date and the creation date.

Do I understand that the text description is correct?

@clach04
Copy link

clach04 commented Oct 31, 2022

Which version is correct?

I believe text version is definitive, SVG is incorrect/not-strictly-correct.

Do I understand that the text description is correct?

That is my understanding, and matches the reference implementation:

mymachine:~/shell/todo.txt-cli$ todo add "test issue 70"
1 test issue 70
TODO: 1 added.
mymachine:~/shell/todo.txt-cli$ todo ls
1 test issue 70
--
TODO: 1 of 1 tasks shown
test issue 70
mymachine:~/shell/todo.txt-cli$ cat ~/todo.txt
test issue 70
mymachine:~/shell/todo.txt-cli$ todo done 1
1 x 2022-10-30 test issue 70
TODO: 1 marked as done.
x 2022-10-30 test issue 70
TODO: /home/pi/todo.txt archived.
mymachine:~/shell/todo.txt-cli$ todo ls
--
TODO: 0 of 0 tasks shown
mymachine:~/shell/todo.txt-cli$ cat ~/todo.txt
mymachine:~/shell/todo.txt-cli$ cat ~/done.txt
x 2022-10-30 test issue 70
mymachine:~/shell/todo.txt-cli$

Similar example with priority:

mymachine:~/shell/todo.txt-cli$ todo add "(A) important test issue 70"
1 (A) important test issue 70
TODO: 1 added.
mymachine:~/shell/todo.txt-cli$ todo ls
1 (A) important test issue 70
--
TODO: 1 of 1 tasks shown
mymachine:~/shell/todo.txt-cli$ cat ~/todo.txt
(A) important test issue 70
mymachine:~/shell/todo.txt-cli$ todo done 1
1 x 2022-10-30 important test issue 70
TODO: 1 marked as done.
x 2022-10-30 important test issue 70
TODO: /home/pi/todo.txt archived.
mymachine:~/shell/todo.txt-cli$ cat ~/done.txt
x 2022-10-30 test issue 70
x 2022-10-30 important test issue 70

@drbogar
Copy link

drbogar commented Nov 5, 2022

What if I also have a creation date?
What if I also want to keep the priority of completed tasks?

@callegar
Copy link

The description image underlines that creation date must be specified if completion date is, but then the very examples in this issue at #70 (comment) have a completion date with no creation date... sigh.

@callegar
Copy link

callegar commented May 1, 2023

Also having two alternate ways to specify priority (as (...) and pri:...) seems weird, particularly given the fact that only one is allowed for completed tasks. How about non completed tasks? Can you use either one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants