Next: File Refs, Previous: Titles, Up: Anatomy of an Org-roam File [Contents]
Tags are used as meta-data for files: they facilitate interactions with notes where titles are insufficient. For example, tags allow for categorization of notes: differentiating between bibliographical and structure notes during interactive commands.
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:
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.