[Emacs] Fix issue when automatically tangling Emacs config

Also simpler call to shell process
This commit is contained in:
Lucien Cartier-Tilet 2020-12-21 18:19:58 +01:00
parent 82ae905195
commit 4cfea387a3
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -14,13 +14,15 @@ It should only modify the values of Spacemacs settings."
(file-newer-than-file-p phundrak//dotspacemacs-src phundrak//dotspacemacs-sl) (file-newer-than-file-p phundrak//dotspacemacs-src phundrak//dotspacemacs-sl)
(file-newer-than-file-p phundrak//dotspacemacs-src phundrak//dotspacemacs-ui) (file-newer-than-file-p phundrak//dotspacemacs-src phundrak//dotspacemacs-ui)
(file-newer-than-file-p phundrak//dotspacemacs-src phundrak//dotspacemacs-uc)) (file-newer-than-file-p phundrak//dotspacemacs-src phundrak//dotspacemacs-uc))
(princ "Exporting new Emacs configuration from spacemacs.org through org-babel...") (message "Exporting new Emacs configuration from spacemacs.org through org-babel...")
(call-process (with-temp-buffer
(concat invocation-directory invocation-name) (shell-command (format "emacs -Q --batch %s %s %s"
nil nil t "--eval \"(require 'ob-tangle)\""
"-q" "--batch" "--eval" "(require 'ob-tangle)" "--eval \"(setq org-confirm-babel-evaluate nil)\""
"--eval" (format "(org-babel-tangle-file \"%s\")" phundrak//dotspacemacs-src)) (format "--eval '(org-babel-tangle-file \"%s\")'"
(princ "done")) phundrak//dotspacemacs-src))
(current-buffer)))
(message "done"))
(load-file phundrak//dotspacemacs-si)) (load-file phundrak//dotspacemacs-si))
(defun dotspacemacs/layers () (defun dotspacemacs/layers ()