From 4cfea387a36440e6a5ee6246e6766a82aa8c10f4 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Mon, 21 Dec 2020 18:19:58 +0100 Subject: [PATCH] [Emacs] Fix issue when automatically tangling Emacs config Also simpler call to shell process --- .spacemacs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.spacemacs b/.spacemacs index f681136..c03ab58 100644 --- a/.spacemacs +++ b/.spacemacs @@ -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-ui) (file-newer-than-file-p phundrak//dotspacemacs-src phundrak//dotspacemacs-uc)) - (princ "Exporting new Emacs configuration from spacemacs.org through org-babel...") - (call-process - (concat invocation-directory invocation-name) - nil nil t - "-q" "--batch" "--eval" "(require 'ob-tangle)" - "--eval" (format "(org-babel-tangle-file \"%s\")" phundrak//dotspacemacs-src)) - (princ "done")) + (message "Exporting new Emacs configuration from spacemacs.org through org-babel...") + (with-temp-buffer + (shell-command (format "emacs -Q --batch %s %s %s" + "--eval \"(require 'ob-tangle)\"" + "--eval \"(setq org-confirm-babel-evaluate nil)\"" + (format "--eval '(org-babel-tangle-file \"%s\")'" + phundrak//dotspacemacs-src)) + (current-buffer))) + (message "done")) (load-file phundrak//dotspacemacs-si)) (defun dotspacemacs/layers ()