问题
I'd like to install slime on my Emacs 23.2.1. Since M-x slime
doesn't succeed in start it, I modified the ~/.emacs file.
(setq inferior-lisp-program "/usr/bin/sbcl")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/slime/")
(require 'slime)
(slime-setup)
Of course this doesn't work for the slime path in the second line of ~/.emacs file should be /usr/share/common-lisp/source/swank
instead. However, after I changed this directory, the error remains. It says like this:
Couldn't load "/usr/share/emacs/site-lisp/slime/swank-loader.lisp": file does not exist.
Why would this load external remain and how to make these things right?
回答1:
This post on LispForum suggests adding the following line to your .emacs:
(slime-setup '(slime-fancy))
The explanation for the error:
What you are seeing is an effect of splitting REPL into a contrib. No contribs are loaded by default, which is a bit unfortunate, since current bare slime has pretty minimal functionality.
Edit: OK, what platform, Emacs, and Slime version are you using? I'm using Emacs 24 on Ubuntu. I installed slime using apt-get. I was seeing the same error as you:
Couldn't load "/usr/share/emacs/site-lisp/slime/swank-loader.lisp": file does not exist.
I fixed it using the method suggested in this answer:
The next thing to try is M-x customize-variable slime-backend and setting that to the absolute path of swank-loader.lisp. I think that will fix it for sure, but I am not sure why it doesn't work to begin with.
I had to customize the value of slime-backend
to /usr/share/common-lisp/source/slime/swank-loader.lisp
to get M-x slime
to work.
回答2:
On debian sid Mon. Jan. 27 22:18 CET - I had to install cl-swank
回答3:
This error occurred for me and it boiled down to /etc/emacs/site-start.d having a 50slime file without the cl-swank and slime packages being installed (on a debian variant)
In my case I had removed them so I could have a more current slime, so I just deleted the file. The other way is to just install the packages ("apt-get install cl-swank slime") and use the packaged versions.
Hope that helps someone.
回答4:
I think you should use Quicklisp wich is a package installer for Common Lisp. It has a slime package that is usually updated to the most recent version. The Quicklisp web site has all the instructions you'll need to configure emacs and slime.
来源:https://stackoverflow.com/questions/7453668/load-external-with-emacs-slime