[gambit-list] Attach Emacs to a web-repl?
Marc Feeley
feeley at iro.umontreal.ca
Tue Oct 17 20:13:13 EDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 17-Oct-06, at 7:30 PM, Andrew Lentvorski wrote:
> Is there any way to attach Emacs (or any other editor, for that
> matter),
> to a web-repl? Given that I can telnet directly to port 7000 and
> execute the repl, there ought to be some way.
>
> I took a quick look at cmuscheme.el, comint.el and ftelnet.el, but my
> Emacs-fu is clearly not good enough. I don't see anything obvious.
Depends what you mean by "attach". One way is: C-U M-x telnet RET
localhost RET 7000 RET . If you want to be able to have several
concurrent REPLs in the same Gambit process, then edit the procedure
start-repl-server in web-repl.scm like this:
(define (start-repl-server)
(let ((server
(open-tcp-server
(list port-number: repl-server-port
reuse-address: #t))))
(let loop ()
(let ((ide-repl-connection (read server)))
(setup-ide-repl-channel ide-repl-connection)
; (start-ide-repl)
(start-ide-repl-in-new-thread)
(loop)))))
Each new connection will start a new REPL.
I hope you are aware of the security risks with such a thing, so it
might be wise to wrap all of this with some kind of authentification
layer.
Marc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
iD8DBQFFNXGZ//V9Zc2T/v4RApzRAKC6iVw23gC8wwc88AFjqT/88HVG9QCfbp14
/ACChXb2DDu9ztGBNHVwdKU=
=SiyL
-----END PGP SIGNATURE-----
More information about the Gambit-list
mailing list