A @done filter?

I search for “not @done” all the time. I save the search, but that means I 1) have to save it in all of my lists, and 2) have to click on it to use it. I’m something of a keyboard fanatic, and looking for active tasks is pretty universal, so could we possibly add a “Not @done” filter (to the View menu?) that we could then assign our own shortcut key to (through OSX’s standard keyboard preferences)? This would save us from having to copy the search to every list, and make it easily to toggle with a keystroke.

As a more general request, being able to assign shortcut keys to any saved search would be even better.
And having always available common saved searches that were TaskPaper-wide, not just in a single list, would be even better than that.

Hi, you can save searches. See:

To save a “not @done” search add the following line to your TaskPaper document:

Not Done @search(not @done)

Once you do that you’ll be able to slick on “Not Done” in the sidebar to filter by that search.

Yeah, I think you caught my original text before I found that and changed it. Sorry about that; I stumbled on saved searches literally a few seconds after I posted originally, so I just went back and updated the request.

Same request, though, because saved searches are great but this one still deserves a special place. :slight_smile:

1 Like

Ok I see :slight_smile:

For the initial saved search implementation I decided to implement “in list”. Going forward at some point I think it makes sense to add an option for defining a set of saved searches that are applied to all documents without requiring that the documents have a @search tag for them. I’m not sure when I’ll add this, but I do think it makes sense.

Keyboard shortcut hasn’t come up much yet. Instead have you tried: Command-Control-F? That will popup a list of searches. It’s pretty fast. With that said I guess I can also create a menu of saved searches in the view menu. Then you’d be able to assign a keyboard shortcut through OS X system prefs.

Another option is to write a script and assign a keyboard shortcut for setting the script. That would work right now. Here’s what it would look like:

var TaskPaper = Application('TaskPaper')

function TPContextGetCurrentPath(editor, options) {
  editor.itemPathFilter = 'not @done'
}

var path = TaskPaper.documents[0].evaluate({
  script: TPContextGetCurrentPath.toString()
});
1 Like

I have used Cmd-Ctrl-F. It is fairly fast, but because it’s just a long list of tags and searches, you can (and I do) have multiple entries starting with the same character, which means I have to type multiple letters, and fast (otherwise the incremental search restarts). It’s great to have, don’t get me wrong, but for something as common as just looking at active tasks, I’d love to have it a lot faster.

Thank you very much for the script, and I have typed it in AppleScript and saved it to the default location, which is apparently on my iCloud drive. But in spite of the fact that I’m an IT consultant and have had Macs for almost ten years, I’ve never ever had a reason to deal with AppleScript, and I thus have no idea how to assign a keyboard shortcut to that script.

Plus, I assume that since it’s an AppleScript, that keyboard shortcut is global, i.e. not just within TaskPaper, which might restrict the key I can assign to it. Don’t worry about replying — I’ll Duck both of those things and figure it out.

(Just as an aside, one of the ramifications of having the searches in the list is that when I apply this “Not @done” filter, TP automatically expands the Search list. Which I don’t want. I guess I need to move the searches to the bottom of the list to minimize the impact.)

Thanks for all of the help!

There are a number of ways, but I think the way most recommended in these forums is to use https://www.keyboardmaestro.com.

Ahh, well, I probably wouldn’t have found that; I thought there was a way to do it in OSX generally. OK, I have Typinator, and I believe it will do something similar; if not, I have a license to the previous version of KM. Thanks, and this answers the “Two” part of my other post, so you can ignore that one. :slight_smile: