質問

I am an Emacs and Common Lisp novice. I have successfully installed SLIME in my Emacs, but I am unable to run it. Alt + x slime-connect gives the following options, accepting which gives the error pasted below the options.

Host: 127.0.0.1
Port: 4005

Connecting to Swank on port 4005...
make client process failed: connection refused, :name, SLIME Lisp, :buffer, nil,
                                                :host, 127.0.0.1, :service 4005,
                                                :nowait, nil

How do I get this to work?

役に立ちましたか?

解決

  1. to fix the whitespace - escape it with double backward slash.

  2. When you do slime-connect it will expect a Lisp image (Lisp runtime) to be up and listening on the server and port you connect to. Probably you didn't mean it.

  3. slime will first launch inferior-lisp-program, and then connect to it. This is what you want to do, actually.

https://github.com/quicklisp/quicklisp-slime-helper this is something you might want to try (when you are done with the setup, or instead). Or just keep it for the time you feel more comfortable with more setup. The program in the link is a helper, that works through quicklisp - something you might want to get familiar with, a kind of package manager for Lisp code, and SLIME you run in Emacs. Possibly, if you will find that it is easier for you to

  • first install the Lisp you want.

  • install quicklisp. (follow the instructions here: http://www.quicklisp.org/beta/ with the exception that for Windows you might either use Cygwin, or instead of curl, just right-click on the link and do the "save target as" voodoo magic :). If you don't use SBCL, then --load may not be an option for your lisp. Replace it with something like: start your Lisp, type into REPL: (load "quicklisp.lisp"), provided your current working directory is the one where you saved the quicklisp.lisp file. To print out the current directory, if not sure: (directory ".").

  • Read the README for quicklisp-slime-helper and follow the instructions in it. Basically, there's only one thing you want to configure after you install it via quicklisp, it is:

    (load "c:/full-path-to/quicklisp/slime-helper.el")

in the .emacs file.

If you aren't familiar with *nix path names, tilde means the current user's home directory, aka $HOME, you probably set it up as an environment variable when you installed Emacs. Note that quicklisp-slime-helper and slime packages are mutually exclusive (it's the same package, just wrapped differently), so if you have something like:

(add-to-list 'load-path "/path/to/slime")
(require 'slime)

Then, if you want to use the quicklisp-slime-helper, comment that away, and use only the configuration for one of them.

PS. Re'

(add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))

This looks redundant, why do you need that / what is that? Where did you get inferior-slime-mode? That's something that doesn't look familiar to me. What happens if you position the point (caret) on it and hit C-h f?

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top