简体   繁体   中英

SLIME not loading from Emacs

I've recently updated SLIME from package-list-packages in Emacs. However, when I try to run it using Mx slime , I get this:

(progn (load "/home/koz/.emacs.d/elpa/slime-20140913.730/swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "/tmp/slime.3081"))

* 
; loading #P"/home/koz/.emacs.d/elpa/slime-20140913.730/swank-loader.lisp"
;; 
;; Error while compiling /home/koz/.emacs.d/elpa/slime-20140913.730/swank/backend.lisp:
;;   Failed to find the TRUENAME of /home/koz/.emacs.d/elpa/slime-20140913.730/swank/backend.lisp:
;;     No such file or directory
;; Aborting.
;; * 

I still have a REPL afterwards, but I think this is very strange, and I'd like to know what's going on and why.

On Freenode's #lisp channel , I talked to one person who agreed that the current version of SLIME in MELPA (20140913.730) is broken. On my system, the whole $HOME/.emacs.d/elpa/slime-20140913.730/swank/ directory is missing, which presumably is why it can't compile Lisp files found therein.

Other members of the channel suggested installing SLIME from Quicklisp; I did that and it worked, although the SLIME version there is slightly older (dated 2014-08-01). Here is what I did (I didn't already have Quicklisp installed); adjust to match your system and preferences:

  1. Uninstall SLIME from Emacs's package list (do Mx list-packages , go to the line for SLIME, press d , then press x ).
  2. Visit http://www.quicklisp.org/beta/ and download the file in the green box (in my case, it went in ~/Downloads).
  3. Upgrade SBCL to 1.2.2 or later. This is probably overkill.
  4. Launch sbcl .
  5. Evaluate (load "~/Downloads/quicklisp.lisp") .
  6. Evaluate (quicklisp-quickstart:install) ; optionally, if you don't want it to go in ~/quicklisp, add :path "~/.quicklisp/" (substituting whatever directory you actually do want it installed in).
  7. Install SLIME and SWANK by evaluating (ql:quickload "swank") .
  8. Optional: evaluate (ql:add-to-init-file) to patch your .sbclrc to always load Quicklisp in SBCL.
  9. Exit SBCL with Ctrl + D .
  10. Adjust your Emacs config file as shown in SLIME's readme . For the path entry, use "~/quicklisp/dists/quicklisp/software/slime-2.9" (adjusted for whatever path you installed Quicklisp in).
  11. Restart Emacs and Mx slime should work.

This is caused by losing the swank sub-directory in your slime folder. To fix it, you can simple download slime from github and copy the folder swank to your slime installed path, for your situation is /home/koz/.emacs.d/elpa/slime-20140913.730/ then restart your slime. it will be load correctly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM