Embedded Search for aggregating tasks from across files

Anyone able to help with an embeded query? I’m trying to include open tasks that fall under a section heading in my daily notes.

What I’m trying to do

I want to aggregate open tasks from various files into a single file via embedded search, but am having trouble forming the query to make that happen accurately.

Where I’m stuck

The query that sort-of works is:

 -file:("list.to_buy") section:("list.to_buy") task-todo:""

The issue is that something about this query is “greedy” and including to-dos from other sections of the same note.

I thought I could fix this with a simple grouping of criteria, but then I get nothing in the search results.

-file:("list.to_buy") section:(("list.to_buy") task-todo:"")

The intent is to be able to put a heading in my daily note like

# [[list.to_buy]]
- [ ] apples
- [ ] bread

and then navigate to the [[list.to_buy]] file which has the embeded query and see the apples and bread in there.

Appreciate suggestions and directions, here.

Thanks

Discord user “Murf” answered this for me.
Basically there is a bug in the section: search clause so the open task search needs to be replaced with regex.
Here is the template search:

```query
section:(/#+ .Section 1./ “[ ]”) OR section:(/#+ .Section 1./ section:("[ ]"))
```

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.