I have following config for my org-roam:
(use-package org-roam
:ensure t
:init
(setq org-roam-v2-ack t)
:custom
(org-roam-directory "~/roamnotes")
(org-roam-completion-everywhere t)
(org-roam-capture-templates
'(("d" "Default" plain
"%?"
:if-new (file+head
"%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+filetags: :nohtmlexport:\n#+date: %U\n#+auto_tangle: nil") ;; I want to split this long line
:unnarrowed t)
))
:config
(org-roam-setup)
(require 'org-roam-dailies)
(org-roam-db-autosync-mode)
)
What I want to do: To split long line: "#+title: ${title}\n#+filetags: :nohtmlexport:\n#+date: %U\n#+auto_tangle: nil"
.
What I've tried so far I: This works without an error, but stylistically looks very bad. (Just bad indent)
...
...
(org-roam-capture-templates
'(("d" "Default" plain
"%?"
:if-new (file+head
"%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}
#+filetags: :nohtmlexport:
#+date: %U
#+auto_tangle: nil")
:unnarrowed t)
))
...
...
)
What I've tried so far II: This stylistically desirable, but this gets an error:
(org-roam-capture-templates
'(("d" "Default" plain
"%?"
:if-new (file+head
"%<%Y%m%d%H%M%S>-${slug}.org"
(concat
"#+title: ${title}\n"
"#+filetags: :nohtmlexport:\n"
"#+date: %U\n"
"#+auto_tangle: nil"
)
)
:unnarrowed t)
))
org-roam-capture--fill-template: Wrong type argument: char-or-string-p, (concat "#+title: ${title}
" "#+filetags: :nohtmlexport:
" "#+date: %U
" "#+auto_tangle: nil")
Question:
- Why I can't use
concat
insideorg-roam-capture-templates
as written in above? - If it's possible to use
concat
(or anything else), how to implement it?