Special link format for in-document search

Use case

When Iā€™m in a document, I might want to save a few frequently used searches for quick access in the future. The current option is to execute that search, and copy the entire URL.

Proposed solution

Have a special link format that will do the above. Some syntax along the lines of [Search name](search://parent:#todo -is:completed). This link will search for everything after search://, but only in the current document. This makes this search more portable and you donā€™t need to replace the hardcode document link.

An alternative solution might be to have search histories, but the limitation is that due to the screen space limit, only the 10-15 most recent searches can be accessed conveniently. The link syntax might be more flexible. Related feature request: Feature Request: Search History


P.S. This idea is not my own! I think Iā€™ve heard it before, either in one of the email support tickets or on the forum. Iā€™m curious to see how many people are interested in this.

4 Likes

Both serve different searches.

The one with portability and re-usability is more appealing esp for ā€œpre-conditionedā€ searches, while the search history addresses sporadic and ad-hoc ones.

And I needed both. The desktop app seriously lacks history page of a web browser.

1 Like

Would a shortcut to copy the URL of the current view help? Or do you need to actually look at the URL?

I canā€™t say that Iā€™ve been missing this feature (special link format), butā€¦I guess it never hurts? :slight_smile:

Right now, URLs such as https://dynalist.io/#q=hello already do a global search.

Maybe we just need a special query param that indicates a search local to the current document, or current node and its children?

Maybe something like:

https://dynalist.io/#q=hello&z=doc

https://dynalist.io/#q=hello&z=parent

https://dynalist.io/#q=hello&z=kefiejflzielaazzsqm

Right now you already use the z query param to restrict a search to a particular node ID and its children. Maybe just reserve the keyword ā€œdocā€ to always indicate the current doc, and ā€œparentā€ to always indicate the parent node of wherever the URL resides.

That would make the search URL portable. You can cut/copy to another document or node and it will always work as expected.

As for search history, I do think that is very useful, even if you only support 5 or 10 most recent searches. Right now CTRL/CMD O already have a history of recent docs. (I only see 5 recent ones. It would be nice to support 10 for bigger screens.)

I think CTRL/CMD F should also have a history of at least 5. That would be super convenient.

Thanks!

1 Like

Hi @Erica
Can you help to clarify the above? I could not relate that to anything else ā€¦ did you actually mean ā€œto extractā€ rather than ā€œto excludeā€?

It was a typo, fixed! :sweat_smile:

I would LOVE this!!!

Thanks for your input, @David_Eiffert! And welcome to the community! :heart: