I need this line in every my org files. It's tedious to include it in everyone of them.
1 Answer
Currently I'm capitalizing on the org-export-before-parsing-hook
, which runs before the buffer is parsed by the back-end.
dir-local.el
((org-mode . ((org-export-before-parsing-hook . ((lambda (bach-end)
(goto-char 0)
(insert "#+SETUPFILE: ./assets/my-theme-readtheorg.setup\n")))))))
It won't actually alter your file.
For org-export-before-parsing-hook
is risky, you may consider to add it to safe-local-variable-values
to avoid Emacs's querying.
autoinsert.el
for a very simple system - I'm sure there are more complicated ones with more capabilities. DoC-v f auto-insert
and go from there. Also check the Emacs Wiki.