If I have a namespace symbol e.g. 'clojure.core or a path to a clojure source file how can I get all symbols that are new to the namespace, i.e. not :refer-ed or interned in another namespace?
Those symbols would come from top level defs (and defns) but also inside let bindings and such. My goal is to analyze a namespace and walk the tree effectively doing a find-replace on certain symbols based on a predicate.
Edit: I'm not just looking for top level vars, I'm looking for any symbol. If there's a function with a let binding in it I'm looking for symbol that was bound.