Unlinked block mentions?


I’m new to Obsidian and I saw that block references are now a feature in the latest insider build. I’m on personal right now but I’m considering purchasing catalyst if what I’m looking for is a feature right now with the block references:

Does obsidian pick up unlinked block mentions just like regular ones so that you can link them?

This is what’s kept my eyes on Roam Research the last few days but unfortunately (real) privacy and security aren’t a thing with their product atm so Obsidian is the choice for me.

One problem I have that this would solve is that I like to structure markdown pages with headers in list items (only way to indent headers and what’s below them in markdown without some css mess I think). Obsidian doesn’t pick up the headers when they’re list items so these block references would provide a solution.

Also, may I ask how long these releases usually stay insider-restricted? Or in other words: how long after such releases do official releases usually appear that make these features available for everyone?

Thanks for your time!

I think I’ll need some clarification before I can answer properly, but here’s an attempt. With Obsidian’s implementation, if you type [[^^, Obsidian initiates a vault-wide autocomplete search for whatever you type next. Every line’s a candidate for a new block. You can scope that instead by initiating the search with just [[^ (the current note) or [[Some note^ (I think that’s the syntax) for lines in Some note. Once you’ve selected a line, Obsidian converts the link to the format [[The note#^someblockid]], randomly generating someblockid if it doesn’t already exist and appending that to the target line in its context like this:

some line ^someblockid

The lines need not be pre-declared for this search to pick them up. Everything you’ve ever written is available for referencing/embedding. That said, you can declare ahead of time if you know something will be referenced. That allows you to provide descriptive IDs, like so:

e = mc2 ^massenergyequivalence

Is your goal visually indenting the headers or is there some function to listing/indentation? If visual indentation’s all you want, I’m sure #custom-css could solve your problem without needing listing or including tabs in the content.

It depends, of course, on Insider feedback—the real purpose of the program is to test features in early release to learn from users’ experience. But generally a week or so? Don’t quote me on that!

You actually answered another question that I would’ve asked, thanks! I was originally referring to the “Unlinked mentions” section in the right sidebar of Obsidian (standard layout). However, I just realized that this functionality is already restricted to note names and does not expand to headers, so it probably doesn’t currently work with blocks uids. Thanks anyways!

Visually indenting is indeed my only concern. However, when addressing this with css I quickly ran into the problem of not being able to also accordingly indent everything that belongs to the header section in the preview pane. That is because every section just has a div with the class “markdown-preview-section” which wraps its contents. So there is no way I’m aware of to address a header and everything that belongs to its section in css.
If you are aware of a workaround I’d like to hear that! Thanks!

1 Like

Ah, shoot, I think you’re right. CSS does include provisions for adjacent selectors, but I don’t think there’s a way to make such a selector work for an arbitrary number of siblings (e.g., select every element until the element contains a new heading)…

And you are correct, there’s no way to see unlinked mentions of blocks in the mentions pane (yet).

Yes, unfortunately CSS is limited in that way. Are you aware of a way to manipulate markdown documents with JS? I could use python-markdown but for me it’s just too much friction to have it output the html in the obsidian markdown files and not being able to use autocomplete and all of that…

The Obsidian plugin API will be one way! I’m sure there’re others but I don’t know of them. Make sure you check out the plugins channel in the Discord chat though.

Thanks for pointing that out. I’ve been looking for a way to access obsidian’s outputted html and that might be the way to do it!

Note the “will be”: it is not yet released. Soon, hopefully!