aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-base.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-09-13 21:34:23 +0300
committerAlex Kost <alezost@gmail.com>2015-09-15 15:19:31 +0300
commitea369ee1b0c1e70e70998c0318972a4823aba3b9 (patch)
tree23ebe8e5b1d690293683677e91137bb5118d0dcf /emacs/guix-base.el
parent46e17df661fa6c92d0863827f3affb9385b95395 (diff)
downloadguix-ea369ee1b0c1e70e70998c0318972a4823aba3b9.tar
guix-ea369ee1b0c1e70e70998c0318972a4823aba3b9.tar.gz
emacs: Display guix command errors in the minibuffer.
* emacs/guix-main.scm (output+error): New procedure. (guix-command-output): Use it. * emacs/guix-base.el (guix-command-output): Display error output in the minibuffer.
Diffstat (limited to 'emacs/guix-base.el')
-rw-r--r--emacs/guix-base.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/emacs/guix-base.el b/emacs/guix-base.el
index a479f6dbf5..685e4498d8 100644
--- a/emacs/guix-base.el
+++ b/emacs/guix-base.el
@@ -1134,9 +1134,12 @@ The function is called with a single argument - a command line string."
(defun guix-command-output (args)
"Return string with 'guix ARGS ...' output."
- (guix-eval-read
- (apply #'guix-make-guile-expression
- 'guix-command-output args)))
+ (cl-multiple-value-bind (output error)
+ (guix-eval (apply #'guix-make-guile-expression
+ 'guix-command-output args))
+ ;; Remove trailing new space from the error string.
+ (message (replace-regexp-in-string "\n\\'" "" (read error)))
+ (read output)))
(defun guix-help-string (&optional commands)
"Return string with 'guix COMMANDS ... --help' output."