Search or dataview all links start with or contain a special character

What I’m trying to do

When I process literature note, I like to create [[A transient note to capture the concept]]. However I usually don’t write these notes directly, and the wording at first tend to change a lot so I don’t click on each link to create the new file for them.
I’m thinking of marking a transient note with [[~ A special character to mark note to elaborate later]], so by query all links (with file already created or not) contain/start with that character, I effectively have an writing inbox of all transient notes.
The problem is haven’t found away to search or query all of the links, regardless of whether the corresponding file have been created or not.

Basically I just want a more permanent version of the suggestion popup when I type [[~ in edit mode.

Things I have tried

With search:

  • file: ~ ... only match file already created that contain this special character.
  • line: [[~ ... will list all appearances of a link contain that character. This leads to a lot of duplication.

I have look at dataview but I can’t find a way to write the WHERE clause for this condition.

Does anybody know a way to achieve this?

Does file:~ work? It would pick up any files with ~ in the filename.

Thanks for your answer, but no, it would only pick up file already created. Not [[~Link that have not been created / click on yet]].
The reason I want to avoid click on those link is because often time they change a lot, or I simply forgot to click on it to create when doing my literature notes.

A habit for writing inbox is only effective if I can assure myself that all transient notes are collected there, so I want to avoid that state of mind of constantly double check myself if I have created a file or not.

Could you just search (in the search bar) for [[~ ?

A quick test seems to work:

Or a simple static query:


Gives me this:

1 Like

Thank @Erisred. I tried that but that would duplicate all the appearance of that link. For example if you also mentioned [[~ link that doesn't exist]] in another note ([[2021-05-14]]) for example, that would also appear as a second entry in the search result.
That would be OK if I cleaned the writing inbox often before it got messy, but still not ideal.

1 Like

I’m closing this in favor of this feature request for a link: ... search query. Thank all.

You can also do the following as a RegEx-based search query: line:/\[\[.*~.*\]\]/.

Or just line:/\[\[~.*\]\]/ for only links beginning with ~.

The Vantage plugin can help you generate these kinds of complicated search queries.

1 Like

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