Org-roam
Table of Contents
:ID: 7514BB0A-9713-4C61-9FFD-6C93BC0F0374 :ROAM_REFS: https://foo.com :ROAM_ALIASES: “Org-roam stuff”
Org-roam online manual See also Org-mode basics
# V1
# Settings
You can define these anywhere, but it makes sense to define them at the top along with the Org-mode Export Settings. See example in this file.
roam_alias
is a title alias. Useful when finding files.roam_tags
is for categorization. Also useful when finding files.roam_key
is a reference. Shows notes with that reference as a link in the backlinks buffer.
# Capture Templates
Example with two templates.
(setq org-roam-capture-templates '(("d" "default" plain #'org-roam-capture--get-point "%?" :file-name "%<%Y%m%d%H%M%S>-${slug}" :head "#+title: ${title}\n" :unnarrowed t) ("t" "test" plain #'org-roam-capture--get-point "%?" :file-name "%<%Y%m%d%H%M%S>-${slug}" :head "#+title: ${title}\n" :unnarrowed t)))
%^{Input}
to ask for “Input” value when initiating the capture.%i
Active region when capture was called.- Org-mode template expansion docs
# Linking Notes
org-roam-insert
One cool trick is to link to a heading in a note. After the filename add
::*Header Name
.
[[file:note.org::*My heading][Note - My Heading]]
# V2
# File links
- Now uses an ID property.
- A map of IDs to file paths is stored in
.org-id-locations
file, the location of which is determined by the variableorg-id-locations-file
# Creating and ID manually
- In the note’s buffer, run
(org-id-get-create)
. This will create a properties drawer with the:ID:
property and guuid. - Then run
(org-id-update-id-locations)
. This can also take a file path argument. See also https://org-roam.discourse.group/t/how-to-auto-generate-org-id-following-org-roam-find-file-immediate/1412 - Finally run
org-roam-db-sync