Tutorial for ClojureBox

clojure, emacs, netbeans

Solution

I can provide a partial answer to this. I hope to get up and running better with ClojureBox myself. I am familiar with emacs in general but not emacs with SLIME which is what ClojureBox provides. If you aren't comfortable with emacs itself I would suggest working with its own tutorial first to get the hang of it.

- How do I create a new clojure file in emacs?

Use standard emacs file creation "C-x C-f" to open a new file. Chose a file name with the extension ".clj" and it will beauto-detected as a clojure file.

- Load an existing clojure file so the forms (values, functions) are available to the REPL?

Use the load-file command (C-c C-l), note that you will have to have saved the file first (C-x C-s). It will now be available to the REPL.

Alternatively to just try out a block of code, highlight the region containing it and use (C-c C-r) to eval-region with SLIME (which is running your clojure REPL).

- Does Programming Clojure http: //pragprog.com/titles/shcloj/programming-clojure answer these questions?

Not that I am aware of. It doesn't really deal with development environments.

For help using the book code with ClojureBox see this thread - http://groups.google.com/group/clojure/browse_thread/thread/b52ca7becceca16a

Also try the Clojure google group in general.

Problem

I'm trying to learn clojure. ClojureBox appears to be similar to LispBox - http: //gigamonkeys.com/lispbox/ which I've used previously. I'm looking for a good clojure specific tutorial on using emacs as it's configured with clojurebox. Here are some specific questions I have: - How do I create a new clojure file in emacs and - Load an existing clojure file so the forms (values, functions) are available to the REPL - What is a good project structure? If I have more than one file what is the best way to proceed and - Does Programming Clojure http: //pragprog.com/titles/shcloj/programming-clojure answer these questions? - Is there a better environment than clojurebox? I've tried enclojure for netbeans and it's currently broken (won't create a project correctly). Netbeans 6.7.1 and enclojure 2009-08-25-release.

Original source