Next: , Up: Daily-notes   [Contents]


15.1 Configuration

For org-roam-dailies to work, you need to define two variables:

Here is a sane default configuration:

(setq org-roam-dailies-directory "daily/")

(setq org-roam-dailies-capture-templates
      '(("d" "default" entry
         #'org-roam-capture--get-point
         "* %?"
         :file-name "daily/%<%Y-%m-%d>"
         :head "#+title: %<%Y-%m-%d>\n\n")))

Make sure that org-roam-dailies-directory appears in :file-name for your notes to be recognized as daily-notes. You can have different templates placing their notes in different directories, but the one in org-roam-dailies-directory will be considered as the main one in commands.

See The Templating System for creating new templates. org-roam-dailies provides an extra :olp option which allows specifying the outline-path to a heading:

(setq org-roam-dailies-capture-templates
      '(("l" "lab" entry
         #'org-roam-capture--get-point
         "* %?"
         :file-name "daily/%<%Y-%m-%d>"
         :head "#+title: %<%Y-%m-%d>\n\n* Lab notes\n* Journal"
         :olp ("Journal"))

        ("j" "journal" entry
         #'org-roam-capture--get-point
         "* %?"
         :file-name "daily/%<%Y-%m-%d>"
         :head "#+title: %<%Y-%m-%d>\n\n* Lab notes\n* Journal"
         :olp ("Lab notes"))))

The template l will put its notes under the heading ‘Lab notes’, and the template j will put its notes under the heading ‘Journal’. When you use :olp, make sure that the headings are present in :head.