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

Wishlist: per todo file configuration #588

Open
callegar opened this issue Nov 23, 2023 · 2 comments
Open

Wishlist: per todo file configuration #588

callegar opened this issue Nov 23, 2023 · 2 comments

Comments

@callegar
Copy link

Feature Request

Description:

It is unclear to me whether the todo.txt specifications has a provision for comment lines in the file (e.g. lines starting with # getting ignored).

In case there is such a provision, it would be great if sleek could interpret a header or a trailer of specially crafted comments as a local configuration specific to the todo file. This would be similar to the emacs local variables in case you are an emacs user.

IMHO this would have a few advantages:

  • it would make the configuration portable with the todo file (e.g. you can copy over the file to another machine and have it ready with its own setup);
  • it would make it more robust to specify the archiving destination per file;
  • it would make it possible to have a filtering setup per file (e.g., you may want not to see completed tasks in your main todo.txt, but you definitely want to see them in an archive of completed tasks);
  • it would make it possible to pre-declare contexts and projects without having to resort to (hidden) fake tasks.

Note that currently sleek seems to have no notion of a comment marker.

@swantzter
Copy link

This seems similar to my #556 issue.

@callegar
Copy link
Author

callegar commented Dec 1, 2023

Thanks for linking to your #556 issue, which pointed at the discussion on todotxt/todo.txt#1.

From there it seems to me that there is strong resistance in adding a comment marker and that the idea is that comments are perceived as unneeded because of the hidden task extension (h:) that is the official way to declare stuff, like contexts or projects.

So I suggest using precisely that. A hidden task with a sleek_cfg:1 tag could be used to store sleek local variables in a todo.txt file. In this case, the todo text could get parsed for variable assignments (e.g.: done_archive="..." filter_completed=true filter_by_threshold=true lang=it).

This would not break any other application trying to use the same todo.txt file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

3 participants