Hi,

Am 13.03.2009 um 15:02 schrieb Mark Feeney:

So you could try \rf, but for me this still doesn't quite work for
me.  If I have just one file:

foo.clj
--------
(ns foo)
(+ 1 1)

I can't \ef it.  I get the same "line 23" error you get.  If I \rf it
I get:

(clojure.core/load "/foo")
#<CompilerException java.io.FileNotFoundException: Could not locate
foo__init.class or foo.clj on classpath:  (REPL:0)>

I've tried making sure the path to foo.clj is on my classpath, but
that doesn't appear to work either.  Not really sure what's up.

Make sure, that the file is in the Classpath of the *server* not
the client. The client is only a proxy transferring in- and output
between the shell and the server. So the important part for
Java things like the Classpath is the server.

Work-arounds I've used:

1) don't set a namespace (just work in the user ns implicitly)
2) temporarily change your ns macro to put you in the user ns.  i.e.
in my example above, changing (ns foo) to (ns user) works, since the
user ns always exists.
3) Bring up the REPL (\sr) and execute your ns macro there before
\ef'ing or \et'ing your file.

These all work, because you circumvent the classpath.

Tons of promise with this new version of VimClojure.  Just some bugs
(or user education?) to get through first.

I boldly claim, that that's user education. 95% of problems
stem from misuse by the user. The above case of \ef vs. \rf
is how Clojure works. \rf goes the rigth way through require
setting up the namespace correctly. \ef is just a convenience.
But that's not a reason for being lazy. If you don't setup the
environment correctly, things won't work.

But VimClojure is not perfect. I will try make it more robust
and to point out such things in the docs.

Sincerely
Meikel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to