Open slipset opened 7 years ago
this is good, but then all the repls should agree on this protocol -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Great proposal from @cgrand on Slack:
(cond
(find-ns 'lumo.repl) :lumo
(find-ns 'planck.repl) :lumo
:else :clj)
Currently find-ns
has undesirable side-effects. (See https://dev.clojure.org/jira/browse/CLJS-2088)
This expression should be safe:
(cond
(find-ns 'clojure.java.io) :clj
(find-ns 'clojure.clr.io) :cljr
(find-ns 'lumo.repl$macros) :lumo
(find-ns 'planck.repl$macros) :planck
(find-ns 'cljs.core$macros) :cljs-js
(find-ns 'cljs.core) :cljs-jvm
:else :unknown)
In working on http://github.com/clojure-emacs/inf-clojure I see that we need to take different code-paths depending on which REPL we're interacting with. example:
If each REPL had a function like
capabilities
, which delivered a map (or something) which described the capabilities of the REPL along with the functions to invoke for those capabilities, the life of tools likeinf-clojure
would be simpler.https://github.com/mfikes/planck/issues/466