Maybe could be merged with: Explicit `sort` parameter in query syntax - #2
Good find, thanks. My request is a bit broader though. I wrote sorting order as an example but I think the other search options like auto-collapse or show-more-context would be similarly interesting for some workflows.
I too would like to see some code for the match case, collapse results, show context and change sort order options in search. So you can use them in embedded searches.
Would be great to have something like limit:5 to limit the number of search results in an embedded search.
My use case is to shown an embedded search with the last 5 contact moment with a certain person on their own page. Only from the daily’s folder as that is where I note my contactmoments.
The limit:5 would be great but especially the change sort order, maybe somthing like this:
sort:<asc / desc>:<cdate / mdate / name> would be great.
All other options could be set by a boolean value : TRUE / FALSE
Adding additional options that are available in sidebar searching pan to embedded queries. like mass collapsing etc
another thing I encountered is that search results can be very messy sometimes. Like when I search in blocks (block:()) I still get multiple answers for a single blocks. But the more reasonable sort of showing the results would be to add give me all the block which at least one search result been positive for them(no matter how manytimes). I think at least adding an option for this would be very helpful
I put together a plugin that tackles the UI portion of this FR. It will add a controls to all inline queries (in live preview and reading modes) that let you collapse, sort, enable context, copy, hide the title, and hide the results.
I have not tried tackling the scripting aspect of this yet but there are plugin settings which allow you to change the defaults for all of the actions listed above.
The plugin can be installed using the BRAT community plugin and adding the beta plugin repository “nothingislost/obsidian-embedded-query-control”.
Issues and suggestions can be raised on the Github repo located here: https://github.com/nothingislost/obsidian-embedded-query-control
Here’s a quick video showing off what it can do:
This is so AMAZING @NothingIsLost !! Thank you so much. This is EXACTLY what I wanted!
EVERYONE please please please show your appreciation for @NothingIsLost hard work if you get as much value out of this plugin as I am, by sending him some love with his Buy me a Coffee link below!
This is literally a game changer! I know I said that a lot, but this time I REALLY mean it haha
Embedded Query Control v0.2.1 extends the embedded query syntax to allow you to configure controls on a per query basis. The extended syntax looks like this:
```query path:foo tag:#obsidian title: custom query name collapsed: true | false context: true | false hideTitle: true | false hideResults: true | false sort: alphabetical | alphabeticalReverse | byModifiedTime | byModifiedTimeReverse | byCreatedTime | byCreatedTimeReverse ```
See the readme for more details https://github.com/nothingislost/obsidian-embedded-query-control/blob/master/README.md
Can’t wait to try it once it is available in the Community plugins …
Not a feature request. Just a question. Does it apply or affect backlinks, too?
Nice one @NothingIsLost – Please do post back here when it’s available via Community Plugins
I’m a fan! This looks great and I hope that it gets into the community plugins. AND, is added as a native feature.
I love this! will it become a community plugin?
Thank you so much @NothingIsLost. This plugin is really underrated !
Are you accepting PRs ? Do you plan to make it an official Community Plugin one day ?