Edi Weitz edi@agharta.de writes:
Hi!
Attention: Question shows again my complete Emacs ignorance.
I've recently begun to use the combination mentioned in the subject. I use a setup as described by Bill Clementson which mainly looks like this:
(global-set-key [(f6)] '(lambda () (interactive) (shell-command "c:/PROGRA~1/acl70/alisp.exe +B +cm -L ~/.slime.lisp&") (slime-connect "localhost" 4005)))
This works fine most of the time but sometimes fails with
Connecting to Swank on port 4005.. open-network-stream: make client process failed: connection refused, :name, SLIME Lisp, :buffer, nil, :host, localhost, :service, 4005
which obviously happens if AllegroCL is not quite ready to accept connections when SLIME tries to connect. I can fix this with adding something like sit-for before the call to slime-connect but either I wait too long which makes the call unnecessary slow or I'm still in a time frame where the error described above can happen.
totally untested idea: try removing the slime-connet from that lambda and add a call to run-command (or whatever allegro uses) which calls emacsclient like so:
emacsclient --no-wait -e '(slime-connect "localhost" 4005)'