Uploaded image for project: 'Clojure'
  1. CLJ-1191

Improve apropos to show some indication of namespace of symbols found

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Completed
    • Affects versions: Release 1.6, Release 1.5
    • Fix versions: Release 1.7
    • Labels:
    • Approval:
      Ok
    • Patch:
      Code and Test

      Description

      apropos does find all symbols in all namespaces that match the argument, but the return value gives no clue as to which namespace the found symbols are in. It can even return multiple occurrences of the same symbol, which only gives a clue that the symbol exists in more than one namespace, but not which ones. For example:

      user=> (apropos "replace")
      (postwalk-replace prewalk-replace replace re-quote-replacement replace replace-first)
      
      user=> (apropos 'macro)
      (macroexpand-all macroexpand macroexpand-1 defmacro)
      

      It would be nice if the returned symbols could indicate the namespace.

      With the screened patch clj-1191-v3.patch applied the output for the examples above becomes:

      user=> (apropos "replace")
      (clojure.core/replace clojure.string/re-quote-replacement clojure.string/replace clojure.string/replace-first clojure.walk/postwalk-replace clojure.walk/prewalk-replace)
      
      user=> (apropos 'macro)
      (clojure.core/defmacro clojure.core/macroexpand clojure.core/macroexpand-1 clojure.walk/macroexpand-all)
      

      Patch: clj-1191-v3.patch

      Screened by: Alex Miller

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jafingerhut Andy Fingerhut
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: