Friday, June 29, 2012

.emacs style Clojure rc files

The following will let you run clojure code in the current namespace, from a dotfile in your home directory.


(require '[clojure.java.io :as io])


(load-string (slurp (io/file (System/getenv "HOME") *rc-file*)))


2 comments:

Brandon said...

you have to qualify `io/file`

Shantanu Kumar said...

Will this work on Windows?