In a file I want to automatically include a list of all files whose name includes the name of the current file.
I don’t want to hard code the name of the current file in the query. I want the name of the current file to be included automatically. So currently I have this:
```query
file:"This file name"
```
but instead I want something like this:
```query
file:"{file.name}"
```
How can I do this?
I suspect I can do this with DataView but is there a way I can do this with query? (I prefer query because I think that’s built in, whereas DataView is a community plugin and I like to rely as little as possible on those, for security and resilience.
Ah, I’m always happy to see someone else who recognizes the value of the embedded search feature! Unfortunately I think what you’re asking about isn’t a thing.
A few times I’ve wanted to automatically include the current file name, not only in query blocks but in tasks and other places. Seems weird it’s not a feature.
If you can find a way to work templates into what you’re doing, you can use the {{title}} template tag (which will hard-code the name, but you won’t have to type it).