summaryrefslogtreecommitdiff
path: root/elisp
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
commit4c9dddb1a668a7a5cbac217c45558ad5e419cc9d (patch)
treebbb466cacf5f11a3ad9fb6a6e39116ae51d0fc13 /elisp
parent542cf24d68a89a5d0929758d3f7bccf2ad03ed9f (diff)
downloadgeiser-4c9dddb1a668a7a5cbac217c45558ad5e419cc9d.tar.gz
geiser-4c9dddb1a668a7a5cbac217c45558ad5e419cc9d.tar.bz2
Fix for geiser-connect-local
This one should address #79. I'm very surprised this ever worked!
Diffstat (limited to 'elisp')
-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)