How to add another template and set it as default?

I am very new to org-roam (and quite new to emacs), so please forgive my ignorance.
I want to add another template (which adds some more lines to the header), and set it as default.
How can I do that? I saw the example in the docs, but it does not explain this (as far as I’ve understood).

You need to modify the variable org-roam-capture-templates:

(setq org-roam-capture-templates
      '(("d" "default" plain
         (function org-roam-capture--get-point)
         "%?"
         :file-name "%<%Y%m%d%H%M%S>-${slug}"
         :head "#+TITLE: ${title}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n\n"
         :unnarrowed t)
        ("D" "default copy" plain
         (function org-roam-capture--get-point)
         "%?"
         :file-name "%<%Y%m%d%H%M%S>-${slug}"
         :head "#+TITLE: ${title}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n\n"
         :unnarrowed t)))
2 Likes

Why would we need two identical templates?

It was a proof of concept to illustrate my point.

1 Like

Ok thanks. Just to be sure :wink: