2
votes

I try to install slime in emacs. I follow many manuals and got one oucome.

"M-x slime" trow exeption "process inferior-lisp exited abnormally with code 5"

  • OS Windows 8.1
  • GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of
    2018-05-30
  • SBCL 1.4.2
  • SLIME 2.22

My .emacs file text

(setq inferior-lisp-program "C:/SBCL/sbcl.exe") 
(add-to-list 'load-path "C:/slime/") 
(require 'slime) 

Following the comment, I tried to understand where the installation falls

-(load #P"C:/slime/swank-loader")
-T
-(swank-loader::init :reload t)
-WARNING: redefining EMACS-INSPECT (#(SB-PCL:SYSTEM-CLASS COMMON-LISP:T)) in DEFMETHOD
NIL 
-(swank:create-server :port 7777)

;;Swank started at port:7777

In Emacs
-M-x slime-connect
Host: localhost
Port: 7777

-Lisp connection closed unexpectedly: connection broken by remote peer

In other topics where i saw that error message, peoples run complex sourcecode with mistakes. The problem was solved by correcting errors. It seems like different situation or i don't understand something.

2
I am not using Windows 8 but would suggested you give portacle a try. It has everything for starting CL you need bundled. Futhermore, you could check the SBCL mailing list as it seems to be an issue with the windows port.Martin Buchmann
Thank you, this is really userfriendly.Олег Глушков
Maybe change SWANK:*COMMUNICATION-STYLE* to one of NIL, :FD-HANDLER, :SIGIO instead of the default :SPAWN. Do not load any user-init file.coredump

2 Answers

1
votes

This is too long for a comment.

You need to find out at which layer the problem occurs. Try for example to run SBCL in a shell with the same command-line (e.g. C:/SBCL/sbcl.exe); if it works, in the REPL:

CL-USER> (load #P"C:/slime/swank-loader")

If that works, you can manually init the swank backend (the Common Lisp part of the Slime/Swank protocol).

CL-USER> (swank-loader::init :reload t)

Then, try to start a server (the port value is arbitrary):

CL-USER> (swank:create-server :port 7777)

If a server starts, you can try to run slime-connect from Emacs, using the localhost port and the same port.

1
votes

Oleg, try to give ip address 127.0.0.1 instead of localhost when doing slime-connect. I have similar problem on OSX when connecting to a remote SLIME server.