0

I install slime through ELPA. Here is what my .emacs file looks like:

(setq inferior-lisp-program "sbcl --noinform")
(add-to-list 'load-path "~/slime/") 
(require 'slime)
(slime-setup)
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
                         ("marmalade" . "http://marmalade-repo.org/packages/")
                         ("melpa" . "http://melpa.milkbox.net/packages/")))

I get the following error when I start emacs:

Warning (initialization): An error occurred while loading `/home/name/.emacs':

File error: Cannot open load file, slime

To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the `--debug-init' option to view a complete error backtrace.

When I debug:

Debugger entered--Lisp error: (file-error "Cannot open load file" "slime")
  require(slime)
  eval-buffer(#<buffer  *load*> nil "/home/name/.emacs" nil t)  ; Reading at buffer position 91
  load-with-code-conversion("/home/name/.emacs" "/home/name/.emacs" t t)
  load("~/.emacs" t t)
  #[0 "\205\262

When I visit ~/.emacs.d/elpa/slime-20130308.1112, slime.el is clearly there. Other people online seem to be having issues too. If I cannot get it to work with emacs24, how can I setup a slime environment for common lisp?

anonymous
  • 173
  • 6

2 Answers2

3

I installed emacs 24 using the Debian amd64 package from Damien Cassou's ppa. I had some problems with slime (I don't recall if they were the same as those above). I fixed it by reinstalling quicklisp (http://www.quicklisp.org/), then using it to install slime:

(ql:quickload :quicklisp-slime-helper)

It works fine with sbcl for me (on two machines). I just looked at my .emacs; I have nothing added to my load-path, just

(load (expand-file-name "~/quicklisp/slime-helper.el"))
(setq inferior-lisp-program "sbcl")
(require 'slime)
(slime-setup '(slime-fancy))
bikenaga
  • 46
  • 1
0
  1. I've just noted that you load path says (add-to-list 'load-path "~/slime/") but your slime.el file is at ~/.emacs.d/elpa/slime-20130308.1112 so in a different location. You probably have to correct it for: (add-to-list 'load-path "~/.emacs.d/elpa/slime-20130308.1112/")

  2. You have not said (--noinform) where is your sbcl (setq inferior-lisp-program "sbcl --noinform"). So that I guess you have to do, at command line: $ which sbcl then the system will say to you where sbcl is (probably /usr/bin/sbcl) and inform it to emacs by (setq inferior-lisp-program "/usr/bin/sbcl")

Anthon
  • 78,313
  • 42
  • 165
  • 222