I’m trying to delve into the clojure elisp code. Is the the correct place to ask questions? can someone explain or perhaps point me to an explanation of the evaluation protocol. In particular from elisp, cider-interactive-eval seems to call cider-nrepl-request;eval which appears to ask clojure to evaluate a designated expression. But I don’t yet understand what happens to the several results. 1) the clojure object returned, (I assume the clojure end pretty prints this and passes it back to elisp as maybe a string), 2) the stdout which the clojure expression printed, 3) the stderr the clojure expression printed, 3) some designator of the exception if such was raised. 4) whether the evaluation was interrupted or timed out
Are these passed back as a data structure, or are they not acutally passed back but handled by various callbacks? I see the callbacks, but I don’t see a description ?yet? about what arguments they are called with.
I would like to write a different entry point to cider-interactive-eval which will annotate the region with the stderr if there are lines of stderr and there was no exception.
it looks like maybe I can do this simply by provided an appropriate callback. but that’s only a suspicion.
there’s a setting you can set to log all of the nrepl traffic between the client (emacs) and the server (the nrepl server running in your project). You should turn that on and look at what goes back and forth
but it’s largely maps like
{:op :eval :code "(+ 1 1)"}
{:out "2" :done true}
there’s some book keeping like each message has an id and the responses include which id they are in response to
but it’s basically a network repl (nrepl)
https://docs.cider.mx/cider/troubleshooting.html#missing-nrepl-messages-buffer
m-x nrepl-toggle-message-logging and then you can watch the traffic
ah yes, that’s an interesting piece of information. It indeed gives a bit of insight.
I see the following in the message buffer on evaluaing a defun which contains my macro call.
(<--
id "27"
session "6e181038-8061-49d4-9cd9-052b7c557203"
time-stamp "2025-11-13 16:48:02.421994000"
err "Unreachable code: [:launch-the-missiles a b]
"
)
that means the error message was communicated … now I just need to figure out how to intercept it and react to it.
Hello. I've asked a question on the discourse forum, but this chat is probably a better place for asking it. Can cider copy the selected region to the repl buffer along with the result of evaluation? I'd like to keep the history of all interaction with repl. https://clojureverse.org/t/can-cider-copypaste-the-selected-region-into-the-repl-buffer/14774
There’s cider-eval-last-sexp-to-repl that does something similar.