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@dam The relevant code is here https://github.com/clojure-emacs/inf-clojure/blob/master/inf-clojure.el#L1497
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.
@dam I think the Planck defn is private owing to a simple oversight https://github.com/planck-repl/planck/commit/8277af6c0662f14fffe374da2850248c2a23ec72
@mfikes Would it be correct to say that functions in that namespace with a doc string are all mistakenly private?