fix(literate): load doom core when tangling
This exposes Doom's stdlib to the sub-process that tangles your literate config, so that src blocks therein (or their header arguments) can call upon them or reference its variables (like IS-LINUX et co). Fix: #6588
This commit is contained in:
parent
e7d56f2ce7
commit
043d32fefd
1 changed files with 4 additions and 6 deletions
|
@ -66,16 +66,14 @@
|
||||||
(start-process "tangle-config"
|
(start-process "tangle-config"
|
||||||
(get-buffer-create " *tangle config*")
|
(get-buffer-create " *tangle config*")
|
||||||
"emacs" "--batch"
|
"emacs" "--batch"
|
||||||
|
"--load" (doom-path doom-core-dir "core")
|
||||||
|
"--load" (doom-path doom-core-dir "autoload/print")
|
||||||
"--eval"
|
"--eval"
|
||||||
(prin1-to-string
|
(prin1-to-string
|
||||||
`(progn
|
`(funcall #',(symbol-function #'+literate-tangle)
|
||||||
(require 'cl-lib)
|
|
||||||
(require 'subr-x)
|
|
||||||
(load ,(doom-path doom-core-dir "autoload/print"))
|
|
||||||
(funcall #',(symbol-function #'+literate-tangle)
|
|
||||||
,+literate-config-file
|
,+literate-config-file
|
||||||
,(concat doom-module-config-file ".el")
|
,(concat doom-module-config-file ".el")
|
||||||
,doom-private-dir)))))
|
,doom-private-dir))))
|
||||||
(add-hook 'kill-emacs-hook #'+literate-tangle-check-finished-h)
|
(add-hook 'kill-emacs-hook #'+literate-tangle-check-finished-h)
|
||||||
(set-process-sentinel +literate-tangle--async-proc #'+literate-tangle--async-sentinel)
|
(set-process-sentinel +literate-tangle--async-proc #'+literate-tangle--async-sentinel)
|
||||||
(run-at-time nil nil (lambda () (message "Tangling config.org"))) ; ensure shown after a save message
|
(run-at-time nil nil (lambda () (message "Tangling config.org"))) ; ensure shown after a save message
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue