# How to insert an internal link in an org roam note?

**URL:** <https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754>\
**Category:** How To\
**Created:** [September 15, 2020, 6:07am UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754 "2020-09-15T06:07:52Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://org-roam.discourse.group/u/roi.holtzman)\
**Post date:** [September 15, 2020, 6:07am UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/1 "2020-09-15T06:07:52Z")

</div>

I want to add an internal link to a section inside an org roam note.  
The problem is that when I put the cursor on the link emacs thinks I want to create a new org-roam note.  
So I guess this is not the proper way to insert an internal link. How should I do it?

MWE:

```
* Section 1
:PROPERTIES:
:CUSTOM_ID: my_custom_id
:END:

* Section 2
see section [[#my_custom_id]]
```

---

<div class="post-metadata">

**Author:** ![sinqbad](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/sinqbad/32/414_2.png) [@sinqbad](https://org-roam.discourse.group/u/sinqbad)\
**Post date:** [October 1, 2020, 3:45pm UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/2 "2020-10-01T15:45:37Z")

</div>

1. Place the cursor over \* Section 1
2. `C-c L` to label the the section. A `:PROPERTIES:` drawer will appear along with a _generated_ id.
3. Copy the id
4. where "see section [[#my\_custom\_id]] instead, C-c C-l and select `id:` and paste the id.  
`org-toggle-link-display` shows the link as [[id:f27926b3-0333-4233-9c96-4d716d1fb5ee]] in my case.
5. This link will work on any file, the same one and outside files.

---

<div class="post-metadata">

**Author:** ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://org-roam.discourse.group/u/roi.holtzman)\
**Post date:** [October 1, 2020, 4:29pm UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/3 "2020-10-01T16:29:07Z")

</div>

Thanks!

Isn’t there a way to use some informative name for the label (i.e. the `custom_id`)?

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 2, 2020, 6:10am UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/4 "2020-10-02T06:10:09Z")

</div>

@roi.holtzman  
I do not know a way to use the `custom_id` property, but quick three examples to use the heading itself within a note:

 ![org-roam-link-to-heading](https://global.discourse-cdn.com/free1/uploads/orgroam/original/1X/20efe715abe928f0b93ee9480a0ea8d9143e92f5.gif)

The first example is a plain Org Mode’s capability, I think (I believe it’s called “fuzzy link”).

The second is an Org-roam capability.

The last example looks to be a bug (the asterisk “\*” should be inserted after “roam:” to be the same as the second example – not reported yet, I don’t think).

I believe if you want also a backlink for the heading, then you would need the ID property for the headline (but that does not seem to be what you are going for).

Here is the relevant [Org-roam manual page](https://www.orgroam.com/manual/Inserting-Links.html#Inserting-Links).

---

<div class="post-metadata">

**Author:** ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://org-roam.discourse.group/u/roi.holtzman)\
**Post date:** [October 4, 2020, 2:02pm UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/5 "2020-10-04T14:02:02Z")

</div>

Do you need to set something in order for that to work? I don’t have that functionality in my setup for some reason.

![org-link](https://global.discourse-cdn.com/free1/uploads/orgroam/original/1X/4a13e2c443db63005437448f546be900635f2853.gif)

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 4, 2020, 7:30pm UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/6 "2020-10-04T19:30:30Z")

</div>

Try Company mode.  
I believe [this post](https://org-roam.discourse.group/t/how-to-to-get-title-of-the-target-note-working-with-inline-autocomplete-in-org-roam/782) gives you some direction. You can jump to the section named “Configuration”.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 5, 2020, 4:57pm UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/7 "2020-10-05T16:57:26Z")

</div>

> [@nobiot](#):
>
> The last example looks to be a bug (the asterisk “\*” should be inserted after “roam:” to be the same as the second example – not reported yet, I don’t think).

This is now fixed. Lightening speed (⚡ ⚡), @jethro, thank you.

 ![org-completion-at-point-fixed](https://global.discourse-cdn.com/free1/uploads/orgroam/original/1X/35ceefbc01890ba7b0d091973b06897a235662cf.gif)

---

<div class="post-metadata">

**Author:** ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://org-roam.discourse.group/u/roi.holtzman)\
**Post date:** [October 26, 2020, 7:21pm UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/8 "2020-10-26T19:21:41Z")

</div>

How do you set the double bracket `[[link here]]` to stay there after the cursor goes out?

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 26, 2020, 8:54pm UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/9 "2020-10-26T20:54:26Z")

</div>

Like in the demo? That’s the standard behavior of Emacs I think. I don’t configure anything for that.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 26, 2020, 8:56pm UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/10 "2020-10-26T20:56:14Z")

</div>

Oh wait. What do you mean? You are not talking about cursor?

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 26, 2020, 8:57pm UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/11 "2020-10-26T20:57:19Z")

</div>

org-toggle-link-display or something. It’s a command (function that you can call interactively)

---

<div class="post-metadata">

**Author:** ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://org-roam.discourse.group/u/roi.holtzman)\
**Post date:** [October 26, 2020, 9:46pm UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/12 "2020-10-26T21:46:33Z")

</div>

Great! thanks!

When I put a link and the cursor is before the closing brackets `[[link|]]` (in the `|` sign), then `TAB` does not take me out of the link.  
Do you have the same behavior?

I use org-cdlatex which might cause problems here…

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 27, 2020, 7:28am UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/13 "2020-10-27T07:28:31Z")

</div>

Same in my Emacs.

I think that is deliberate design choice.  
I asked Jethro (believe it was somewhere in the forum); you may want to follow the link by a “\*” to further look for a headline within the note, like this: `[[link*headline]]` That’s why the cursor remains inside the bracket. I usually use `C-e` to get out as a link is almost always (for me) at the end of the line I am writing (because I’m in the middle of the writing).

---

<div class="post-metadata">

**Author:** ![WAKA](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/waka/32/668_2.png) [@WAKA](https://org-roam.discourse.group/u/WAKA)\
**Post date:** [February 22, 2021, 12:48pm UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/14 "2021-02-22T12:48:51Z")

</div>

Dear nobiot,  
Please check this link !  
I can not open this [Org-roam manual page], yet.  
Yours, WAKAMATSU

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [February 22, 2021, 5:29pm UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/15 "2021-02-22T17:29:20Z")

</div>

It’s probably easy for you to do the following:

1. Refer to the manual in Emacs (`C-h i`)  
If you are on Windows and use Doom, you may not easily have the in-system manual, if so, consider Option 2 below.
2. Go to [Org-roam User Manual](https://www.orgroam.com/manual.html), and find the page  
Search for the term you are looking for

---

<div class="post-metadata">

**Author:** ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://org-roam.discourse.group/u/roi.holtzman)\
**Post date:** [December 5, 2022, 7:38am UTC](https://org-roam.discourse.group/t/how-to-insert-an-internal-link-in-an-org-roam-note/754/16 "2022-12-05T07:38:38Z")

</div>

I wanted to update this thread for future reference.  
I am using org documents to export to latex.  
I find this solution for references very useful:

```auto
* Section 1
\label{sec:test}
reference to Sec. \ref{sec:test}

```
