diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-11-26 07:11:26 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-11-26 07:11:26 +0100 |
commit | 9857c254979e7c43a3f432c1927a168d6437398c (patch) | |
tree | 14bd049420925ee7045fab9963f9161b0fa6b58c /elisp | |
parent | 8167ddb673800b43d78b6164673506e6d6fd6ef7 (diff) | |
download | geiser-chez-9857c254979e7c43a3f432c1927a168d6437398c.tar.gz geiser-chez-9857c254979e7c43a3f432c1927a168d6437398c.tar.bz2 |
Racket: capturing and displaying standard error during evaluation
This bugs was exposed by using rackunit, where all the output of, say,
check-eq? was lost for good (it was being sent to the stderr black
hole).
Hat tip Grant Retkke.
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-debug.el | 7 | ||||
-rw-r--r-- | elisp/geiser-racket.el | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el index 0d76fde..d7cf338 100644 --- a/elisp/geiser-debug.el +++ b/elisp/geiser-debug.el @@ -1,6 +1,6 @@ ;;; geiser-debug.el -- displaying debug information and evaluation results -;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2011 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -120,7 +120,7 @@ buffer.") (erase-buffer) (when dir (setq default-directory dir)) (unless after - (insert what) + (geiser-debug--display-error impl module nil what) (newline 2)) (when (and res (not err)) (insert res) @@ -128,7 +128,8 @@ buffer.") (setq jump (geiser-debug--display-error impl module key output)) (when after (goto-char (point-max)) - (insert "\nExpression evaluated was:\n\n" what)) + (insert "\nExpression evaluated was:\n\n") + (geiser-debug--display-error impl module nil what)) (goto-char (point-min))) (when jump (geiser-debug--pop-to-buffer)))) diff --git a/elisp/geiser-racket.el b/elisp/geiser-racket.el index ff7b738..6e2de6b 100644 --- a/elisp/geiser-racket.el +++ b/elisp/geiser-racket.el @@ -213,13 +213,12 @@ This function uses `geiser-racket-init-file' if it exists." (when msg (let ((p (point))) (insert msg) - (when key - (let ((end (point))) + (let ((end (point))) (goto-char p) - (geiser-racket--purge-trace) + (when key (geiser-racket--purge-trace)) (mapc 'geiser-edit--buttonize-files geiser-racket--file-rxs) (goto-char end) - (newline))))) + (newline)))) (or key (not (zerop (length msg))))) |