Next: , Up: Anatomy of an Org-roam File   [Contents]


6.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:

  1. 'title: This extracts the title using the file #+title property
  2. 'headline: This extracts the title from the first headline in the Org file
  3. 'alias: This extracts a list of titles using the #+roam_alias property. The aliases are space-delimited, and can be multi-worded using quotes

Take for example the following org file:

#+title: World War 2
#+roam_alias: "WWII" "World War II"

* Headline
MethodTitles
'title’(“World War 2”)
'headline’(“Headline”)
'alias’(“WWII” “World War II”)

One can freely control which extraction methods to use by customizing org-roam-title-sources: see the doc-string for the variable for more information. If all methods of title extraction return no results, the file-name is used in place of the titles for completions.

If you wish to add your own title extraction method, you may push a symbol 'foo into org-roam-title-sources, and define a org-roam--extract-titles-foo which accepts no arguments. See org-roam--extract-titles-title for an example.