foam icon indicating copy to clipboard operation
foam copied to clipboard

Add support for block-level linking

Open robgrace opened this issue 4 years ago • 17 comments

(This is more of a core feature, rather than an enhancement, inasmuch as foam is trying to replicate Roam behavior):

Roam, and now Obsidian, provide support for block-level linking between markdown notes. It would be great if Roam could follow suit and provide this capapbilty.

Unfortunately, there are now three styles of intra-note linking to choose from:

  • Roam: ((block-id)) to text block (bullet) with internal block-id
  • Obsidian: [[NoteTitle#^block-id]] -- link to a text block annotated with ^block-id
  • Extended Markdown: [Description](#heading-id) -- link to a heading annotated with {#custom-id}

I vote for the Obsidian-style linking, since this is the format that I'd imagine most people will be co-editing with vscode.

robgrace avatar Oct 22 '20 18:10 robgrace

Hey @robgrace! Great suggestion, and one that had work started on it a while back:

Foam Sneak Peek: Block Referencing and Block Embedding

It's one of the features we want in Foam

ingalless avatar Oct 22 '20 19:10 ingalless

I really like the ^hash syntax at the end of a block. Is there any progress made or timeline specified when we can expect a first version that includes this feature? Have a nice Sunday everyone.

5hay avatar Mar 07 '21 14:03 5hay

Really need this feature.

kisnows avatar Apr 07 '21 12:04 kisnows

Hey, @ingalless. Definitely looks great! Is there any news, progress?

Long time, no see. If there's any way, I can participate in this, it would be nice.

khramoff avatar Apr 25 '21 18:04 khramoff

@khramoff @5hay I've not heard of any progress recently. Foam has been undergoing a lot of underyling changes as of late. If I hear any whispers I'll try remember to update this 👍🏻

ingalless avatar Apr 26 '21 13:04 ingalless

I'm looking forward to this feature, because I really need to re-arrange my blocks of notes in another way. Hope to hear of any progress.

Kcalb35 avatar Jun 06 '21 15:06 Kcalb35

It has been more than 1 year since the sneak peek video was uploaded and there is no block referencing (?). Any workaround?

ChenguangZhang avatar Sep 27 '21 12:09 ChenguangZhang

I vote for the Obsidian-style linking, since this is the format that I'd imagine most people will be co-editing with vscode.

+1. Dendron also uses the #^hash link format.

huyz avatar Oct 02 '21 19:10 huyz

I would still really like to see this

briansunter avatar Apr 26 '22 16:04 briansunter

Yes I agree, and the support for sections (#856) implicitly added support for blocks in the model (as a block can modeled as a "type" of section), now it would be a matter of changing the markdown parser to recognize the anchors. Then of course we'd need to add any convenience that we'd want to make blocks easy to use (to be discussed).

riccardoferretti avatar Apr 26 '22 17:04 riccardoferretti

Any news about this? I came from Obsidian and this feature is a really useful.

yummta avatar Oct 04 '22 00:10 yummta

As an alternative perspective, I thought I’d share a way you can achieve similar functionality in a foam-esque way. Another option along side using sections is to create your blocks as separate notes. Then, embed these “block notes using the embed syntax ![[Note Name]]. This way you gain the ability to link to blocks, also your blocks will show up in the graph and thus be more discoverable. Just one more option. I know this wouldn’t work for everyone but I wanted to share it.

On Mon, Oct 3, 2022 at 7:08 PM Paul Portillo @.***> wrote:

Any news about this? I came from Obsidian and this feature is a really useful.

— Reply to this email directly, view it on GitHub https://github.com/foambubble/foam/issues/294#issuecomment-1266226954, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSIXNMPKUSJV7DN34NDE7DWBNYQ7ANCNFSM4S3SW33Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

chrisUsick avatar Oct 11 '22 08:10 chrisUsick

I am wondering what's missing here. It looks like the requested feature is working. Although a minor issue needs to be fixed in the preview editor.

Or do we want to be able to work more granular then sections?

pderaaij avatar Dec 29 '22 19:12 pderaaij

The request here is to allow the linking at the block level, not only at the section level

riccardoferretti avatar Jan 02 '23 18:01 riccardoferretti

The one fix (or maybe checkbox option to select) is that Obsidian never released this feature as an in-line or seamless block. I would love to see that here.

john-okeefe avatar Feb 27 '23 17:02 john-okeefe

I'd love to see this added. And transcluding links at the block level too, including transcluding sub-list items if applicable.

ryanwwest avatar Jan 04 '24 15:01 ryanwwest