Thanks for any help.
Regards,
Patrick
------------------------------------------------------------------------
http://www.softwarematters.org
Large scale, mission-critical, distributed OO systems design and
implementation. (C++, Java, Common Lisp, Jini, middleware, SOA)
> I'm looking for documentation or an example of how to load a file
> into a running Lisp image using Swank. I can do it from within Emacs
> and Slime, but I need to be able to do it programmatically.
The typical way to bootstrap your way into such things is this.
What does C-c C-l do? Do C-h C-k (describe-key) C-c C-l
Emacs responds with
C-c C-l runs the command slime-load-file, which is an interactive
compiled Lisp function in `slime.el'.
The slime.el is clickable, and takes you to the definition of slime-load-file.
The last line of this function is:
(slime-eval-with-transcript `(swank:load-file ,lisp-filename))
Bang. You're in swank territory.
--ap
Thanks!
How is this going to be different from cl:load?
I need to connect to a remote running image and evaluate cl:load
for a particular file on the remote machine. The Swank protocol isn't
documented, unfortunately, but I'm hacking around with it to get it to
do what I want.
The obvious alternative is to spawn a thread and listen on my own
socket for load requests.
> I need to connect to a remote running image and evaluate cl:load
> for a particular file on the remote machine.
You _do_ know that you can get a local SLIME to talk
to a remote SWANK server, right? Or maybe I'm completely
misunderstanding what you're trying to do.
--ap
Yes, and I use that feature from Emacs. I would like to accomplish
the same thing from Common Lisp (Clozure, in particular)
programmatically rather than manually from within Emacs.
> Yes, and I use that feature from Emacs. I would like to accomplish
> the same thing from Common Lisp (Clozure, in particular)
> programmatically rather than manually from within Emacs.
That makes perfect sense. Good luck!
The alternative would be to use some form of RPC, there are RPC servers
and clients for CL, and they are documented.