On Thu, Apr 8, 2010 at 2:42 AM, Tassilo Horn <tass...@member.fsf.org> wrote:
> I already installed leiningen, so all clojure files are already
> contained in leiningen-1.1.0-standalone.jar somewhere in
> ~/.m2/repository/.  Can I use those somehow?

Sure, you can set lein-swank as a dev-dependency of your project, then
run "lein swank" to start the server. M-x slime-connect will open a
connection from within Emacs. This is probably the best way to do it.
Standalone M-x slime has never been intended for anything more than
experimentation and letting newbies get going faster, since it doesn't
have a very useful classpath.

M-x swank-clojure-project is also an option, but from a packaging and
maintenance perspective it's a lot easier to distribute updates for
clojure code than for elisp, so solutions that rely on as little
changing elisp as possible are preferable.

> BTW: Now I installed slime, slime-repl, clojure-mode and swank-clojure
> from ELPA.  I symlinked the leiningen-1.1.0-standalone.jar in the maven
> repo from ~/.clojure/ so that the jar should be picked up.  When I do
>
>  M-x slime RET
>
> I only get this error:
>
> ,----
> | Clojure 1.1.0
> | user=> java.io.FileNotFoundException: Could not locate 
> swank/swank__init.class or swank/swank.clj on classpath:  (NO_SOURCE_FILE:0)
> | user=> user=> java.lang.ClassNotFoundException: swank.swank 
> (NO_SOURCE_FILE:0)
> | user=> user=> nil
> | java.lang.ClassNotFoundException: swank.swank (NO_SOURCE_FILE:0)
> `----

Currently swank-clojure.el looks for the presence of a ~/.clojure
directory, and if it finds it, it will attempt to use it. Otherwise it
will attempt to auto-configure itself with the ~/.swank-clojure
directory.

This is probably no longer the right thing to do. Probably a better
idea would be to only use ~/.clojure if it detects clojure and
swank-clojure jars in there, or possibly to ignore it altogether. Any
opinions on this subject? At the very least it should be
better-documented.

-Phil

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to