I'm attempting to use clojure.contrib.io's (1.2) append-spit
to append to a file (go figure).
If I create a text file on my desktop, as a test, and attempt to append to it in a fresh repl, this is what I get:
user> (append-spit "/Users/ihodes/Desktop/test.txt" "frank")
Backtrace:
0: clojure.contrib.io$assert_not_appending.invoke(io.clj:115)
1: clojure.contrib.io$outputstream__GT_writer.invoke(io.clj:266)
2: clojure.contrib.io$eval1604$fn__1616$G__1593__1621.invoke(io.clj:121)
3: clojure.contrib.io$fn__1660.invoke(io.clj:185)
4: clojure.contrib.io$eval1604$fn__1616$G__1593__1621.invoke(io.clj:121)
5: clojure.contrib.io$append_writer.invoke(io.clj:294)
6: clojure.contrib.io$append_spit.invoke(io.clj:342)
7: user$eval1974.invoke(NO_SOURCE_FILE:1)
8: clojure.lang.Compiler.eval(Compiler.java:5424)
9: clojure.lang.Compiler.eval(Compiler.java:5391)
10: clojure.core$eval.invoke(core.clj:2382)
11: swank.commands.basic$eval_region.invoke(basic.clj:47)
12: swank.commands.basic$eval_region.invoke(basic.clj:37)
13: swank.commands.basic$eval807$listener_eval__808.invoke(basic.clj:71)
14: clojure.lang.Var.invoke(Var.java:365)
15: user$eval1972.invoke(NO_SOURCE_FILE)
16: clojure.lang.Compiler.eval(Compiler.java:5424)
17: clojure.lang.Compiler.eval(Compiler.java:5391)
18: clojure.core$eval.invoke(core.clj:2382)
19: swank.core$eval_in_emacs_package.invoke(core.clj:94)
20: swank.core$eval_for_emacs.invoke(core.clj:241)
21: clojure.lang.Var.invoke(Var.java:373)
22: clojure.lang.AFn.applyToHelper(AFn.java:169)
23: clojure.lang.Var.applyTo(Var.java:482)
24: clojure.core$apply.invoke(core.clj:540)
25: swank.core$eval_from_control.invoke(core.clj:101)
26: swank.core$eval_loop.invoke(core.clj:106)
27: swank.core$spawn_repl_thread$fn__489$fn__490.invoke(core.clj:311)
28: clojure.lang.AFn.applyToHelper(AFn.java:159)
29: clojure.lang.AFn.applyTo(AFn.java:151)
30: clojure.core$apply.invoke(core.clj:540)
31: swank.core$spawn_repl_thread$fn__489.doInvoke(core.clj:308)
32: clojure.lang.RestFn.invoke(RestFn.java:398)
33: clojure.lang.AFn.run(AFn.java:24)
34: java.lang.Thread.run(Thread.java:637)
Which clearly isn't what I wanted.
I was wondering if anyone else had these problems, or if I'm doing something incorrectly? The file I'm appending to it not open (at least by me). I'm at a loss.
Thanks so much!