Insert a link without creating a node

Is it possible using org-roam v2 to insert a link without creating a node?

If not, how do you handle quickly adding links to nodes you aren’t ready to populate yet? Do you just leave lots of empty nodes hanging around? I’m concerned this will clutter my node search and lead to wasted time visiting nodes hoping for content, only to discover they are empty.

The other idea I had was just not adding a link until I am ready to create the node, but this seems painful to backfill links since there may be many unlinked references by the time I create the node.

I am likely over optimizing here, and empty nodes probably aren’t going to cause much practical issue, but thought I would check with the community in case I’m misunderstanding the org-roam linking workflow.

Background

In Mediawiki, one nice feature is you can link to articles that do not yet exist, and clicking the link allows you to create the article with its initial content. The benefit of this is you don’t create articles until you are ready to put things in them, so no empty articles are lingering about - every search result is a non-empty article. This also means wiki article count isn’t erroneously including empty articles, so you have a better idea of the true size of your wiki.

Research

I saw a previous post asking this for V1, but it seems org-roam-insert-immediate no longer exists in v2, and that it likely created a empty node anyways since it relies on a capture template.

1 Like

This works for me

(defun org-roam-node-insert-immediate (arg &rest args)
  (interactive "P")
  (let ((args (cons arg args))
        (org-roam-capture-templates (list (append (car org-roam-capture-templates)
                                                  '(:immediate-finish t)))))
    (apply #'org-roam-node-insert args)))

Iirc I’ve seen it in System Crafters video

Thanks for the suggestion. That System Crafters video is what convinced me to give org-roam a try.

The template you gave avoids popping up the capture window, but an empty node is still created. I was hoping for a process that avoids creating lots of empty nodes.

Maybe it would be easier to filter out empty nodes from the org-roam-node-find? I’ll see how things go as my roam database grows (already at 30+ nodes after a week of light use, ~50% are empty or nearly empty).

1 Like