todotxt / todo.txt

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

Start task with @context #3

Closed karbassi closed 3 years ago

karbassi commented 6 years ago

From @bjorngi on December 14, 2014 0:10

According to the specifications of todo.txt format all context must be preceded with a space, but if you start a task with a context, does this rule apply to this? Or is @work call This Dude about+theAwesomeProject a valid task?

Copied from original issue: todotxt/todo.txt-cli#149

karbassi commented 6 years ago

From @inkarkat on December 16, 2014 10:31

The specification is quite clear, but at least the todo.txt-cli implementation also supports projects and contexts at the very beginning of a line. Note: If you automatically add a date, this becomes a non-issue.

karbassi commented 6 years ago

From @bjorngi on December 16, 2014 16:52

But the spescification does not require a date. So I think the specification should be revised to make this issue clear. Not that it's a big issue, but for people developing on the todo.txt spec.

karbassi commented 6 years ago

From @kalafut on January 14, 2015 18:43

I agree with @bjorngi that this part of the spec is unclear. To have in the same document an a example of a valid task: @GroceryStore Eskimo pies, and shortly thereafter: "A context is preceded by a single space and an @ sign", isn't clear.

While we're at it, why have the "a single space" requirement? This seems to go against the overarching "completely unstructured" goal of the format.

My    @work task  

should be parsed as "@work" being a context, IMHO.

I think the spec for projects and contexts should be reworded to something like: "The first character of a context is: @. This first character of a project is: +. Projects and contexts are preceded by whitespace, or appear at the start of the line."

zagortenay333 commented 6 years ago

Tbh, the only spec you have is that picture in the readme, and it's pretty ambiguous. I remember having trouble figuring out some stuff when I was making my own todo.txt client. E.g., it says that the completion date must be specified if the creation date is, but how is that gonna be done if the user forgot to add creation date.

Perhaps, a rewrite of the spec should be done. In words, not pictures. I'd be willing to work on it.