# How do I tweak capture-templates in Spacemacs?

**URL:** <https://org-roam.discourse.group/t/how-do-i-tweak-capture-templates-in-spacemacs/1157>\
**Category:** Troubleshooting\
**Created:** [January 12, 2021, 4:49am UTC](https://org-roam.discourse.group/t/how-do-i-tweak-capture-templates-in-spacemacs/1157 "2021-01-12T04:49:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vmobat](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/vmobat/32/611_2.png) [@vmobat](https://org-roam.discourse.group/u/vmobat)\
**Post date:** [January 12, 2021, 4:49am UTC](https://org-roam.discourse.group/t/how-do-i-tweak-capture-templates-in-spacemacs/1157/1 "2021-01-12T04:49:02Z")

</div>

I am new to spacemacs. I was able to install org-roam with  
(org :variables  
org-enable-roam-support t)

But I can’t figure out how to set up templates

Here is what I have in my user-config section

```
(defun dotspacemacs/user-config ()
   (with-eval-after-load 'org
        ///// a bunch of org-related properties
    )

(use-package org-roam
  :after org
  :hook (org-mode . org-roam-mode)
  :custom

(org-roam-directory "~/Dropbox/org/org-roam")

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

(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\#+TAGS:\n\n"
        :unnarrowed t)))
:bind
("C-c n l" . org-roam)
("C-c n t" . org-roam-today)
("C-c n f" . org-roam-find-file)
("C-c n i" . org-roam-insert)
("C-c n g" . org-roam-show-graph))
)

```

Pretty much everything works as intended with exception of templates  
when I do `org-roam-capture` provided template is completely ignored.

I’d greatly appreciate any pointers.

---

<div class="post-metadata">

**Author:** ![vmobat](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/vmobat/32/611_2.png) [@vmobat](https://org-roam.discourse.group/u/vmobat)\
**Post date:** [January 12, 2021, 5:24am UTC](https://org-roam.discourse.group/t/how-do-i-tweak-capture-templates-in-spacemacs/1157/2 "2021-01-12T05:24:53Z")

</div>

after browsing on GitHub and lurking for other people’s .spacemacs I was able to figure it out.  
posting it here for posterity.

(with-eval-after-load 'org  
(setq org-agenda-files (directory-files-recursively “~/Dropbox/org/” “\.org$”))

```
  (setq org-directory "~/Dropbox/org")
  (setq org-roam-directory "~/Dropbox/org/org-roam")
  (setq org-roam-dailies-directory "~/Dropbox/org/org-roam/daily/")
  (add-hook 'after-init-hook 'org-roam-mode)

  (spacemacs/set-leader-keys
    ;; "arl" 'org-roam
    "aordd" 'org-roam-dailies-find-today
    ;; "arf" 'org-roam-find-file
    ;; "arg" 'org-roam-graph
    )
  (spacemacs/set-leader-keys-for-major-mode 'org-mode
    "rdd" 'org-roam-dailies-find-today
    "rdy" 'org-roam-dailies-find-yesterday
    "rdt" 'org-roam-dailies-find-tomorrow
    "rdc" 'org-roam-dailies-date
    "rdh" 'org-roam-dailies-find-previous-note
    "rdl" 'org-roam-dailies-find-next-note
    )

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

  (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\#+TAGS:\n\n"
          :unnarrowed t)

          ("p" "probability" plain
          (function org-roam-capture--get-point)
          "%?"
          :file-name "%<%Y%m%d%H%M%S>-${slug}"
          :head "#+TITLE: ${title}\n#+CREATED: %U\n\#+TAGS: probability\n\n"
          :unnarrowed t)

          ("a" "algo" plain
          (function org-roam-capture--get-point)
          "%?"
          :file-name "%<%Y%m%d%H%M%S>-${slug}"
          :head "#+TITLE: ${title}\n#+CREATED: %U\n\#+TAGS: algorithms\n\n"
          :unnarrowed t)

          ("o" "optimization" plain
          (function org-roam-capture--get-point)
          "%?"
          :file-name "%<%Y%m%d%H%M%S>-${slug}"
          :head "#+TITLE: ${title}\n#+CREATED: %U\n\#+TAGS: optimization\n\n"
          :unnarrowed t)))
  )

```

)
