config/literate: set config.el as default target
This commit is contained in:
parent
7488b51e9a
commit
7eb479e3f7
1 changed files with 15 additions and 14 deletions
|
@ -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!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue