config/literate: set config.el as default target

This commit is contained in:
Henrik Lissner 2019-03-29 03:40:56 -04:00
parent 7488b51e9a
commit 7eb479e3f7
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -18,20 +18,21 @@ byte-compiled from.")
(when (or force-p (file-newer-than-file-p org +literate-config-cache-file))
(message "Compiling your literate config...")
(setq org (file-truename +literate-config-file))
(let* ((org (file-truename +literate-config-file))
(dest (concat (file-name-sans-extension org) ".el")))
(or (and (if (fboundp 'org-babel-tangle-file)
(org-babel-tangle-file org nil "emacs-lisp")
(org-babel-tangle-file org dest "emacs-lisp")
;; We tangle in a separate, blank process because loading it
;; here would load all of :lang org (very expensive!).
(zerop (call-process
"emacs" nil nil nil
"-q" "--batch" "-l" "ob-tangle" "--eval"
(format "(org-babel-tangle-file %S nil \"emacs-lisp\")"
org))))
(format "(org-babel-tangle-file %S %S \"emacs-lisp\")"
org dest))))
;; Write the cache file to serve as our mtime cache
(with-temp-file +literate-config-cache-file
(message "Done!")))
(warn "There was a problem tangling your literate config!")))))
(warn "There was a problem tangling your literate config!"))))))
;; Let 'er rip!