Script hooks on tags?

I don’t think this is currently possible but correct me if I’m wrong.

I would like to be able to attach a script to a tag, so I could command-click or right-click etc. on a tag and have it run a script with an optional argument (e.g. the tag value or encompassing line of text).

Presumably this could be implemented through a tag property in the style sheet?


item[data-call] {
run[display] {
 text-strikethrough-color: @text-color;
on-click: path/to/script/call.js

No, right now that is not possible. I think that @jessegrosjean explained why before, but it has something to do with the underlining TaskPaper engine. Right now Jesse is rewriting that engine from the ground up. The first program that will show a lot of those ideas and the new engine will be WriteRoom. TaskPaper should follow soon after. You should mention that to him just to make sure that it is on the roadmap sometime in the future.

In this case I think it’s a bit more then that… don’t think it makes sense to mix this sort of behavior into a stylesheet. And generally I’m not sure that it’s a good idea to change core behavior. I think mostly clicking a tag should just filter on the tag.

@derickfay can you expand a bit further and describe your larger goal?

mostly launching apps, opening specific documents, that kind of thing - but it can all probably be accomplished with popclip and/or services.