Save Search Expanded

I appreciate that TaskPaper will save a search by presenting only the top level of the list - most of the time. But sometimes I want to see the search results expanded. I have a daily list of things to do and it would be nice to see that entire list instead of clicking on the search and then option command right arrow for that list. Otherwise I need to build the search on a specific tag and put that tag on each and every line of that list instead of searching on the title of that list.

Is there a way to do this now in TaskPaper that I am not seeing If not, could this become a consideration in the future?

Thanks.

Could you provide some example?

When a (saved search on the sidebar) search finds an item, it does not auto-expand the item. When a “Go To Anything” search finds the same item, it expands it after finding it.

Example, I have an entry for things I set as goals for the day. This may overlap with actual goals, the point here is to have a free-form list similar to what I like to write out in a notebook.

I have a sidebar search that uses the search term “Daily Free Form Goal and Task List:”. This finds the list, and the list is always contracted. That is, none of the tasks under this are shown.

I also created a quick macro in Keyboard Maestro that uses “Go To Anything” with the term “Daily Free Form Goal and Task List:”. This search finds the same list, always expanded. That is, it is how I would like to see it with all of the tasks showing after I perform the search.

I am posting to ask if there is some way to get the same behavior from a sidebar search as I get in a “Go To Anything” search.

Added: I am also saying that in some instances I do not want the results of a sidebar search to be expanded. The current behavior is perfect the way it is. But in other instances I would like to see it do what I have here suggested.

Perhaps if Jessie has put this in as default sidebar search behavior he might consider adding a tick mark in the menu dialog for editing the search. Check your preference if search results expand or do not expand.

If I understand you correctly, you just need to use the “descendant-or-self” axis /// with the wild card * to match not only the item itself but also all its subitems. So, in your case you just need to append ///* to your search:

Daily Free Form Goal and Task List:///*

or better

project Daily Free Form Goal and Task List///*

This will show the item “Daily Free Form Goal and Task List” and expand it showing all its subitems as well.

If you do not want to see the subitems in some searches, just omit the ///* part.

Excellent. Thanks very much.

Added: This solves 90% of the problem. I am glad for the suggestion. But for some odd reason using the Find Anything method expands the tasks but not the notes. Actually, I like it this way. In such a list view I am more interested in the tasks and the notes are only there for more information on how I am setting up the list so I really don’t want to see this expanded every time.

In the wildcard method that you shared and I am now using, it expands everything, including the notes.

Just try ///not @type=note instead of the ///* part.

Thanks. I have to ask, where is this code written down? It looks like something I should study more about.

All this is documented in the TaskPaper User’s Guide, section Searches, subsection “Item Paths”.

1 Like

Hello,
My question may sound trivial but I think it is a step of the process describe above that I don’t get. I take note with Taskpaper, the structure is always the same, when I have for instance a meeting, I create a project i.e. “@MDD_Team 2019.12.03 Call with @SCC:” The first tag is a type of meeting, the second tag is a person. Then if I want to find all entries with @MDD_Team, I’ll make a search with this tag. Taskpaper will list me all the projects in the search result, but the following tasks are not expended, I just have the list of all project with@MDD_Team… What I would like to have is all the project AND all the subsequents task attached to a project. How do I do that? Thank you very much for any help.

I think you want:

@MDD_Team//*

That says find all items that descend from an item with the @MDD_Team tag.

Thank you for the rapid feedback.

When I type @MDD_Team//* in the Editor Search, nothing is found. This is the place where I have to type this instruction?

Sorry try @MDD_Team///* … one extra / means that it will match @MMD_Team tagged items even if they don’t have any child items. If that doesn’t do what you want can you post an example document showing the content that you are searching.

Thank you for the additional info. Here you see the result:

image image

What I would like to have is the line expended with the content as below ( I had to mark the text for obvious confidential reason)
image

I take notes by domain of activities and I mark topics when needed. My objective would be to be able to show when I make a search a specific domain with all related note section aggregated. I know It is not exactly the original objectif of the application, but that would be super handy to be able to do so.

Mmmm… The query Jesse gave you SHOULD work. Are you sure the tasks are a part of the project or are they not indented inside the project tagged as showed in your example? Can you make a fake file with fake information with similar structure. I may be able to help then.

1 Like

It does look like the indent problem.

TaskPaper project structure is encoded by tab indents. An item immediately following a colon-terminated project may look as if it belongs to that project, but its actually a following sibling – not a member of that project at all.

If you want things to descend from a project, they need to be indented under it.

See for example: Getting Started · TaskPaper User's Guide

Use Tabs to indent items under other items and create structure. Use Shift-Tab to undo this structure. Put these things together to make lists:

Groceries:
    - Eggs
    - Lettuce
    - Milk @priority(1)
1 Like