# Extract to linked block or section?

**URL:** <https://forum.obsidian.md/t/extract-to-linked-block-or-section/70691>\
**Category:** Help\
**Tags:** ui-ux\
**Created:** [November 4, 2023, 8:07pm UTC](https://forum.obsidian.md/t/extract-to-linked-block-or-section/70691 "2023-11-04T20:07:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thorimur](https://forum.obsidian.md/user_avatar/forum.obsidian.md/thorimur/32/56359_2.png) [@thorimur](https://forum.obsidian.md/u/thorimur)\
**Post date:** [November 4, 2023, 8:07pm UTC](https://forum.obsidian.md/t/extract-to-linked-block-or-section/70691/1 "2023-11-04T20:07:59Z")

</div>

### 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](https://forum.obsidian.md/t/feature-request-add-an-option-to-embed-the-section-level-or-block-level-link-to-the-extracted-section-in-current-note/43347) 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)!

---

<div class="post-metadata">

**Author:** ![CawlinTeffid](https://forum.obsidian.md/user_avatar/forum.obsidian.md/cawlinteffid/32/82899_2.png) [@CawlinTeffid](https://forum.obsidian.md/u/CawlinTeffid)\
**Post date:** [November 7, 2023, 5:09pm UTC](https://forum.obsidian.md/t/extract-to-linked-block-or-section/70691/2 "2023-11-07T17:09:20Z")

</div>

> [@thorimur](#):
>
> I think that [this](https://forum.obsidian.md/t/feature-request-add-an-option-to-embed-the-section-level-or-block-level-link-to-the-extracted-section-in-current-note/43347) 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?

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

> [@thorimur](#):
>
> 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?

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.

> [@thorimur](#):
>
> Is there a way to do this that I just haven’t been able to find?

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.

---

<div class="post-metadata">

**Author:** ![I-d-as](https://forum.obsidian.md/user_avatar/forum.obsidian.md/i-d-as/32/59965_2.png) [@I-d-as](https://forum.obsidian.md/u/I-d-as)\
**Post date:** [November 8, 2023, 4:38am UTC](https://forum.obsidian.md/t/extract-to-linked-block-or-section/70691/3 "2023-11-08T04:38:37Z")

</div>

See this request: [Extract to specified heading with Note Composer](https://forum.obsidian.md/t/extract-to-specified-heading-with-note-composer/67901). 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](https://forum.obsidian.md/t/extract-to-specified-heading-with-note-composer/67901/9). 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](https://forum.obsidian.md/t/templater-open-file-in-new-tab-and-append-to-end-of-file/69519/10).

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](https://forum.obsidian.md/t/extract-to-specified-heading-with-note-composer/67901/13)

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](https://forum.obsidian.md/t/extract-to-specified-heading-with-note-composer/67901/16), then partially addressed here: [Extract to specified heading with Note Composer - #17 by AlanG](https://forum.obsidian.md/t/extract-to-specified-heading-with-note-composer/67901/17).

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](https://forum.obsidian.md/t/note-composer-links-to-blocks-and-headers-should-be-updated-when-extracting/37534).

Hope this helps! Good luck!

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [February 6, 2024, 4:39am UTC](https://forum.obsidian.md/t/extract-to-linked-block-or-section/70691/4 "2024-02-06T04:39:25Z")

</div>

Closed on February 6, 2024, 4:39am UTC

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