| Here's how to set up SLIME with Arc. I'm using Linux, but the gist should be the same on Windows. First, download SLIME from http://www.common-lisp.net/project/slime/snapshots/slime-current.tgz . Then, we have to unzip it. I chose to put SLIME in ~/.emacs.d/slime . You can choose differently; it doesn't matter where as long as you know where it is. Obviously, pathnames will be different on Windows. zck@zck-desktop:~/Desktop$ mv slime-current.tgz ~/.emacs.d/
zck@zck-desktop:~/Desktop$ cd ~/.emacs.d/
zck@zck-desktop:~/.emacs.d$ tar -xf slime-current.tgz
zck@zck-desktop:~/.emacs.d$ ls
slime-2011-07-31
zck@zck-desktop:~/.emacs.d$ mv slime-2011-07-31/ slime/
Ok, now SLIME is in ~/.emacs.d/slime . The way SLIME deals with Lisps is by calling an executable. The only way I could get SLIME to work with Arc is by writing a shell file to start Arc properly. I'm calling that file ~/arc.sh . We need to do two things in the shell script. First, move to the directory Arc is saved in. Then, we start Arc. However, you have to fully specify the path to Racket. My racket is at /usr/local/racket/bin/racket . Yours may be different; you can check this on Linux by going to a terminal window and typing which racket . This will output the executable that's called when you run racket . On Windows, Racket is probably somewhere in C:\Program Files . Make sure you pick the executable, not the folder holding it. zck@zck-desktop:~/.emacs.d$ which racket
/usr/local/racket/bin/racket
So we take these two commands and put them in your arc.sh file. Unfortunately, I don't have a Windows machine at hand, so I can't test this out there. If someone would supply a valid Windows script, that would be a great help. cd ~/arc3.1; # a fully-qualified path to wherever your arc3.1 is
/usr/local/racket/bin/racket -f as.scm #get the location of racket
#from running: which racket
#at a terminal window
Save this, and make the file executable: zck@zck-desktop:~$ chmod a+x arc.sh
Next step: tell Emacs about SLIME. Open up your .emacs file. If you don't know what your .emacs file -- also called your init file -- is, read the emacs wiki article about it: http://www.emacswiki.org/emacs/InitFile . Add the following: (setq inferior-lisp-program "~/arc.sh")
(add-to-list 'load-path "~/.emacs.d/slime/")
;; customize these locations as per your setup
(require 'slime)
(slime-setup)
Close and restart Emacs, and then run M-x slime. If all went well, you should get something like the following: (progn (load "/home/zck/.emacs.d/slime/swank-loader.lisp" :verbose t) (funcall (read-from-string "swank:start-server") "/tmp/slime.2040" :coding-system "iso-latin-1-unix"))
Use (quit) to quit, (tl) to return here after an interrupt.
arc> Error: "reference to undefined identifier: _progn"
arc>
I don't know why SLIME sent a progn to Arc, but as far as I can tell, Arc is working just fine even with the complaint. Good luck! |