Hi, I think what is going on here is that the namespace ns-a does not exist until the code is executed; however, in order execute the code it must be first compiled.
It is during the compilation phase that the namespace 'ns-a' cannot be found, because indeed, it does not yet exist. I cannot think of an easy way around this at the moment. I'm curious what the reasoning behind creating this temporary namespace is? There may be a different approach that won't get you caught up between the compilation/execution phases. /mike. On Fri, Nov 21, 2008 at 8:31 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Forgot to mention... > >> (defn f [] >> (try >> (create-ns 'ns-a) >> (in-ns 'ns-a) >> (refer-clojure) >> (defn fn-a [] :a/a) >> (in-ns 'user) >> (println ns-a/fn-a) ; Expect some function pointer string. >> (finally (remove-ns 'ns-a)))) > > If I change the (println...) form for the following: > > (println (all-ns)) > > #<Namespace ns-a> appears in the list and if instead it is > > (println (find-ns 'ns-a)) > > I also get #<Namespace ns-a>. > > Benoit > > > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---