emacscommon-lispsbclslimequicklisp

Making Emacs/Slime/Quicklisp/SBCL work in Windows


I'm using the above combination in Windows 7.0 for several months now. Unfortunately a collegue advised me to install the slime-helper.el into emacs, with the result: Emacs Slime doesn't recognize QL any more.

I'm using SBCL 1.2.11 for Windows and from command-line this sbcl knows the ql installation. This is my .sbclrc

;;; The following lines added by ql:add-to-init-file:
#-quicklisp
(let ((quicklisp-init (merge-pathnames
                       "Documents/LISP/.asdf-install-dir/systems/setup.lisp"
                       (user-homedir-pathname))))
  (when (probe-file quicklisp-init)
    (load quicklisp-init)))

I then typed

(ql:quickload "quicklisp-slime-helper")

and it compiled a lot. Finally it said

To use, add this to your ~/.emacs:

(load (expand-file-name "~/Documents/LISP/.asdf-install-dir/systems/slime-helper.el"))
;; Replace "sbcl" with the path to your implementation
(setq inferior-lisp-program "sbcl")

Now this is the corresponding part in my .emacs file

(load "c:/Users/xyz/Documents/LISP/.asdf-install-dir/systems/slime-helper.el")
(setq inferior-lisp-program "c:\\Progra~1\\Steelb~1\\12BDCB~1.11\\sbcl.exe")

I started up emacs and it came up just normally.

M-x slime

Still fine:

; SLIME 2015-06-01
CL-USER> 

But then:

(ql:quickload :my-project)

returned

Package QL does not exist.

But the worst part is, if I remove slime-helper from .emacs-file, it again recognizes the quicklisp package but every call to ql locks up the emacs. I can wait for several minutes without getting any response.

Any help appreciated.


Solution

  • The problem is that Emacs Slime (REPL) doesn't know neither whether quicklisp is installed nor where it is installed. All you have to do to fix the problem is to reinstall quicklisp at the Emacs' slime repl. ("quicklisp.lisp" file should be in the SLIME REPL's current working folder.)

    M-x slime 
    CL-USER> (load "quicklisp.lisp")
    CL-USER> (quicklisp-quickstart:install)
    CL-USER> (ql:add-to-init-file)
    

    Then, quicklisp will be reinstalled in the Emacs's HOME directory ("~/"). Now, you have installed the same quicklisp in the (a) Windows 10's HOME and (a) the Emacs' HOME. If you use quicklisp only at the Emacs' Slime REPL, the copy in the Windows 10' HOME is useless, and you can delete it.