If you want to change slime s notion of the current directory, press ,cd<CR>
(<CR>
= Enter) and type in the path.
However, this is not really the proper solution to the problem. The proper solution involves setting up the classpath so that you can (use your.namespace). To this end, I wonder if this very long answer I provided to a question about setting up the classpath properly might be helpful... :-)
Incidentally, I somewhat object to solutions involving add-classpath
, as that is currently marked as deprecated and was never meant to be relied upon in the first place... Though on the other hand, it certainly may work perfectly well and it s worth knowing about just in case it might come in handy as a quick-and-dirty classpath injection gimmick.
Now if you want a real nice SLIME-based development environment, I d like to point you to a very nice clojure-project
elisp function by Phil Hagelberg which sets up all relevant variables and launches SLIME in the main directory of a project (to be supplied interactively). It s been posted to the Clojure group, in fact here s a link to the Mail Archive s copy of that message. Note there s one thing which needs correction in there -- swank-clojure-jar-path
ought to be set to the full path to clojure.jar
. Otherwise it s a fantastic tool.
Actually I mentioned that function in this response to a question about managing the classpath when using Clojure and Emacs. The other answers might be interesting as well.
And if you re only just beginning to use SLIME, do watch the SLIME video, linked to from SLIME s homepage which is now available under a link posted by Michiel in the comments. It s a very good introduction. :-)