On May 8, 6:49 pm, Baishampayan Ghose <b.gh...@ocricket.com> wrote:
> Asbjørn Bjørnstad wrote:
> > Just speaking for myself, I do this to set up a classpath that
> > includes all the third-party jars I've downloaded and use in
> > my projects. I did this long time ago and haven't looked at it
> > since (Too busy at work.) What's the "proper" way of doing
> > this in a slime setup where swank-clojure sets up the classpath?
>
> You can append you classpath to swank-clojure-extra-classpaths after
> clojure-slime-config has been called.

Right, the huge superfluous classpath for any small project has
been nagging me a bit, so I ended up gutting the slime-project
function from here:

 http://github.com/dysinger/clojure-pom/tree/master

Basically I have a directory per project, and a jars directory
in that directory containing (symlinks to) external jars the
project depends on.

(defun slime-project (path)
  "Setup classpaths for a clojure project & refresh slime"
  (interactive "GPath: ")
  (when (get-buffer "*inferior-lisp*")
    (kill-buffer "*inferior-lisp*"))
  (setq swank-clojure-binary nil
        swank-clojure-extra-classpaths
        (cons (first swank-clojure-extra-classpaths)
              (mapcar (lambda (d) (expand-file-name d path))
                         (directory-files (expand-file-name "jars/"
path) t ".jar$")))
  (save-window-excursion
    (slime)))

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