From 7eb479e3f79e81a32fd934ef3fe7ffc70ea95955 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 29 Mar 2019 03:40:56 -0400 Subject: [PATCH] config/literate: set config.el as default target --- modules/config/literate/init.el | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/modules/config/literate/init.el b/modules/config/literate/init.el index ed551e0e3..4eb3b8d18 100644 --- a/modules/config/literate/init.el +++ b/modules/config/literate/init.el @@ -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)) - (or (and (if (fboundp 'org-babel-tangle-file) - (org-babel-tangle-file org nil "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)))) - ;; 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!"))))) + (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 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 %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!")))))) ;; Let 'er rip!