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