I'd like to insert
#+SETUPFILE: ~/.emacs.d/org-templates/level-0.org
to each .org
file that I intend to publish.
I opened the variable auto-insert-alist
but I cannot figure out where to paste my insert.
Can you help?
Can I add auto-insert-alist
to my init file instead of customizing it in Quick Customization window?
EDIT:
I found this code here
(use-package autoinsert
:init
;; Don't want to be prompted before insertion:
(setq auto-insert-query nil)
(setq auto-insert-directory (locate-user-emacs-file "templates"))
(add-hook 'find-file-hook 'auto-insert)
(auto-insert-mode 1)
:config
(define-auto-insert "\\.html?$" "default-html.html"))
This would work for me. But I didn't understand this line
(setq auto-insert-directory (locate-user-emacs-file "templates"))
Do I need to create a templates
file?
#+SETUPFILE: ~/.emacs.d/org-templates/level-0.org
in the function. It looks very complicated (my elisp is not that good)