Is it possible to show only the tasks/projects that contain a specific tag?

Based on the suggestions in this thread regarding document organization i have consolidated all my projects into a single file. This is working ok except that now when i search for a given tag ie “@todo” there is a lot more noise from having to show the entire path for a given task/project.

Is there a way to only show the line of text that contains the actual tag without all the parents?

Currently when searching for @todo I get:

 Project A:
     Project A.1
         Task 1 @todo
 Project B:
     Project B.1
         Task 2 @todo

Would like to just see:

Task 1 @todo
Task 2 @todo

Thanks

I don’t really recommend, but you can do with a script. See this post:

Thx Jesse.

I tried to run the script from the linked post but get the following error:

I’m not sure, but I think maybe you are running an earlier version of macOS that doesn’t support some of the newer javascript syntax… what version of macOS are you running?

You can try this instead:

function HideAncestorsTaskPaperContextScript(editor, options) {
  var hideItems = []
  editor.displayedItems.forEach(function (each) {
  	if (each.hasChildren && !editor.isCollapsed(each)) {
		hideItems.push(each)
	}
  })
  editor.forceHidden(hideItems)
}

Application("TaskPaper").documents[0].evaluate({
  script: HideAncestorsTaskPaperContextScript.toString()
})
1 Like