[Openmcl-devel] Swank listener startup preference seems not to work

mikel evins mevins at mac.com
Thu Jun 4 23:16:34 PDT 2009

On Jun 4, 2009, at 11:10 PM, Neil Baylis wrote:

> I see the preference item for disabling the swank listener at  
> launch, but it seems not to work. If I evaluate (require :cocoa) it  
> always launches a new listener. When I do this from emacs/slime, I  
> get a whole bunch of name conflicts for swank items.
> I'm using ccl Version 1.4-dev-r12199M-trunk which I got from SVN  
> tonight. (Leopard/Intel).
> I'm assuming that if I successfully disable the swank listener  
> startup, then I will stop seeing the swank name conflicts in emacs/ 
> slime. Maybe there's a simpler way to avoid them, in which case I'm  
> all ears.
> Oh yeah, I'm attempting to set the preference while running the temp  
> bundle32 application that launches when I evaluate (require :cocoa).  
> Is that the right way?

As of the current version in the trunk, there should be no swank code  
building in CCL or the IDE. If you're seeing name conflicts or any  
other problems that seem related to SLIME or swank, I'd be interested  
in knowing about it.

Here's how the swank listener works:

When you start the IDE (which is built by evaluating (require :cocoa- 
application) at a CCL prompt), it checks user defaults for two values:  
whther to start the swank-listener, and what port to start it on.

The swank-listener is not user-visible; it's a thread that opens a  
listener socket and waits for a connection from Emacs. If such a  
connection is made, followed by a request for swank, then the swank- 
listener process attempts to find the swank loader at the path  
supplied by Emacs. If the swank loader is where Emacs says it is, CCL  
loads it, then starts a swank server on the port requested by Emacs.  
Emacs then completes the handshake by opening a SLIME/swank connection  
to CCL.

The idea is that the swank listener provides a way for CCL's IDE to  
start up a SLIME/swank connection without building any particular  
version of swank into the IDE, so that you can safely use whatever  
version of SLIME you happen to have.

The Emacs-side code to start up the connection is in ccl/cocoa-ide/ 

This is very new code. I've used it successfully a number of times  
now, but I'm still going over it, adding protections for various ways  
it can break. We haven't mentioned it publicly yet because it's  
probably a bit early for anyone to be using it with any seriousness.  
Still, if you're trying to use it and it breaks, I'd be interested in  
what went wrong.

The widgets in the Preferences dialog enable you to tell CCL whether  
to try to start the swank-listener at launch, and if so, which port to  
use. The Start button attempts to start the swank listener immediately  
on the current port.

Please note, once more, that the swank listener is NOT swank (CCL and  
the IDE build with no swank or SLIME code in them), and it's not a  
listener window. It's a thread on a listener socket that is waiting  
for Emacs to connect and say "hey, please load swank from this path  
I've given you, and then start it up on this port I;ve told you."


More information about the Openmcl-devel mailing list