[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-guile fa4e0bc 198/284: Guile reconnected (but not d
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-guile fa4e0bc 198/284: Guile reconnected (but not debuggable (yet)) |
Date: |
Sun, 1 Aug 2021 18:29:44 -0400 (EDT) |
branch: elpa/geiser-guile
commit fa4e0bc54a0c6cf21efd7d74bf82dca97fb96b6c
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>
Guile reconnected (but not debuggable (yet))
Or the importance of EOL. Switching to a transaction queue for
communication with the Scheme process means that i had to care about
sending eols in the queries... Guile was waiting for ever reading a
metacommand taking a variable number of arguments. Argh: this has
taken me a few hours -- i'm getting old.
---
geiser/emacs.scm | 23 +++++++++++++++++------
geiser/evaluation.scm | 18 ++++--------------
2 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/geiser/emacs.scm b/geiser/emacs.scm
index 54e5d34..9e3d410 100644
--- a/geiser/emacs.scm
+++ b/geiser/emacs.scm
@@ -13,6 +13,7 @@
#:use-module (ice-9 match)
#:use-module (system repl command)
#:use-module (system repl error-handling)
+ #:use-module (system repl server)
#:use-module (geiser evaluation)
#:use-module ((geiser modules) :renamer (symbol-prefix-proc 'ge:))
#:use-module ((geiser completion) :renamer (symbol-prefix-proc 'ge:))
@@ -26,8 +27,13 @@
No-op command used internally by Geiser."
(values))
+(define-meta-command ((geiser-newline geiser) repl)
+ "geiser-newline
+Meta-command used by Geiser to emit a new line."
+ (newline))
+
(define-meta-command ((geiser-eval geiser) repl (mod form args) . rest)
- "geiser-eval
+ "geiser-eval module form args ()
Meta-command used by Geiser to evaluate and compile code."
(if (null? args)
(call-with-error-handling
@@ -36,12 +42,17 @@ Meta-command used by Geiser to evaluate and compile code."
(ge:eval `(,proc ,@args) mod))))
(define-meta-command ((geiser-load-file geiser) repl file)
- "geiser-load-file
+ "geiser-load-file file
Meta-command used by Geiser to load and compile files."
(call-with-error-handling
(lambda () (ge:compile-file file))))
-(define-meta-command ((geiser-newline geiser) repl)
- "geiser-newline
-Meta-command used by Geiser to emit a new line."
- (newline))
+
+(define-meta-command ((geiser-start-server geiser) repl)
+ "geiser-start-server
+Meta-command used by Geiser to start a REPL server."
+ (let* ((sock (make-tcp-server-socket #:port 0))
+ (port (sockaddr:port (getsockname sock))))
+ (spawn-server sock)
+ (write (list 'port port))
+ (newline)))
diff --git a/geiser/evaluation.scm b/geiser/evaluation.scm
index ef082db..305ccfd 100644
--- a/geiser/evaluation.scm
+++ b/geiser/evaluation.scm
@@ -25,20 +25,6 @@
#:use-module (system vm program)
#:use-module (ice-9 pretty-print))
-(define (handle-error stack . args)
- (pmatch args
- ((,key ,subr ,msg ,args . ,rest)
- (display "Backtrace:\n")
- (if (stack? stack)
- (display-backtrace stack (current-output-port)))
- (newline)
- (display-error stack (current-output-port) subr msg args rest))
- (else (display (format "ERROR: ~a, args: ~a" (car args) (cdr args)))))
- `(error (key . ,(car args))))
-
-(define (write-result result output)
- (write (list (cons 'result result) (cons 'output output)))
- (newline))
(define compile-opts '())
(define compile-file-opts '())
@@ -62,6 +48,10 @@
(ge:set-warnings 'none)
+(define (write-result result output)
+ (write (list (cons 'result result) (cons 'output output)))
+ (newline))
+
(define (call-with-result thunk)
(letrec* ((result #f)
(output
- [nongnu] elpa/geiser-guile e8d1ca5 113/284: Guile: switch to REPL and module activated., (continued)
- [nongnu] elpa/geiser-guile e8d1ca5 113/284: Guile: switch to REPL and module activated., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile c6248c4 119/284: Guile: evaluation output collection reactivated., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 503e239 137/284: Guile: tweaks to the previous fix., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 6212ff6 128/284: Guile: real fix for symbol locations (needs Guile's git head)., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 90835ae 127/284: Guile: new evaluation strategy that really delimits stack frames., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile a15f00a 156/284: Dead code elimination, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 7ecebbc 160/284: Guile: xref commands working again, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile d5252a1 189/284: Guile: fix for the argument shortening algorithm, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile a77bf8b 193/284: Elisp buggettes and warnings, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 1eebcce 197/284: Guile reconnected (but not debuggable (yet)), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile fa4e0bc 198/284: Guile reconnected (but not debuggable (yet)),
Philip Kaludercic <=
- [nongnu] elpa/geiser-guile 6d52afb 199/284: Better EOT token for more robust communication, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 2ea6d9d 204/284: Superior schemes, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 0d3b1f8 205/284: Support for implementation-specific font lock keywords, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 92dadf9 206/284: Typo, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile e25e31f 208/284: Fix for error in Guile initialisation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 67e9ff2 220/284: Guile: 'format' added to the warning list, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 5ed0541 243/284: Possible fix for scanning problem, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile afa28c8 253/284: Support for guile-2.2, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 60c7b01 260/284: A note on dir-locals and load-path variables, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile b523072 269/284: Use cl-lib instead of cl, Philip Kaludercic, 2021/08/01