Skip to content

Literate Emacs Configurations

Graham Marlow edited this page Feb 28, 2025 · 3 revisions

Org Mode allows you to express your Emacs configuration as an Org Mode file instead of an Emacs Lisp file, allowing you to turn your Emacs configuration into a literate program. You can convert Start Emacs into a literate program by following these steps (inspired by this post by Harry Schwartz):

  1. Create a new file next to your Init File, called configuration.org.

  2. Cut and paste all of your Init File into configuration.org within a Emacs Lisp source block:

# configuration.org
#+begin_src elisp
  ;; Paste your init.el here...
#+end_src
  1. Replace the contents if your Init File with a call to Org Babel, executing configuration.org as a literate program:
;; init.el
(org-babel-load-file (expand-file-name "configuration.org" user-emacs-directory))

Your Emacs configuration is now a literate program!

Clone this wiki locally