Here is a small snippet that I find useful - when inserting an org-roam link:
- if region is active, use the selection as default suggestion to a link
- if region is not active, just do the usual org-roam-insert
This way you can quickly enrich an existing text with links.
I bind it to key instead of
(defun org-roam-insert-dwim () "Insert an org-roam link. If there is a region active, use it as name." (interactive) (push (if (region-active-p) (capitalize-dwim '(buffer-substring-no-properties (region-beginning) (region-end))) (thing-at-point 'symbol)) regexp-history) (call-interactively 'org-roam-insert))