snippets/old_snippets/org-roam-capture-templates.md

1.2 KiB

title date draft snippet_types
org-roam capture templates 2021-04-06T11:29:54+02:00 false
org
emacs

Recently I've started using org-roam, so far so good. Utilizing capture buffers I create notes for work and my reefing aquarium hobby. Adding the roam tags manually became a pain so now I've figured out a way to prefill them with capture templates.

(setq org-roam-capture-templates
        '(("r" "reef" plain (function org-roam-capture--get-point)
           "%?"
           :file-name "%<%Y%m%d%H%M%S>-${slug}"
           :head "#+title: ${title}\n#+roam_tags: reef"
           :unnarrowed t)
          ("w" "work" plain (function org-roam-capture--get-point)
           "%?"
           :file-name "%<%Y%m%d%H%M%S>-${slug}"
           :head "#+title: ${title}\n#+roam_tags: work"
           :unnarrowed t)
          ("d" "default" plain (function org-roam-capture--get-point)
           "%?"
           :file-name "%<%Y%m%d%H%M%S>-${slug}"
           :head "#+title: ${title}\n"
           :unnarrowed t)))

source: https://www.reddit.com/r/orgmode/comments/lmlsdr/simple_question_re_orgroam_how_to_access_capture/