Re: Clarification on setting up Clojure, Lein and Emacs on fedora

242 views
Skip to first unread message

Moritz Ulrich

unread,
Dec 29, 2012, 8:36:35 PM12/29/12
to clo...@googlegroups.com
If you have a recent (24) Emacs, use M-x package-install and install
clojure-mode and nrepl. nrepl is the successor-in-spirit of slime, as
many people consider slime as deprecated. When you have access to
leiningen 2 (strongly recommended), the whole setup simplifies to:

1) Install leiningen 2 & Emacs 24
2) In Emacs: Add Marmelade repository
3) In Emacs: M-x package-install RET nrepl RET
4) nrepl-jack-in

On Sun, Dec 30, 2012 at 12:47 AM, Sayth Renshaw <flebbe...@gmail.com> wrote:
> Just want to make sure I get this right. I am running F18 and am setting up
> clojure.
>
> These would be the packages to install, correct?
>
> clojure.noarch
> clojure-contrib.noarch
> leiningen.noarch
> emacs-slime.noarch
>
> For slime and the emacs repl
> clojure-mode, slime, slime-repl and swank-clojure
> restart M-X to install the clojure REPL.
>
> For lein - better then maven, yes?
> Just install the package and then use on command line. But how in Emacs?
>
> Emacs
> Is there anything I should be putting in my .emacs to get project and syntax
> support and the ability to send select text to a REPL?
>
> General Question
> Is there a code linter beautifier?
>
> Resources
> Lenigen - https://github.com/technomancy/leiningen/blob/master/README.md
> Tutorial - http://www.learningclojure.com/
> Volkmann - http://java.ociweb.com/mark/clojure/article.html#GettingStarted
> Tutorial -
> http://pramode.net/clojure/2010/04/29/getting-started-with-clojure/
> Fedora Clojure Docs - http://fedoraproject.org/wiki/Features/Clojure
>
>
> Anything advice on the above or something obvious I have missed that will
> get me going quicker?
>
> Thank You
>
> Sayth
>
>
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

John Gabriele

unread,
Dec 29, 2012, 10:52:15 PM12/29/12
to clo...@googlegroups.com
Sayth,

Not sure I follow everything in your post, but here are some tips:

 1. You don't need to "install" Clojure itself. Leiningen takes care of that for you. See

 2. Make sure you install Emacs 24. I don't know what the Fedora incantations are for this.

 3. Once you've got Emacs 24 installed, add this to your ~/.emacs file:

    ~~~elisp
    (require 'package)
    (add-to-list 'package-archives
                 '("marmalade" . "http://marmalade-repo.org/packages/"))
    (package-initialize)
    ~~~

    and then you can have Emacs install clojure-mode (and any other Emacs packages you desire) via "M-x package-install RET <the-package-name>" (for example, clojure-mode).

 4. To get a Clojure repl in Emacs, my understanding is that slime is no longer the state of the art, and that you instead want to use nrepl.el. Some info regarding that at https://github.com/technomancy/clojure-mode (see the doc directory and wiki there too).

As far as a code beautifier, within Emacs you can select a region and then do "M-x indent-region" to autoindent everything you've selected.

---John

John Gabriele

unread,
Dec 29, 2012, 11:13:00 PM12/29/12
to clo...@googlegroups.com
On Saturday, December 29, 2012 10:52:15 PM UTC-5, John Gabriele wrote:
Sayth,

Not sure I follow everything in your post, but here are some tips:

 1. You don't need to "install" Clojure itself. Leiningen takes care of that for you. See


Whoops, sorry, forgot to finish typing that :) : I meant to add, "See https://github.com/clojuredocs/cds/blob/master/articles/tutorials/getting_started.md ".

---John

Phil Hagelberg

unread,
Dec 29, 2012, 11:31:42 PM12/29/12
to clo...@googlegroups.com
I believe Fedora ships with Leiningen 1.7.1, which is not what you
want. It's better to install manually, see http://leiningen.org; that
way you will get 2.x. Don't install Clojure or Contrib through your OS
package manager.

The Emacs support for Clojure is documented here:
https://github.com/technomancy/clojure-mode/blob/master/doc/index.md

Please let us know if there's anything unclear that could be improved
about that documentation; it's always helpful to get a fresh
perspective when it comes to docs.

-Phil

Sayth Renshaw

unread,
Dec 29, 2012, 11:46:31 PM12/29/12
to clo...@googlegroups.com
Thank you Phil. I have just reported that leinigen 1.7 is un-installable on F18 due to a mass of broken dependencies. 

> Don't install Clojure or Contrib through your OS package manager. 

Oops ok, yum remove them then as I had already installed them.

https://github.com/technomancy/clojure-mode/blob/master/doc/index.md will read and let you know if I find anything that could be improved.

Sayth

Phil Hagelberg

unread,
Dec 30, 2012, 12:03:10 PM12/30/12
to clo...@googlegroups.com
On Sat, Dec 29, 2012 at 8:46 PM, Sayth Renshaw <flebbe...@gmail.com> wrote:
> https://github.com/technomancy/clojure-mode/blob/master/doc/index.md will
> read and let you know if I find anything that could be improved.

Actually I just updated the Emacs tutorial on clojure-doc.org last
night, so this might be a better resource if you're looking for
something more in-depth:

http://clojure-doc.org/articles/tutorials/emacs.html

-Phil
Reply all
Reply to author
Forward
0 new messages