Skip to content

Creating and Linking Nodes

Org-roam makes it easy to create notes and link them together. There are 2 main functions for creating nodes:

  • org-roam-node-insert: creates a node if it does not exist, and inserts a link to the node at point.
  • org-roam-node-find: creates a node if it does not exist, and visits the node.
  • org-roam-capture: creates a node if it does not exist, and restores the current window configuration upon completion.

Let’s first try org-roam-node-find. Calling M-x org-roam-node-find will show a list of titles for nodes that reside in org-roam-directory. It should show nothing right now, since there are no notes in the directory. Enter the title of the note you wish to create, and press RET. This begins the note creation process. This process uses org-capture’s templating system, and can be customized (see The Templating System). Using the default template, pressing C-c C-c finishes the note capture.

Now that we have a node, we can try inserting a link to the node using M-x org-roam-node-insert. This brings up the list of nodes, which should contain the node you just created. Selecting the node will insert an id: link to the node. If you instead entered a title that does not exist, you will once again be brought through the node creation process.

One can also conveniently insert links via the completion-at-point functions Org-roam provides (see Completion).