From: Patrick May on
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.

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)
From: Alain Picard on
Patrick May <patrick(a)softwarematters.org> writes:

> 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
From: Patrick May on
Alain Picard <Dr.Alain.Picard(a)gmail.com> writes:
> Patrick May <patrick(a)softwarematters.org> writes:
>
>> 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.

Thanks!

Regards,

Patrick

------------------------------------------------------------------------
http://www.softwarematters.org
Large scale, mission-critical, distributed OO systems design and
implementation. (C++, Java, Common Lisp, Jini, middleware, SOA)
From: Captain Obvious on
PM> I'm looking for documentation or an example of how to load a file
PM> into a running Lisp image using Swank. I can do it from within Emacs
PM> and Slime, but I need to be able to do it programmatically.

How is this going to be different from cl:load?


From: Patrick May on
"Captain Obvious" <udodenko(a)users.sourceforge.net> writes:
> PM> I'm looking for documentation or an example of how to load a file
> PM> into a running Lisp image using Swank. I can do it from within Emacs
> PM> and Slime, but I need to be able to do it programmatically.
>
> 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.

Regards,

Patrick

------------------------------------------------------------------------
http://www.softwarematters.org
Large scale, mission-critical, distributed OO systems design and
implementation. (C++, Java, Common Lisp, Jini, middleware, SOA)