One of my problems, I just discovered, was that I was sometimes
testing with a namespace continaing a hyphen in a file also containing
a hyphen.  e.g.

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

Clojure, of course, wants the file to be named my_foo.clj
(underscore), and said as much in the error messages, but I failed to
notice this little detail!

Anyway, user error, as you predicted above :)  Things are working much
better now.


On Mar 13, 11:18 am, Meikel Brandmeyer <m...@kotka.de> wrote:
> 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
>
>  smime.p7s
> 5KViewDownload
--~--~---------~--~----~------------~-------~--~----~
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
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