Org Roam
Table of Contents
1. Titles
To easily find a note, a title needs to be prescribed to a note. A note can have many titles: this allows a note to be referred to by different names, which is especially useful for topics or concepts with acronyms. For example, for a note like “World War 2”, it may be desirable to also refer to it using the acronym “WWII”.
Org-roam calls ‘org-roam–extract-titles’ to extract titles. It uses the variable ‘org-roam-title-sources’, to control how the titles are extracted. The title extraction methods supported are:
‘'title’: This extracts the title using the file ‘#+TITLE’ property ‘'headline’: This extracts the title from the first headline in the Org file ‘'alias’: This extracts a list of titles using the ‘#ROAMALIAS’ property. The aliases are space-delimited, and can be multi-worded using quotes
Take for example the following org file:
2. Tags
Use #+ROAMTAGS property Org-roam calls ‘org-roam–extract-tags’ to extract tags from files. It uses the variable ‘org-roam-tag-sources’, to control how tags are extracted. The tag extraction methods supported are:
‘'prop’: This extracts tags from the ‘#+ROAMTAGS’ property. Tags are space delimited, and can be multi-word using double quotes. ‘'all-directories’: All sub-directories relative to ‘org-roam-directory’ are extracted as tags. That is, if a file is located at relative path ‘foo/bar/file.org’, the file will have tags ‘foo’ and ‘bar’. ‘'last-directory’: Extracts the last directory relative to ‘org-roam-directory’ as the tag. That is, if a file is located at relative path ‘foo/bar/file.org’, the file will have tag ‘bar’.
By default, only the ‘'prop’ extraction method is enabled. To enable the other extraction methods, you may modify ‘org-roam-tag-sources’:
(setq org-roam-tag-sources '(prop last-directory))
If you wish to add your own tag extraction method, you may push a symbol ‘'foo’ into ‘org-roam-tag-sources’, and define a ‘org-roam–extract-tags-foo’ which accepts the absolute file path as its argument. See ‘org-roam–extract-tags-prop’ for an example.
3. File refs
Refs are unique identifiers for files. Each note can only have 1 ref. For example, a note for a website may contain a ref:
These keys come in useful for when taking website notes, using the ‘roam-ref’ protocol (see Roam Protocol).
Alternatively, add a ref for notes for a specific paper, using its org-ref citation key:
The backlinks buffer will show any cites of this key