Extract to linked block or section?

What I’m trying to do

Hi! New Obsidian user here. When I extract a section of a note to an existing note, I noticed that it leaves behind a link to or embedding of the whole note, as opposed to the new block or section that may have been created. I’d like it to be the case that when you extract text to a note, it leaves behind an embedding of exactly that text, not the full note we extracted to!

I think that this feature request might be saying the same thing. But it offers a current workaround which doesn’t seem to work for me; if I extract a block that includes a section header, it actually puts that section header in the search bar for what note to extract to. I don’t understand this behavior—is it intentional?

My real questions are:

  1. Is there a way to do this that I just haven’t been able to find? I couldn’t see anything on this forum or the user guide, but maybe I missed something.

  2. Does there exist a plugin that does something like this? If not, would this be a good first plugin? (Is it even possible to modify extraction behavior via a plugin, or would you essentially have to rewrite the extraction feature from scratch?)

Thanks for any pointers (including meta pointers on the nature or location of this post itself)!

1 Like

The text in the workaround was just an example demonstrating the request, not an actual workaround. I’ve moved the text to fix that.

Yes. If you have a note with the same name as the heading, it’s likely that’s the one you want to move the text to, so this helps with that. If there isn’t, it’s likely you want to make a new note with the same name as the heading, so it helps with that. If neither of those is true, it’s easy to type something else.

No, there isn’t a built-in way.

There might be a plugin; I don’t know of any and don’t know if it’s feasible.

1 Like

See this request: Extract to specified heading with Note Composer. Within the thread, there is a link to a very helpful Templater script by @AlanG that accomplishes what you are looking for: Extract to specified heading with Note Composer - #9 by AlanG. The script was originally posted by him on this thread Templater: open file in new tab and append to end of file - #10 by I-d-as.

I nearly marked it as a solution except for the fact that it doesn’t allow you to choose which heading in the target note to extract the block or heading into.

As a side note, If you scroll towards the bottom of the linked thread you will also see a post I made where I slightly altered AlanG’s script so that it creates bidirectional linking. Extract to specified heading with Note Composer - #13 by I-d-as

I could see someone developing a plugin that is like a new and improved Note Composer. It could have all types of additional functionality like these scripts accomplish, in addition to allowing for choice of Template, as discussed here: Extract to specified heading with Note Composer - #16 by I-d-as, then partially addressed here: Extract to specified heading with Note Composer - #17 by AlanG.

It could also update the resulting broken links that occur when an already linked-to heading is extracted, as requested here: Note Composer: links to blocks and headers should be updated when extracting.

Hope this helps! Good luck!

3 Likes

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