Hi mperdikas.
I also like to have full control over my dependencies and versions, so I 
wrote a script that
- you give it a bunch of directories, and it automatically finds all the 
jars in them an resolves conflicts by selecting latest versions 
automatically
- prints the list of jars (explicitly saying what it does, which jars are 
included, that is a prerequisite IMO)
- starts a REPL with either swank or nrep or just a plain one
Another fun thing is that it's just a single Python script and so it starts 
fast,
and it does not fetch anything from the internet, so you won't run into 
problems working offline.
I sometimes run "lein deps" to fetch dependencies recursively, and from 
thereon I use streamlined.
For production you can save your jars in an svn repo or something, makes it 
easy to have a controlled deployment.
Anyway, I realize that's not the most common approach to running Clojure in 
this community, 
but I like to drive manual, so that's what I do, and it sound like you do 
too.
Find the script here:
http://furius.ca/pubcode/pub/conf/bin/streamlined.html



On Sunday, August 26, 2012 6:36:03 AM UTC-4, mperdikeas wrote:
>
> I am now using *Emacs 24.1.1* in *Ubuntu precise* and have managed to 
> install *Clojure-mode*. The next thing I want to do is to use *lein repl*as 
> my Emacs REPL (currently I've set 
> *inferior-lisp-program* to a custom bash script that simply does a *java 
> -jar clojure-1.4.0.jar*). The reason I've resorted to this approach is 
> that it is not clear to me how to control the Clojure version that *lein 
> repl* is using. As a result, although I have downloaded *clojure-1.4.0.jar
> * and am using that in my custom bash script, *lein* reports a totally 
> different Clojure, one that's different even from what */usr/bin/clojure*is:
>
> mperdikeas@ubuntu:~#
> $ which clojure
> /usr/bin/clojure
> mperdikeas@ubuntu:~#
> $ /usr/bin/clojure
> Clojure 1.1.0
> user=> 
> mperdikeas@ubuntu:~#
> $ lein repl
> REPL started; server listening on localhost port 4840
> user=> (clojure-version)
> "1.2.1"
> user=> 
> mperdikeas@ubuntu:~#
> $ cat ./.emacs.d/clojure/repl.sh 
> java -jar ~/.emacs.d/clojure/clojure-1.4.0.jar
> mperdikeas@ubuntu:~#
> $ ./.emacs.d/clojure/repl.sh
> Clojure 1.4.0
> user=> 
>
> So it seems that I have three different Clojures currently available but I 
> can't configure *lein repl *to use the latest one. I've read this SO 
> discussion<http://stackoverflow.com/questions/10135440/lein-clojure-1-3-vs-clojure-1-2-1>
>  but 
> it seems to cover the case where *lein *is invoked in a directory 
> containing a *project.clj* file where the Clojure dependency can be set. 
> However:
>
> *[1]* I' ve experimented a bit with *lein repl* and found that I can 
> invoke it in any arbitrary directory. So where does it get the *
> project.clj* file in those cases?
> *[2]* In the *.emacs* file (according to this helpful 
> article<http://ubercode.de/blog/make-emacs-evaluate-clojure-in-5-minutes>) 
> one 
> is supposed to do a:
>
>     (progn ;; Inferior Lisp                                               
>                                                                             
>             
>     (add-hook 'clojure-mode-hook ;; copied from:                           
>                        
>           (lambda ()
>             (setq inferior-lisp-program "lein repl"))) 
>
> Again, where would *lein* look for the *project.clj* file in the above 
> case? And what if I just want to start writing Clojure in an Emacs buffer 
> without having setup a lein project structure? From where would then *lein 
> repl* get the Clojure version dependency in that case?
>
>
>
>

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

Reply via email to