diff --git a/manual.html b/manual.html index 7f317b8..9c987ae 100644 --- a/manual.html +++ b/manual.html @@ -99,7 +99,7 @@ General Public License for more details.
-Anatomy of an Org-roam File +Files -
-Titles +File Titles
+File Tags + +
+ The Templating System
-Next: Anatomy of an Org-roam File, Previous: Installation, Up: Top [Index]
+Next: Files, Previous: Installation, Up: Top [Index]Next: The Templating System, Previous: Getting Started, Up: Top [Index]
The bulk of Org-roam’s functionality is built on top of vanilla Org-mode. -However, to support additional functionality, Org-roam adds several -Org-roam-specific keywords. +
In Org-roam, notes typically consist of multiple files, where each file is a +zettel. +
+While the bulk of Org-roam’s functionality is built on top of vanilla Org-mode, +Org-roam adds several Org-roam-specific keywords to support additional +functionality. +
+This section explains the important components of a file, and the extensions to +Org-mode.
• Titles: | + | |
• File Titles: | ||
• Tags: | + | |
• File Tags: | ||
• File Refs: |
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”. +
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
@@ -821,6 +834,8 @@ The aliases are space-delimited, and can be multi-worded using quotes.
'alias
If no title is provided, Org-roam defaults to using the file-path. +
• Customizing Title Extraction: |
• Customizing Tag Extraction: | + |
'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
.
-
-'first-directory
: Extracts the first 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 foo
.
-Org-roam calls org-roam--extract-tags
to extract tags from files. The variable
+org-roam-tag-sources
, to control how tags are extracted.
+
Sources to obtain tags from. +
+It should be a list of symbols representing any of the following extraction +methods: +
+'prop
+ Extract tags from the #+roam_tags
property.
+ Tags are space delimited.
+ Tags may contain spaces if they are double-quoted.
+ e.g. #+roam_tags: TAG "tag with spaces"
+
'vanilla
+ Extract vanilla org-mode tags, including #+FILETAGS
and
+ inherited tags.
+
'all-directories
+ Extract sub-directories relative to org-roam-directory
.
+ That is, if a file is located at relative path foo/bar/file.org,
+ the file will have tags “foo” and “bar”.
+
'last-directory
+ Extract the last directory relative to ‘org-roam-directory’.
+ That is, if a file is located at relative path foo/bar/file.org,
+ the file will have tag \“bar\”.
+
'first-directory
+ Extract the first directory relative to org-roam-directory
.
+ That is, if a file is located at relative path foo/bar/file.org,
+ the file will have tag “foo”
+
By default, only the 'prop
extraction method is enabled. To enable the other
-extraction methods, you may modify org-roam-tag-sources
:
+extraction methods, you may modify org-roam-tag-sources
, for example:
(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.
+
Adding your own tag extraction method requires two steps. First, define a method
+(defun org-roam--extract-tags-foo (file) ...)
, where foo
a self-prescribed
+name for the tag extraction method. This method takes the file path as an
+argument, and returns a list of strings (titles). Finally, push the symbol foo
+into org-roam-tag-sources
. You may need to rebuild the cache from scratch to
+re-process all files to pick up the new tags.
-Next: Concepts and Configuration, Previous: Anatomy of an Org-roam File, Up: Top [Index]
+Next: Concepts and Configuration, Previous: Files, Up: Top [Index]This protocol finds or creates a new note with a given roam_key
(see Anatomy of an Org-roam File):
+
This protocol finds or creates a new note with a given roam_key
(see Files):
org-roam-link-auto-replace
:org-roam-link-title-format
:org-roam-link-use-custom-faces
:org-roam-tag-sources
:org-roam-title-sources
: