summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2015-09-10 03:08:34 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2015-09-10 03:08:34 +0200
commit4f31a25509f5d4a93559a3feb751cdfbef0464b5 (patch)
tree95ea2e256b3cac1cd49cfba0b24623c1f1296c26
parent34102210e188716a0047edd7c87fdee652301f2c (diff)
downloadgeiser-guile-4f31a25509f5d4a93559a3feb751cdfbef0464b5.tar.gz
geiser-guile-4f31a25509f5d4a93559a3feb751cdfbef0464b5.tar.bz2
Fix for geiser-connect-local
This one should address #79. I'm very surprised this ever worked!
-rw-r--r--elisp/geiser-repl.el24
1 files changed, 15 insertions, 9 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index de57a60..7b50c4a 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -393,19 +393,25 @@ module command as a string")
(t `(,(geiser-repl--binary impl)
nil
,@(geiser-repl--arglist impl))))))
- (when (and address (stringp address))
- ;; Connect over a Unix-domain socket.
- (make-network-process :name (buffer-name buff)
- :buffer buff
- :family 'local
- :remote address))
-
(condition-case err
- (apply 'make-comint-in-buffer `(,name ,buff ,@args))
+ (if (and address (stringp address))
+ ;; Connect over a Unix-domain socket.
+ (let ((proc (make-network-process :name (buffer-name buff)
+ :buffer buff
+ :family 'local
+ :remote address)))
+ ;; brittleness warning: this is stuff
+ ;; make-comint-in-buffer sets up, via comint-exec, when
+ ;; it creates its own process, something we're doing
+ ;; here by ourselves.
+ (set-process-filter proc 'comint-output-filter)
+ (goto-char (point-max))
+ (set-marker (process-mark proc) (point)))
+ (apply 'make-comint-in-buffer `(,name ,buff ,@args)))
(error (insert "Unable to start REPL:\n"
(error-message-string err)
"\n")
- (error "Couldn't start Geiser")))
+ (error "Couldn't start Geiser" err)))
(geiser-repl--wait-for-prompt geiser-repl-startup-time)))
(defun geiser-repl--wait-for-prompt (timeout)