Skip to content

Instantly share code, notes, and snippets.

@brainplot
Created March 4, 2020 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brainplot/1ea347e9134a6fcde70dddfea3e35056 to your computer and use it in GitHub Desktop.
Save brainplot/1ea347e9134a6fcde70dddfea3e35056 to your computer and use it in GitHub Desktop.
Byte-compile emacs configuration upon startup, if it's changed
(let ((config-org (concat user-emacs-directory "main-config.org"))
(config-el (concat user-emacs-directory "main-config.el")))
(if (file-newer-than-file-p config-org config-el)
(progn
(message "TANGLING THE CONFIG")
(org-babel-load-file config-org)
(run-with-idle-timer 10 nil
(lambda ()
(byte-compile-file config-el)
(message "CONFIG BYTE COMPILED"))))
(load-file config-el)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment