Not really an answer to your initial question, but you might also want to look at the
[x]it! plain text file format. It's very similar to todo.txt, but I find it a bit cleaner and easier to organize around status and projects. Tags can have different values assigned to them. I also like that you can add a separate description area to each item for additional task notes.