diff --git a/.emacs.d/lisp/init-sly.el b/.emacs.d/lisp/init-sly.el index 043f6a12..77a994a7 100644 --- a/.emacs.d/lisp/init-sly.el +++ b/.emacs.d/lisp/init-sly.el @@ -65,7 +65,12 @@ GUIX-COMMAND is the command to the guix executable, e.g. '(\"~/projects/guix/pre (when no-grafts? (list "--no-grafts"))))) (message "Running %S" (mapconcat #'identity (cons command args) " ")) - (apply #'call-process command nil nil nil args)) + (let* ((output (get-buffer-create " *Guix SBCL for Nyxt*")) + (status (apply #'call-process command nil `(,output t) nil args))) + (if (= status 0) + (kill-buffer output) + (switch-to-buffer-other-window output) + (error "Guix command failed, see %s" output)))) ;; Update root mtime in case it's not changed. ;; Can't use `set-file-times' on links. (call-process "touch" nil nil nil "-h" root))