Re: Find file from namespace symbol

2010-09-30 Thread David Jagoe
Thanks chaps, that's what I was looking for. Luckily I came across an easier solution to the underlying problem (i.e. using session and reload middleware in ring): http://groups.google.com/group/ring-clojure/browse_thread/thread/a0dffa86be0896ff# basically, using defonce allows me to create memor

Re: Find file from namespace symbol

2010-09-29 Thread Laurent PETIT
But note that a namespace's definition may be spread among several source files, though. So you're just able to localize the "main" file of the namespace, which contains the (ns) directive, but you can't localize the "loaded" files participating to the namespace, those you contain (in-ns) directiv

Re: Find file from namespace symbol

2010-09-29 Thread Scott Jaderholm
swank.commands.basic> (find-ns-definition 'clojure.set) (("clojure.set" (:location (:zip "/home/scott/project/lib/clojure-1.2.0-master-20100813.160144-94.jar" "clojure/set.clj") (:line 1) nil))) Scott On Wed, Sep 29, 2010 at 6:34 PM, Jeff Valk wrote: > On Wed, 29 Sep 2010 at 15:18, David Jagoe

Re: Find file from namespace symbol

2010-09-29 Thread Jeff Valk
On Wed, 29 Sep 2010 at 15:18, David Jagoe wrote: > Anyone know of a utility that returns a absolute filename given a > namespace symbol? If you're using Emacs/SLIME, you could use swank-clojure's classpath browsing information. The var "available-classes" in namespace "swank.util.class-browse"

Find file from namespace symbol

2010-09-29 Thread David Jagoe
Hi all, Anyone know of a utility that returns a absolute filename given a namespace symbol? Actually what I'm trying to do is adjust ring.middleware.reload to only reload source files if they've changed (otherwise I run into problems with session management), so if anyone knows of utilities that a