1

I've been reading this and this, trying to figure out how to have an org-mode in-buffer settings template such as this:

# # -*- mode: org -*-
# # -*- coding: utf-8 -*-
#+TITLE: $1
#+AUTHOR: `(user-full-name)`
#+DATE: `(format-time-string "%e %B %Y")`
...

actually evaluate the back-quoted expressions and the $ markup upon .org file creation. This is, BTW, my init code for auto-insert

(use-package autoinsert
  :ensure t
  :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 "\\.org?$" "default-org.org"))

where default-org.org begins like the first code section. But again, when I call into existence a file with a .org none of the back-quoted expressions have been evaluated, the expressions are returned verbatim. What am I missing here?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.