Hi, Am 27.02.2009 um 08:20 schrieb Konrad Hinsen:
I have been trying in vain to get the namespace docstring of anything with print-namespace-doc. It doesn't say what exactly it wants as an argument (a symbol, a string, or a namespace object), but it calls ns-name, which wants a symbol, so I give it a symbol. But the symbol doesn't have any metadata. I went on to look for namespace-related metadata elsewhere, but the namespace object doesn't have any either. Of course I looked at namespaces that actually have docstrings in their source code (for example clojure.contrib.types). So where does the namespace docstring go?
I suppose where it belongs: Clojure 1:1 user=> (require 'clojure.contrib.types) nil 1:2 user=> (doc clojure.contrib.types) ------------------------- clojure.contrib.types nil nil 1:3 user=> (doc clojure.core) ------------------------- clojure.core Fundamental library of the Clojure language nil 1:4 user=> (ns foo.bar "A Foobar namespace") nil 1:5 foo.bar=> (doc foo.bar) ------------------------- foo.bar A Foobar namespace nil The only difference between clojure.contrib.types and foo.bar is, that foo.bar is defined at the Repl. clojure.contrib.types is defined in a file, which is then loaded. The same is true for clojure.core, but here the meta data is set via alter-meta and it is not loaded the "usual" way with require. It seems, the metadata gets lost somehow. Sincerely Meikel
smime.p7s
Description: S/MIME cryptographic signature