Emacs built with the emacs-starter-kit from
http://github.com/technomancy/emacs-starter-kit/tree/master gets both
clojure and clojure.contrib set up correctly.

To use other jars, I had to hack the emacs-starter-kit stuff slightly; it
seems that swank-clojure by default adds all jars in "~/.clojure" to the
classpath, but then clojure-mode.el overwrites that with it's own classpath:
 (setq swank-clojure-jar-path (concat clojure-src-root
"/clojure/clojure.jar")
        swank-clojure-extra-classpaths
        (list (concat clojure-src-root "/clojure-contrib/src/"))))

I wasn't sure how to merge the two nicely so I just replaced the above with:
 (setq swank-clojure-jar-path (concat clojure-src-root
"/clojure/clojure.jar")
        swank-clojure-extra-classpaths
        (append  (directory-files "~/.clojure" t ".jar$")
         (list (concat clojure-src-root "/clojure-contrib/src/")))))

Once that's done, I can put any jars I like in ~/.clojure and they get added
to the classpath when I re-start slime.

- Korny
On Thu, Apr 2, 2009 at 6:22 AM, Daniel Jomphe <danieljom...@gmail.com>wrote:

>
> Let's say I *hate* dealing with Java classpaths, especially within
> IDEs.
> Somehow, it's always the hardest configuration part of setting up a
> project.
>
> Let's add I want to use clojure + clojure.contrib.
>
> If my mileage is representative at all of most newcomer's experiences
> trying to get acquainted with clojure, this is very bad: all the
> following editors have a plugin for clojure, but none of them comes
> with an easy way to add clojure.contrib to the classpath.
>
> emacs+SLIME+clojure-mode - works incredibly great for core clojure
> netbeans - works great for core clojure
> intellij - works ok for core clojure; if I add contrib's jar to the
> libs, it seems to see it somehow, but still doesn't work
>
> I have spent ~30 mins in each one of them trying to make it work, and
> failed. I have also spent some time skimming different tutorials, and
> it looks like this is not covered.
>
> Would you fellow clojurians have wise advice for me? While I await
> your answers, I'm going to try eclipse. I think I've read Laurent
> Petit, the other day, saying his eclipse plugin automatically handles
> classpaths.
>
> I would *love* to know how to make it work in each one of these
> editors; I'm not yet decided on which one I want to use.
> >
>


-- 
Kornelis Sietsma  korny at my surname dot com
"Every jumbled pile of person has a thinking part
that wonders what the part that isn't thinking
isn't thinking of"

--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to