This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-19
Channels
- # bangalore-clj (1)
- # beginners (8)
- # boot (102)
- # cider (1)
- # clara (14)
- # cljs-dev (2)
- # cljsrn (2)
- # clojure (49)
- # clojure-poland (3)
- # clojure-russia (4)
- # clojure-serbia (1)
- # clojure-spec (5)
- # clojure-ukraine (1)
- # clojurescript (181)
- # core-async (4)
- # cursive (2)
- # datomic (7)
- # dirac (34)
- # figwheel (3)
- # fulcro (21)
- # hoplon (5)
- # om (1)
- # parinfer (4)
- # planck (27)
- # re-frame (30)
- # reagent (11)
- # rum (6)
- # shadow-cljs (22)
- # spacemacs (4)
- # unrepl (26)
hi @mfikes I see that planck returns a #js array of completions. inf-clojure just blindly calls read
in elisp on this structure which fails due to the #js reader. Can you tell me why this is returned as a javascript array and not a clj immutable vector? Just trying to figure out where the correct bug report should go
That API actually just changed recently, fairly drastically, so if something is calling it, it may break
There is one public API, planck.repl/get-arglists
that was added for inf-clojure
(and IIRC, Lumo has the same API with same semantics)
as it stands get-completions is fine if i strip off the #js and convert to a list in elisp
if that is intended to be stable that or something very similar that is meant for consumption would be fine
But, it really has its own semantics, tied to the way it works with the Linenoise buffer. An example call might be (planck.repl/get-completions "(cljs.core/ma")
No, it wasn't intended to be stable. It internally changed what it was returning with https://github.com/mfikes/planck/commit/863b7b14383aa40427923f8bb5d11dc88a501a6f
I suppose if you build completions using dir
then the result is fairly portable across REPLs.
But you will run into trouble if you assume it is doing what you might thing it is doing.
For example, compare (planck.repl/get-completions "fo")
vs. (planck.repl/get-completions "for")