Support linking to graphs and search (like it works in bookmarks)

Use case or problem

It would great to have the possibility to create a link to a specific bookmark in the body of a note.

Proposed solution

A link syntax for bookmarks
for example
[bookmark:“bookmark name”]

Behavior

clicking on the link would do the following:

bookmarked graph → opens the graph
bookmarked search → opens the search in the search panel
bookmark folder → opens the folder in the bookmark panel

Current workaround

  • linking to a search:
    [an_example](obsidian://search?vault=O&query=example)

  • for a bookmark folder or a bookmarked graph, I write the name of the bookmark as a reminder in the note where I could need it

9 Likes

I still really miss that one, a simple way to create a inline link to a bookmark.

Can’t believe that I am the only one who needs it…

I have the same (or similar) issue. Is there a way to link to bookmarks so that I can create a MOC that assembles links to notes as well as bookmarks? I ask this because the way I use bookmarks in Obsidian is how I use bookmarks in the analogue way, that is to attach bookmarks to specific pages or paragraphs in books. I don’t usually create stand-alone notes for every interesting idea I come across in a book I’m reading but I want to be able to assemble and retrieve interesting ideas from various sources when I am working on an academic article.

I don’t understand what this would actually do. Can you explain more specifically what it would do, or what you are trying to do?

For example, if you click on the link to a bookmark, where would it “take” you? Would it highlight and select the bookmark in the bookmarks pane?

Or would it take you to where that bookmark points? In that case, why not just skip the middle step, and make a block link directly?

Likewise, I don’t understand what benefit you see in linking “to a bookmark”. Because it sounds like you are describing block quotes. You can already link to a specific paragraph in your note. That is block links. Plus you can also make a bookmark to a specific block.

Bookmarks: Bookmark block under cursor, or right-click and Bookmark this block...


Not trying to doubt either of you. Just curious for more details to understand what it is you’re looking for.

thanks for your precise question

you’re right that it wouldn’t make that much sense to have a inline link to bookmarked note

but for
a bookmarked search → opens the search in the search panel
a bookmarked graph → opens the graph

pretty powerful to be able to link those two inside a note in my opinion!

2 Likes

Thanks! I knew - but forgot - that you can bookmark all those other types of elements.

Also now with more details of what you’re trying to do, some other people may have additional workarounds for now.

Thanks for this. I’ve been using Obsidian less than a week so I hadn’t discovered these features yet (linking to block quotes, etc.). So thanks!

…and I forgot to add that
there is actually a work-around for linking to a search:

[an_example](obsidian://search?vault=O&query=example)

not as easy as linking a bookmark could be but it works well…

So actually this post all boils down to graph inline linking, which could be resolved with the adding of a bookmark linking syntax

no workaround that I know of at the moment…

Would changing the title of this thread to graph inline linking make it more clear?

Perhaps. I was confused by the mention of graph in your original post. Now it’s more clear.

Do you have a suggestion?

“Support linking to bookmarkable elements in notes and graph view”

“Support links (notes and graph) to all the types of things that can be bookmarked”

Whatever is clear and matches your intention?

1 Like

thanks I updated the title and the initial description of the feature request :crossed_fingers:

1 Like

I’d love to be able to link to bookmarked graphs

2 Likes

I absolutely need it too

as a new user its one of the first things i tried to do, and Im kinda shocked it doesnt work

is there any other way to link to a graph view with preconfigured search conditions?

is there any other way to link to a graph view with preconfigured search conditions?

Direct linking to a graph is not possible at the moment…
alternatives are:

  • saving the graph as a bookmark
  • copying the graph filter query in your note to have it ready next time you need it.

This becomes even more useful since we can now bookmark webviewer tabs. I wonder if the Advanced URI plugin could help with this?

I would also appreciate the ability to add inline clickable links to trigger bookmarked searches. thanks for the workaround provided here

re the clickable link workaround, i just asked chatgpt to show me examples of how to format these links, and the clever thing suggested an AHK script to automate the process. it works;

; AutoHotkey v1 script: Create Obsidian search URI from user input

; Hotkey: Ctrl+Alt+s
^!s::
    InputBox, userQuery, Obsidian Search Link, Enter your search query:
    if ErrorLevel
        return  ; User cancelled
    
    ; Percent-encode reserved characters
    encodedQuery := UriEncode(userQuery)

    ; Construct the URI
    vaultName := "Obsidian"
    searchURI := "obsidian://search?vault=" . vaultName . "&query=" . encodedQuery

    ; Format as markdown link
    markdownLink := "[Search: " . userQuery . "](" . searchURI . ")"

    ; Copy to clipboard
    Clipboard := markdownLink
    MsgBox, 64, Obsidian Search Link, Markdown link copied to clipboard:`n`n%markdownLink%

    ; Optional: Uncomment this to immediately open the search in Obsidian
    ; Run, %searchURI%
return

; Function: URI percent-encode special characters
UriEncode(str) {
    static chars := " !""#$%&'()*+,/:;<=>?@[\]^`{|}~"
    out := ""
    Loop, Parse, str
    {
        c := A_LoopField
        if InStr(chars, c)
            out .= "%" . Format("{:02X}", Asc(c))
        else
            out .= c
    }
    return out
}

I completely agree. I got here looking for a way to link to a folder, but I could also especially use the link to a search. I hadn’t even thought of that before, but I can think of quite a number of cases it would be useful.

Thought I would mention that you could use the core Obsidian URI search action to open the Search tab with a specific search:

obsidian://search?vault=my%20vault&query=Obsidian

e.g.

  • [search: penguins](obsidian://search?vault=ANNEX&query=penguins) opens the ANNEX vault’s Search tab with penguins pre-filled.

For linking to Bookmarks, you can use the Advanced URI community plugin to open Bookmarked notes and graphs:

obsidian://adv-uri?vault=VAULT-NAME&bookmark=BOOKMARK-TITLE&openmode-tab

e.g.

  • [open bookmark: penguin](obsidian://adv-uri?vault=ANNEX&bookmark=penguins&openmode-tab)
  • [open bookmark: graph view 1](obsidian://adv-uri?vault=ANNEX&bookmark=Graph-view1&openmode-tab)

renamed this FR for clarity.