I'm trying to setup Slime with LWW and Xemacs. I've just made a checkout of Slime from the CVS.
First I load Slime in LW and start : (swank::create-swank-server 4005 :spawn #'swank::simple-announce-function t)
Then in Xemacs I use Bill Clementson's setup: ;;;; SLIME Setup by Bill Clementson
(require 'slime) (add-hook 'lisp-mode-hook (lambda () (slime-mode t))) (add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t))) (slime-autodoc-mode)
(defun my-setup-slime () "Set up common variables used by slime." (interactive) (setq slime-multiprocessing t) (require 'completer) (require 'slime) (modify-coding-system-alist 'process "lisp" 'undecided-unix) (slime-setup))
I call my-setup-slime then slime-connect.
No errors so far.
Now I try "Show REPL", I get a Lisp prompt but when I try to evaluate a form I just get: ;pipelined request... (swank:listener-eval "(+ 1 2) ")
I tried to run slime-run-tests and get assertion failed: (not (slime-busy-p))
Any idea ?
Marc
Argh! My apologies for having sent the previous email with an HTML content... Here is it again in plain text only:
I'm trying to setup Slime with LWW and Xemacs. I've just made a checkout of Slime from the CVS.
First I load Slime in LW and start : (swank::create-swank-server 4005 :spawn #'swank::simple-announce-function t)
Then in Xemacs I use Bill Clementson's setup: ;;;; SLIME Setup by Bill Clementson
(require 'slime) (add-hook 'lisp-mode-hook (lambda () (slime-mode t))) (add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t))) (slime-autodoc-mode)
(defun my-setup-slime () "Set up common variables used by slime." (interactive) (setq slime-multiprocessing t) (require 'completer) (require 'slime) (modify-coding-system-alist 'process "lisp" 'undecided-unix) (slime-setup))
I call my-setup-slime then slime-connect.
No errors so far.
Now I try "Show REPL", I get a Lisp prompt but when I try to evaluate a form I just get: ;pipelined request... (swank:listener-eval "(+ 1 2) ")
I tried to run slime-run-tests and get assertion failed: (not (slime-busy-p))
Any idea ?
Marc
On Wed, 26 Jan 2005 16:17:16 +0100, "Marc Battyani" marc.battyani@fractalconcept.com wrote:
Any idea ?
No, unfortunately not. But you might want to try with GNU Emacs instead if it's around somewhere. Works for me (except for LW FFI). If it works with GNU Emacs and not with XEmacs then the fine SLIME hackers probably know where the problem might be.
Cheers, Edi.
"Edi Weitz" edi@agharta.de wrote:
On Wed, 26 Jan 2005 16:17:16 +0100, "Marc Battyani"
marc.battyani@fractalconcept.com wrote:
Any idea ?
No, unfortunately not. But you might want to try with GNU Emacs instead if it's around somewhere. Works for me (except for LW FFI). If it works with GNU Emacs and not with XEmacs then the fine SLIME hackers probably know where the problem might be.
OK, I will try to fetch gnu Emacs to try.
Marc
Howdy Marc!
"Marc Battyani" marc.battyani@fractalconcept.com writes:
I call my-setup-slime then slime-connect.
No errors so far.
Now I try "Show REPL", I get a Lisp prompt but when I try to evaluate a form I just get: ;pipelined request... (swank:listener-eval "(+ 1 2) ")
So `slime-connect' did not pop up a REPL buffer all by itself?
Sounds like something has hung while SLIME is setting up the connection. Can you show the contents of the *slime-events* buffer after `slime-connect'? That contains a protocol-trace.
Also, is there any error visible in the Lisp console?
NB: The "pipelined request" message is saying that SLIME sent a new RPC while still waiting for the result of an old one.
"Luke Gorrie" luke@synap.se wrote:
Howdy Marc!
Hi Luke!
"Marc Battyani" marc.battyani@fractalconcept.com writes:
I call my-setup-slime then slime-connect.
No errors so far.
Now I try "Show REPL", I get a Lisp prompt but when I try to evaluate a
form I just get:
;pipelined request... (swank:listener-eval "(+ 1 2) ")
So `slime-connect' did not pop up a REPL buffer all by itself?
No. nothing seems to happen.
Sounds like something has hung while SLIME is setting up the connection. Can you show the contents of the *slime-events* buffer after `slime-connect'? That contains a protocol-trace.
After slime-connect I have this: (:emacs-rex (swank:connection-info) nil t 1)
After Show REPL I have this added:
(:emacs-rex (swank:listener-eval "(+ 1 2)\n") "COMMON-LISP-USER" :repl-thread 2)
Also, is there any error visible in the Lisp console?
No.
NB: The "pipelined request" message is saying that SLIME sent a new RPC while still waiting for the result of an old one.
OK.
Marc
"Marc Battyani" marc.battyani@fractalconcept.com writes:
After slime-connect I have this: (:emacs-rex (swank:connection-info) nil t 1)
After Show REPL I have this added:
(:emacs-rex (swank:listener-eval "(+ 1 2)\n") "COMMON-LISP-USER" :repl-thread 2)
In both cases Emacs has sent an RPC request and Lisp hasn't responded.
Can you try (setq swank::*log-events* t) in the Lisp side before doing `slime-connect'? That way it will print protocol messages and we can see if it's successfully READ'ing those same messages we see logged in *slime-events*.
It would also be interesting to see a backtrace for any SLIME threads, if that's easy to get. Edi's idea of testing in GNU Emacs would also be good if you happen to have it handy.
"Luke Gorrie" luke@synap.se wrote:
"Marc Battyani" marc.battyani@fractalconcept.com writes:
After slime-connect I have this: (:emacs-rex (swank:connection-info) nil t 1)
After Show REPL I have this added:
(:emacs-rex (swank:listener-eval "(+ 1 2)\n") "COMMON-LISP-USER" :repl-thread 2)
In both cases Emacs has sent an RPC request and Lisp hasn't responded.
Can you try (setq swank::*log-events* t) in the Lisp side before doing `slime-connect'? That way it will print protocol messages and we can see if it's successfully READ'ing those same messages we see logged in *slime-events*.
OK, I get this when I do slime-connect in XEmacs 21.5 beta18:
in LW 4.4: WRITE: (:open-dedicated-output-stream 1381)
in XEmacs: nil byte-code("..." [error message "net-read error: %S" ding sleep-for 2 debug nil (slime-net-close proc) ((error)) "PANIC!"] 3) slime-process-available-input() slime-net-filter(#<network connection "SLIME Lisp" (4005 . "127.0.0.1") state:run> "
It would also be interesting to see a backtrace for any SLIME threads, if that's easy to get. Edi's idea of testing in GNU Emacs would also be good if you happen to have it handy.
I tried with gnu Emacs 21.3.1 and got:
in LW: WRITE: (:open-dedicated-output-stream 1401)
in gnu Emacs: Debugger entered: nil byte-code("ÁÂ",HC(B ,HDÅ(B!,HF(B ,HGÈÉ,_ÀÊ(B!,G"(B [error message "net-read error: %S" ding sleep-for 2 debug G89685 (slime-net-close proc) ((error)) "PANIC!"] 3) slime-process-available-input() slime-net-filter(#<process SLIME Lisp> "
On the Lisp side I call this: (swank::create-swank-server 4005 :spawn #'swank::simple-announce-function t)
Marc
On Thu, 27 Jan 2005, Marc Battyani wrote:
On the Lisp side I call this: (swank::create-swank-server 4005 :spawn #'swank::simple-announce-function t)
Maybe that's the right thing to do. But I use (swank:create-server :port 4005 :dont-close t) with LWL, and it works, so you could give it a try.
Andras
"Andras Simon" andras@renyi.hu wrote:
On Thu, 27 Jan 2005, Marc Battyani wrote:
On the Lisp side I call this: (swank::create-swank-server 4005 :spawn
#'swank::simple-announce-function t)
Maybe that's the right thing to do. But I use (swank:create-server :port 4005 :dont-close t) with LWL, and it works, so you could give it a try.
Done. Same error:
nil byte-code("..." [error message "net-read error: %S" ding sleep-for 2 debug nil (slime-net-close proc) ((error)) "PANIC!"] 3) slime-process-available-input() slime-net-filter(#<network connection "SLIME Lisp" (4005 . "127.0.0.1") state:run> "^@^@%(:open-dedicated-output-stream 1519)\n")
Marc
"Marc Battyani" marc.battyani@fractalconcept.com writes:
Maybe that's the right thing to do. But I use (swank:create-server :port 4005 :dont-close t) with LWL, and it works, so you could give it a try.
Done. Same error:
Could also try to the variables below before starting the server?
(setq swank::*communication-style* nil) (setq swank::*use-dedicated-output-stream* nil) (setq swank::*log-events* t)
Helmut Eller" e9626484@stud3.tuwien.ac.at wrote:
"Marc Battyani" marc.battyani@fractalconcept.com writes:
Maybe that's the right thing to do. But I use (swank:create-server :port 4005 :dont-close t) with LWL, and it works, so you could give it a try.
Done. Same error:
Could also try to the variables below before starting the server?
(setq swank::*communication-style* nil) (setq swank::*use-dedicated-output-stream* nil) (setq swank::*log-events* t)
There is some improvement! Now after the slime-connect, I get 3 new threads in LW: control-thread, reader-thread and repl-thread. The reader-thread is waiting for input.
On the XEmacs side I don't have any error now but get pipelined requests and no reply
Marc
"Marc Battyani" marc.battyani@fractalconcept.com writes:
Could also try to the variables below before starting the server?
(setq swank::*communication-style* nil) (setq swank::*use-dedicated-output-stream* nil) (setq swank::*log-events* t)
There is some improvement! Now after the slime-connect, I get 3 new threads in LW: control-thread, reader-thread and repl-thread. The reader-thread is waiting for input.
Those threads must be leftovers from previous attempts. (setq swank::*communication-style* nil) means that no threads should be created.
With the LWL personal edition and *communication-style*=nil the server runs in a thread named "CAPI Execution Listener 1". It would be interesting to see a backtrace of that thread, if possible with local variables.
If you know how external formats work in LW, you could also check whether the ACCEPT-CONNECTION function in the file swank-lispworks.lisp does the Right Thing on Windows. The stream should use iso-latin-1 characters and Unix style LF end of line convention.
I don't have access to a Windows machine, so I can't help much.
Helmut.
"Helmut Eller" e9626484@stud3.tuwien.ac.at wrote:
"Marc Battyani" marc.battyani@fractalconcept.com writes:
Could also try to the variables below before starting the server?
(setq swank::*communication-style* nil) (setq swank::*use-dedicated-output-stream* nil) (setq swank::*log-events* t)
There is some improvement! Now after the slime-connect, I get 3 new threads in LW: control-thread, reader-thread and repl-thread. The reader-thread is waiting for input.
Those threads must be leftovers from previous attempts. (setq swank::*communication-style* nil) means that no threads should be created.
OK, I removed all the slime stuff from my hard disk, then made a fresh install and it works! :)
I just start the swank server on the LW side: (swank::create-swank-server 4005)
Thanks.
Marc
Do you happen to have anything in your .lispworks file that might influence the way SLIME behaves?
As I said, LW's FFI doesn't work with SLIME. So, if you, say, have CLSQL make a DB connection each time you start LW this might be the cause.
Just guessing...