When I evaluate (use \'hello) to load hello.clj, the REPL complains with the following error:
java.io.FileNotFoundException: Could not locate hello__init.cla
I have the following lines on my .emacs:
(setq swank-clojure-jar-path "~/src/clojure/clojure.jar"
swank-clojure-extra-classpaths (append
(directory-files "~/src/compojure/deps" t ".jar$")
(list
"~/src/swank-clojure/src/main/clojure"
"~/src/clojure-contrib/clojure-contrib.jar"
"~/src/clj/.")))
I load the programe snake.clj which is at ~/src/clj and eval it (C-x h which selects the entire buffer and then C-c C-c to compile). The programs creates a namespace by name snake. Now, from emacs/slime, I do
(use 'snake)
That's it.Now invoke any function defined in the namespace.
Your problem may be that the directory on which you have hello.clj may not be on your classpath. Also make sure you name the namespace properly. If inside hello.clj, you named your name space as hello, then you do (use 'hello).