I have an init file called
#+BEGIN_SRC #+END_SRC blocks for elisp code)
I would like to generate
settings.el from it, so that I can load it inside
How would I accomplish this?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
After some research this is the solution I managed to find:
:tangle yes to each block of code you want to export
\#+BEGIN_SRC emacs-lisp :tangle yes elisp code... \#+END_SRC
Then inside the .org file use
This will create a file with the same name but with the
In my case I generated
settings.el and included it in
This can be automated with
(org-babel-load-file) to directly load the org file.
But I personally prefer the extra step, to make sure I know what I'm loading and when.