Programming Clojure – classpath for Emacs and Slime

This is probably obvious to a lot of people, but I had a hard time trying to figure out how to get emacs/slime to see my clojure and java stuff. I was able to get it all up and running when I started Clojure from the command line, but when using slime, it was unable to locate all the extra stuff I wanted it to. After a bit of googling, I found out how to do it. Put the following line before calling (require ‘swank-clojure-autoload) in your dot emacs:

(setq swank-clojure-extra-classpaths (list "/class/path/1" "/class/path/2" "/class/path/3" "etc"))

Restart emacs, start slime, and it will now find everything on those paths đŸ™‚

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s