4

I am learning common lisp now. I want to use slime in emacs, but when I press M-x slime it says [No match]

Initially I download the CVS snapshot and put this in my .emacs file

(setq inferior-lisp-program "/opt/local/bin/sbcl") ; your Lisp system
(add-to-list ’load-path "~/.slime") ; your SLIME directory
(require ’slime)
(slime-setup)

Then I set up again followed this tread Setting the SLIME in emacs

But the problem did not disappear.

Also, M-x run-lisp does not work. When I tried to do so, buffer displayed "Searching for program: No such file or directory, lisp"

Community
  • 1
  • 1
Derekzs
  • 117
  • 2
  • 10
  • 2
    Check to make sure that /opt/local/bin/sbcl is the right path, also do a: which sbcl on Terminal.app If it doesn't print a path back then sbcl is either not in your path and you should add it or not installed and you need to install it. – xmonk Apr 10 '13 at 16:01

4 Answers4

4

To be safe, try installing SLIME using Emacs 24's package manager.

  1. Configure package management in your init.el:

    (require 'package)
    
    (add-to-list 'package-archives '("melpa"     . "http://melpa.milkbox.net/packages/"))
    (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
    
    (package-initialize)
    
    (unless package-archive-contents 
      (package-refresh-contents))
    
  2. Run M-x package-install slime. That should set up the load path correctly for you.

  3. Those configuration options you had should now work:

    (setq inferior-lisp-program (executable-find "sbcl"))
    

I just did a fresh install of SLIME and SBCL and that's all it takes for me.

Chris Barrett
  • 3,383
  • 17
  • 21
1

This seems to be $PATH related. I had just

(setq inferior-lisp-prompt "sbcl")

in my .emacs and got this error. I changed it to

(setq inferior-lisp-program (executable-find "sbcl"))

and my ELPA-installed SLIME now works on my Emacs 24.3.1 under Debian

DomDeLuise
  • 11
  • 1
0

In the add-to-list line, add a forward slash after slime (i.e. ~/slime/) to make this a directory spec.

dippas
  • 58,591
  • 15
  • 114
  • 126
0

Configure this into your init.el using c-x c-f ~/.init.el.

(require 'package)

(add-to-list 'package-archives '("melpa"     . "http://melpa.milkbox.net/packages/"))
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))

(package-initialize)

(unless package-archive-contents 
  (package-refresh-contents))
  • Reinstall both sbcl and slime.
  • I used roswell for the whole setup. This site should help.

To use slime in emacs, you add it to using c-x c-f ~/.emacs.

(load (expand-file-name "~/.roswell/helper.el"))

This should all work.

ouflak
  • 2,458
  • 10
  • 44
  • 49