Hi,
in order to develop a new Swank front end, I'd like to understand how such a module interacts with Slime. Since such protocol seems to be undocumented - isn't it? - I think that I could trace Swank from/to Slime communication for an already functional module. Is such an operation already available?
Thanks
Elena Garrulo egarrulo@gmail.com writes:
Hi,
in order to develop a new Swank front end, I'd like to understand how such a module interacts with Slime. Since such protocol seems to be undocumented - isn't it? - I think that I could trace Swank from/to Slime communication for an already functional module. Is such an operation already available?
The protocol is very simple, look at DECODE-MESSAGE, and READ-MESSAGE in swank.lisp. For RPC events look at DISPATCH-EVENT, and the various non-Lisp swank server implementations in contrib/.
RPC events from, and to Emacs are logged in the *slime-events* buffer. You can also set SWANK:*LOG-EVENTS* to T to activate logging at the server side (for example by placing (setq swank:*log-events* t) into your ~/.swank.lisp.)
-T.
* Elena Garrulo [2009-07-28 12:36+0200] writes:
Hi,
in order to develop a new Swank front end, I'd like to understand how such a module interacts with Slime. Since such protocol seems to be undocumented - isn't it? - I think that I could trace Swank from/to Slime communication for an already functional module. Is such an operation already available?
In addition to what Tobias said, you can also use Wireshark or similar tools to see what is sent on the socket. Slime even inserts some extra newlines just for this purpose.
Helmut
On Jul 28, 2009, at 3:36 AM, Elena Garrulo wrote:
in order to develop a new Swank front end, I'd like to understand how such a module interacts with Slime. Since such protocol seems to be undocumented - isn't it? - I think that I could trace Swank from/to Slime communication for an already functional module. Is such an operation already available?
You may find it helpful to use Madhu's Common Lisp swank-client as a starting point. It is a few years old, but will work with a few modifications. I have successfully adapted it for my own needs (with a CLOS layer on top for convenience).
http://www.cs.unm.edu/~madhu/clisp/swank-client/swank-client.lisp
BTW: I think it would be beneficial to include an up to date Common Lisp swank client with the distribution, and perhaps also use it in a test harness.
-- Terje Norderhaug