cider

jimmysit0 2025-10-04T21:18:05.698879Z

hey, I'm migrating from calva to cider and there's something I don't really like, and its the fact that when I eval something, the result pops up in a new buffer, *cider-result*. Can I get the evaluation to be "output" in my repl window?

Sophie Bosio 2025-10-06T12:21:23.591319Z

IIRC, Calva will sometimes print the results of evaluations to the REPL. In CIDER, the default way of displaying a result is with an overlay. • cider-eval-defun-at-point (bound to C-c C-c) will eval the top-level form and show the result in an overlay • cider-eval-last-sexp (bound to C-c C-e) will eval the last sexp at point and show the result in an overlay In case you want to inspect a result, for example because it's large result (map, vector, etc.) or you want to be able to copy from the result, there are equivalent functions that will instead output the result to *cider-result* as you have noted: • cider-pprint-eval-defun-at-point (bound to C-c C-f) will eval the top-level form and print the result to *cider-result*cider-pprint-eval-last-sexp (bound to C-c C-p) will eval the last sexp at point and print the result to *cider-result* If you want to send the result to the REPL for further processing, there's a command called cider-eval-last-sexp-to-repl (bound to C-c M-e by default) that will insert the result at your REPL prompt. But it won't print is as if it were a result, it will insert it at your prompt. If you want to keep that result in your REPL for later reference, it's possible to select some code and use cider-insert-region-in-repl (`C-c C-j C-r`) to send that code to the REPL. Then you can press enter and see the result in your REPL window. There are other cider-insert-*-in-repl functions you may find interesting as well.

🙏 1
oyakushev 2025-10-04T21:33:45.780019Z

This doesn't sound like the default behavior. Do you mean in-place evaluation (evaluating in code buffer using C-x C-e or C-c C-c) or writing the expression inside the *cider-repl* buffer?