Fork me on GitHub
#planck
<
2020-01-07
>
lambdam11:01:01

Humm, I compiled planck with defn instead of defn- at https://github.com/planck-repl/planck/blob/master/planck-cljs/src/planck/repl.cljs#L785 The warning disappeared but still no completions. @mfikes is there a precise reason to have this function private? The lumo equivalent isn't private: https://github.com/anmonteiro/lumo/blob/master/src/cljs/snapshot/lumo/repl.cljs#L1477 @bozhidar I also tried this form for Planck completion: (map str (planck.repl/get-completions \"%s\")) which returns a sequence instead of a JS array, as does the Lumo form:

(let [ret (atom nil)]
     (lumo.repl/get-completions \"%s\"
       (fn [res] (reset! ret (map str res))))
     @ret)
I don't know very well Emacs' completion plumbing. The *Messages* buffer keeps on displaying [No matches]. @bozhidar do you have any advice to inspect/debug what is happening (or rather what is not happening)? Thanks

bozhidar14:01:49

Basically, by default inf-clojure expects a list/seq of strings that are read by the Emacs Lisp reader and converted to an Emacs Lisp list. If your form returns a list of strings it should work fine IMO.

pyrmont23:01:12

@mfikes Would it be correct to say that functions in that namespace with a doc string are all mistakenly private?