Within the last few days, I’ve noticed an unexpected new behavior when I select a region of text and call org-roam-node-insert
and then create a new node. When I follow that procedure, I end up with something like this: “ramenramen”.
For example, say I’m working on a note for a specific ramen recipe, and I want to create a master ramen recipes node called “Ramen Recipes”. In the text of the current note, I just want the word “ramen” to be the link, like this: “This recipe is one of my favorite ways to do ramen”.
In the past, I would select the word “ramen”, call org-roam-node-insert
, type out “Ramen Recipes”, hit enter, get prompted from the capture window which template to use, write out whatever I want that node to include in the capture window, and then finish capture. That would result in the word “ramen” being a link to the node “Ramen Recipes”. Currently, as I said above, I get this: “This recipe is one of my favorite ways to do ramenramen”.
Note that this does not happen when linking to an existing node. So, if I later wanted to link to the “Ramen Recipes” node using the word “recipes” in some other note, it would work as expected: select “recipes”, call org-roam-node-insert
, select the node “Ramen Recipes”, hit enter, and end up with “Of all the recipes I have, this one is my second favorite”.
Looking at the code for org-roam-node-insert
, I see that if there’s an existing node, it includes the function to delete the region, but if it’s a new node, it calls org-roam-capture
, which has its own function for finalizing the link: org-roam-capture--finalize-insert-link
, which from my limited elisp knowledge looks like it also ought to delete the existing region and replace it with the link.
If anyone has suggestions for either settings to change or how to update my workflow, I’d appreciate it.
Potentially relevant system info:
macos 11.4
gnuemacs 28.0.5
org-mode 9.4.5
org-roam 2.0.0
I have delete-selection-mode t
globally enabled.