On Sun, Nov 22, 2009 at 11:45:46AM -0500, John Harrop wrote:

>Nothing so serious as a hang, though, and at least I can do basic things in
>my IDE without reaching for the frelling manual every two minutes to look up
>some key-combination :)

I suspect both models are going to be important.  I feel the same way
you do when I'm running an IDE rather than vim.

Oddly enough, I've found myself most productive with a repl in it's
own window, and a short script (below) in user.clj to let me specify a
namespace to test.

I put this in a 'repl' directory that I only add to my classpath for
the repl script.

David

(println "Running user startup")
(use 'clojure.contrib.repl-utils)
(use 'clojure.contrib.str-utils)
(use 'clojure.contrib.java-utils)
(use 'clojure.contrib.def)
(use 'clojure.contrib.ns-utils)
(use 'clojure.contrib.test-is)
(use 'clojure.contrib.sql)
(use 'clojure.stacktrace)

(set! *warn-on-reflection* true)

;;; The NS that we are testing/working on.
;;; This can be given through the java property work-ns, e.g.
;;;   ./run.sh -Dwork-ns=org.davidb.chunk-file
(def *work-ns*
   (symbol
     (or (System/getProperty "work-ns")
         'org.davidb.foo)))

;;; A testing NS.
(def *test-ns*
   (symbol
     (or (System/getProperty "test-ns")
         (symbol
           (re-sub #"[^\.]+$" #(str "test-" %)
                   (name *work-ns*))))))

; (use *work-ns*)
(defn l [] (binding [*warn-on-reflection* true]
              (use *work-ns* :reload)))
(defn t []
   (binding [*warn-on-reflection* true]
     (require *test-ns* :reload)
     (run-tests *test-ns*)))
(defn i [] (in-ns *work-ns*))

; Load the User's test-user.clj if present.
(try (load "/test-user")
   (catch java.io.FileNotFoundException e
     (println "No test-user.clj found in classpath.")))

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