Hey, Thanks for your answer.
On Thu, 26 Sep 2013 10:34:20 -0700 (PDT) "juan.facorro" <juan.faco...@gmail.com> wrote: > Maybe this bit of code serves your purpose or leads you in some > useful direction. > (defn seq-docs > "Prints the docstrings of a seq of symbols." > [s] > (with-out-str (doseq [x s] (eval `(doc ~x))))) Yup, I figured that out already, but it is kinda unstructured. I was hoping for something better. > (defn ns-docs > "Given a namespace object or its symbol returns a string with all > the docstrings of the interned vars in that ns." > [ns-sym] > (let [refs (->> ns-sym the-ns ns-interns keys (filter (complement > nil?)))] (apply str (seq-docs refs)))) > > (let [nss (all-ns) > docs (->> nss (map ns-docs) (apply str))] > (spit "docs.txt" docs)) > > (spit "special.txt" (seq-docs '(def let loop recur ,,,))) > > > To get the documentation for the special forms you can create a list > with their symbols and use it with the seq-docs function as shown in > the last expression. Well, what I am doing now is basically extracting all that data that is private in clojure's repl.clj. I'm accessing the private data now and reimplemented doc without calling print-doc, basically. Which works pretty well. I think this approach is good enough for me. Will publish the code later. regards, Marek -- -- 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 Note that posts from new members are moderated - please be patient with your first post. 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.