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:
Is this a bug, or have I somehow misconfigured things?
Is there a smarter way to quickly insert note links with custom descriptions while I’m typing?
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.
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.
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.
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.