Hiding @done via a stylesheet


#1

Hi,

I’m trying to find a way to hide all items tagged with @done via the stylesheet. Basically, I would love for the stylesheet to just implement a “not @done” search. I know there are some ways to save the “not @done” search and use that, but it means that every time you switch contexts (by clicking on another tag in the sidebar) the done tasks come back. I’d rather make it so I can permanently hide them, and then have another stylesheet I could switch to for the few times I need to search my done tasks.

Of course, if there’s another way to do this, I’m all ears!

Thanks!


#2

You can’t hide items in the way that you want with the stylesheet. The best you could do is style them so that the text color matches the document background color. Then they wouldn’t be visible, but they would still take up space, and be editable… not recommended.

You also can’t permanently hide @done items in a document… only filter them out. Instead your options are:

  1. Simplest… just delete @done items. That’s pretty much always what I do.

  2. If you do need to be able to look back at old archived items one possibly is to archive them to a different file. So they will be removed from your current document, but added to a separate “Archive” document. This behavior isn’t build into TaskPaper, but there’s a script that automates the process for you:


#3

Thanks for the quick response, Jesse! The concern I have with the archiving method is that you lose the formatting of the original file (ie. I have multi-level projects. So task A under project 1-2-3-2 would just show up in a flat file as “task A”). If you look back in a month you probably don’t remember which project the task was under.

Is it possible to make a feature request to either hide all @done tasks regardless of what view you’re in? Or add that ability to the stylesheet?

Thanks again.


#4

When your script archives the item you can also have it attach the project name to the task… same as what happens when you use the build in archive command, and have “Preferences > Tasks > Add @project tag when archiving @done tasks” checked.

Sorry I don’t expect to add this. At some point in future I do hope to add additional views to TaskPaper. So instead of editing the text file directly like you do now, you could have a separate view that shows some projection of the underlying file. In these views it would be easier to show/hide all @done items. Since they wouldn’t have to worry about doing all of that in the text editor and remaining editable.