[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-racket ff0283d 058/191: Make do with a single conne
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-racket ff0283d 058/191: Make do with a single connection |
Date: |
Sun, 1 Aug 2021 18:32:00 -0400 (EDT) |
branch: elpa/geiser-racket
commit ff0283d264b69c76991569d142dbf3e7c96ce03d
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>
Make do with a single connection
Separate connections for the REPL and Geiser commands was kind of
neat, but it had the problem of synchronising the current namespace
for both connections. A quick fix would have been to ask the scheme
for the current namespace for every Geiser command in the REPL, but
that, besides clunky, would add potentially prohibitive overhead for
(real) remote connections.
As it happens, using a single connection turned out to be not that
difficult and relatively clean code-wise. We could even turn back to
not use inferior schemes, and the net result of this refactoring would
be the replacement of comint-redirect (which wasn't able to match the
whole EOT token if it didn't arrive all at once) by transaction queues
(which also makes geiser-connection's implementation cleaner).
But using an inferior scheme has a dog-food value, and allows external
processes to connect to the scheme being used by Geiser without
further ado, which could be useful for debugging (although this is a
lame excuse: nothing prevents you from starting a REPL server from
emacs if you want). We'll see.
---
elisp/geiser-racket.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/elisp/geiser-racket.el b/elisp/geiser-racket.el
index f3aa7e5..3ab181b 100644
--- a/elisp/geiser-racket.el
+++ b/elisp/geiser-racket.el
@@ -82,7 +82,7 @@ This function uses `geiser-racket-init-file' if it exists."
,@(and init-file (file-readable-p init-file) (list "-f" init-file))
"-f" ,(expand-file-name "racket/geiser.rkt" geiser-scheme-dir))))
-(defconst geiser-racket--prompt-regexp "^=?\\(mzscheme\\|racket\\)@[^ ]*?> ")
+(defconst geiser-racket--prompt-regexp "\\(mzscheme\\|racket\\)@[^ ]*?> ")
(defconst geiser-racket--init-server-command ",start-geiser")
@@ -97,6 +97,12 @@ This function uses `geiser-racket-init-file' if it exists."
(car (geiser-syntax--read-from-string (match-string-no-properties 1)))
"#f")))
+(defun geiser-racket--enter-command (module)
+ (when (stringp module)
+ (cond ((zerop (length module)) ",enter #f")
+ ((file-name-absolute-p module) (format ",enter (file %S)" module))
+ (t (format ",enter %s" module)))))
+
(defun geiser-racket--geiser-procedure (proc &rest args)
(case proc
((eval compile)
@@ -140,12 +146,6 @@ This function uses `geiser-racket-init-file' if it exists."
(defun geiser-racket--symbol-begin (module)
(save-excursion (skip-syntax-backward "^-()>") (point)))
-(defun geiser-racket--enter-command (module)
- (when (stringp module)
- (cond ((zerop (length module)) ",enter #f")
- ((file-name-absolute-p module) (format ",enter (file %S)" module))
- (t (format ",enter %s" module)))))
-
(defun geiser-racket--import-command (module)
(and (stringp module)
(not (zerop (length module)))
- [nongnu] elpa/geiser-racket cb2287b 035/191: Racket: using meta-commands instead of dynamic-require (#30347), (continued)
- [nongnu] elpa/geiser-racket cb2287b 035/191: Racket: using meta-commands instead of dynamic-require (#30347), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket e625b74 038/191: Racket: fix for help function, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 5a048d7 040/191: Racket: little evaluation nits, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 98bd9f2 041/191: Nits, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 4b43cf6 042/191: Pumbling cleanups, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 7c46713 045/191: Racket: use EOT token for internal communications, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket e43de25 047/191: geiser-squarify to toggle between () and [], Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket ac54a9e 051/191: Partial work (connections working), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 7593814 053/191: Racket reconnected, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 7036998 054/191: Nits, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket ff0283d 058/191: Make do with a single connection,
Philip Kaludercic <=
- [nongnu] elpa/geiser-racket bb37146 057/191: Make do with a single connection, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket e135455 059/191: Superior schemes, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 7caae17 088/191: Highlighting [else properly in Racket buffers, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket c514fea 084/191: Racket: indentation for splicing-let and friends, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 3e1fe82 086/191: Racket: capturing and displaying standard error during evaluation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket ad3f93c 109/191: Racket: indentation for module+ forms, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket bad7932 149/191: Debug code removed, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 8bcbc3d 144/191: racket: struggling with submodules, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 1f298f0 147/191: Another indentation rule: match-let-values, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 74711fb 143/191: racket: new , geiser-load command in REPL, Philip Kaludercic, 2021/08/01