# Roam:title links not expanding properly

**URL:** <https://org-roam.discourse.group/t/roam-title-links-not-expanding-properly/1878>\
**Category:** Troubleshooting\
**Created:** [August 2, 2021, 3:18pm UTC](https://org-roam.discourse.group/t/roam-title-links-not-expanding-properly/1878 "2021-08-02T15:18:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![egrefen](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/egrefen/32/877_2.png) [@egrefen](https://org-roam.discourse.group/u/egrefen)\
**Post date:** [August 2, 2021, 3:18pm UTC](https://org-roam.discourse.group/t/roam-title-links-not-expanding-properly/1878/1 "2021-08-02T15:18:56Z")

</div>

I am using a fairly vanilla (no fancy custom config) installation of org-roam v2 on Doom Emacs.

Previously, in org-roam v1, I could type a partial title (or alias) and hit M-TAB to run `M-x complete-symbol`, select a title, and obtain a `[[roam:...]]` link, e.g. I would type `Rein<M-TAB>`, select “Reinforcement Learning”, and the text `[[roam:Reinforcement Learning]]` would be placed in the document. When the buffer was saved, this would be replaced with a relative file link. If, I added a description, e.g. `[[roam:Reinforcement Learning][RL]]`, then the description would be preserved when the conversion to the local filepath happened.

With org-roam v2, the above process still works with regard to completing a title to obtain a `[[roam:...]]` link, and if I save, this link is indeed converted to an `[[id:...]]` link with the title as a description. _However_, if I had added a description myself before saving (i.e. attached to the roam link as `[[roam:...][description]]`, my description is removed and replaced with the document title.

My two questions are:

1. Is this a bug, or have I somehow misconfigured things?
2. Is there a smarter way to quickly insert note links with custom descriptions while I’m typing?

---

<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:** [August 2, 2021, 4:23pm UTC](https://org-roam.discourse.group/t/roam-title-links-not-expanding-properly/1878/2 "2021-08-02T16:23:12Z")

</div>

That’s the current behaviour.

You could set this customizing variable to stop Org-roam from changing `[[roam:]]` links to `[[id:]]` links but roam links won’t appear in the backlinks buffer (the org-roam buffer). I don’t think that’s what you would like.

```auto
org-roam-link-auto-replace is a variable defined in ‘org-roam.el’.
Its value is t

  You can customize this variable.

Documentation:
If non-nil, replace "roam:" links to existing nodes with "id:" links.

```

Function `org-roam-link-replace-at-point` is responsible for converting and overriding the title for the `[[roam:]]` link after it is converted to an ID link.

Two suggestions: locally change its behaviour, or file a GitHub issue as a feature request; somebody would need to create a PR for it.

---

<div class="post-metadata">

**Author:** ![egrefen](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/egrefen/32/877_2.png) [@egrefen](https://org-roam.discourse.group/u/egrefen)\
**Post date:** [August 2, 2021, 6:10pm UTC](https://org-roam.discourse.group/t/roam-title-links-not-expanding-properly/1878/3 "2021-08-02T18:10:12Z")

</div>

I’m a little lost with regard to your answer, or perhaps I expressed myself unclearly: I _do_ want the substitution to happen, but I want it to preserve my description, as it did when the `roam:` to `file:` substitution happened in v1.

---

<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:** [August 2, 2021, 6:45pm UTC](https://org-roam.discourse.group/t/roam-title-links-not-expanding-properly/1878/4 "2021-08-02T18:45:01Z")

</div>

> [@egrefen](#):
>
> I _do_ want the substitution to happen, but I want it to preserve my description

Yes, that’s what I understood.  
Hence my suggestions:

> [@nobiot](#):
>
> Two suggestions: locally change its behaviour, or file a GitHub issue as a feature request; somebody would need to create a PR for it.

I don’t see it as misconfiguration.  
I see no way without changing the function (program change).

---

<div class="post-metadata">

**Author:** ![egrefen](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/egrefen/32/877_2.png) [@egrefen](https://org-roam.discourse.group/u/egrefen)\
**Post date:** [August 3, 2021, 8:49am UTC](https://org-roam.discourse.group/t/roam-title-links-not-expanding-properly/1878/5 "2021-08-03T08:49:25Z")

</div>

Ah I misunderstood your suggestion: you were saying I should modify `org-roam-link-replace-at-point` and/or create an issue about it. I’ll get onto that.

---

<div class="post-metadata">

**Author:** ![egrefen](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/egrefen/32/877_2.png) [@egrefen](https://org-roam.discourse.group/u/egrefen)\
**Post date:** [August 3, 2021, 9:12am UTC](https://org-roam.discourse.group/t/roam-title-links-not-expanding-properly/1878/6 "2021-08-03T09:12:06Z")

</div>

Issue raised here: [Make `org-roam-link-replace-at-point` preserve custom descriptions · Issue #1737 · org-roam/org-roam · GitHub](https://github.com/org-roam/org-roam/issues/1737)
