nrepl-discover icon indicating copy to clipboard operation
nrepl-discover copied to clipboard

`nrepl-send-op` can only handle a list of strings

Open coventry opened this issue 12 years ago • 1 comments

This means that the currently untested variable type region results in a defun which errors out, because it tries to pass it a list with a list inside it. Stringifying the elements of list fixes the problem on the elisp side, but translation is still needed on the clojure side (probably in wrap-discover, I guess.)

coventry avatar Nov 12 '13 06:11 coventry

Just cleaning up a bit, because I raised all these issues in a hurry prior to the conj:

(eval (nrepl-discover-command-for '(("args" ("test" "region" ""))
                    ("name" . "region-failure"))))
(nrepl-region-failure) 
   => nrepl-netstring: Wrong type argument: stringp, (nil 4909 4782)

There are probably similar problems with the other nrepl-discover argument types which try to send raw lists.

I don't know if it's the right way around this problem, but if you convert the list to a string (the way I'm currently doing in in my modification to the output from nrepl-discover-command-for), then the nrepl-send-op command goes through, and is automatically converted to a lisp on the server side.

coventry avatar Nov 17 '13 18:11 coventry