2

I have followed the instructions on Github for setting up swank-js.

I installed slime and slime-js from github and have the following in my .emacs file:

(add-to-list 'load-path "~/slime/")  
(require 'slime-autoloads)
(setq slime-contribs '(slime-fancy slime-repl slime-js))

Then when I run slime-connect and enter my host and port emacs tells me: void-variable package). Here is the output from my node server:

Handler.prototype.receive(): (:emacs-rex (swank:connection-info) "COMMON-LISP-USER" t 1)
info = {"pid":6145,"encoding":{"codingSystems":["utf-8-unix"]},"packageSpec":{"name":"NODE","prompt":"NODE"},"implementation":{"type":"JS","name":"JS","version":"1.5"},"version":"2012-02-12"}
response: 0000c1(:return (:ok (:encoding (:coding-systems ("utf-8-unix")) :lisp-implementation (:name "JS" :type "JS" :version "1.5") :package (:name "NODE" :prompt "NODE") :pid 6145 :version "2012-02-12")) 1)
  1. What can I do to get swank-js to work?
  2. What is the package variable supposed to be?
programking
  • 7,064
  • 9
  • 41
  • 62

2 Answers2

1

If you use the slime version that matches swank-js then everything just works. Specifically, I checked out the 2012-02-12 slime branch and made sure that slime-js.el was in that slime/contrib directory and everything just worked!

  • 1
    It would be still more useful if someone would change the necessary parts of swank-js to work with a newer slime version. – wasamasa Dec 14 '14 at 13:24
0

Remove slime-repl and slime-js.

DON't install slime-js from this repo (https://github.com/Gozala/slime-js). It's old

  1. Install the slime from MELPA. The version will be 2015 Oct.
  2. Manually download the slime-js.el from swank-js's repo. https://github.com/swank-js/swank-js/blob/master/slime-js.el
  3. Copy slime-js.el to ~/.emacs.d/elpa/slime-20151021.1304/contrib

You are good to go :)

  • Hm, this doesn't really look better because the file is only a year newer, shares most of its code with the old one and has a warning that it is superseded by the old one. – wasamasa Oct 30 '15 at 07:20