emacsclojureslimeswank-clojure

swank-clojure and slime no longer co-operating in emacs


I made the mistake of updating my existing ports with MacPorts -- now slime and swank-clojure no longer work. I get the following message when I invoke clojure-jack-in within emacs:

Versions differ: 2011-04-16 (slime) vs. 20100404 (swank). Continue? (y or n)

Entering y will bring up the slime REPL, but then when I try to evaluate an expression in the REPL, I get another message:

Not connected. Use `M-x slime' to start a Lisp. 

What is going on here?

Here are the relevant portions of my init.el file:

;; slime
(setq inferior-lisp-program "/opt/local/bin/sbcl")
(add-to-list 'load-path
         "/opt/local/share/emacs/site-lisp/slime"
         "/opt/local/share/emacs/site-lisp/slime/contrib")
(add-hook 'slime-repl-mode-hook
      (defun clojure-mode-slime-font-lock()
          (require 'clojure-mode)
        (let (font-lock-mode)
          (clojure-mode-font-lock-setup))))
(require 'slime)
(slime-setup '(slime-repl))
(eval-after-load "slime" '(slime-setup '(slime-fancy slime-banner)))

;; clojure
(add-to-list 'load-path
         "~/.emacs.d/elpa/clojure-mode-el"
         "~/.emacs.d/elpa/paredit-22")
(require 'clojure-mode)
(defun turn-on-paredit () (paredit-mode 1))
(add-hook 'clojure-mode-hook 'turn-on-paredit)

Solution

  • swank-clojure only works with slime version 20100404:

    https://github.com/technomancy/swank-clojure/issues/120#issuecomment-4862556

    only option at this point is to downgrade version of slime.