How can I clear and reload an nrepl session in emacs?

I work with emacs and nrepl. How can I do the following:

  • nrepl output (currently I just kill the buffer)

  • Reboot everything I worked with in nrepl .

The problem that I am trying to solve by doing this is that when I downloaded the ns form and it has an error, I cannot load the correct code because it continues to give me the previous error.

+4
source share
2 answers

1) Exiting nrepl (currently I just kill the buffer)

Mx nrepl-quit

2) Reboot everything in nrepl. (I have this problem when I downloaded ns and it has an error. Then I cannot load the correct code, it still keeps giving me the previous error)

You can switch to the buffer and use Cc Ck to load the buffer, or simply use Cc Cc to express the expression. Another variant:

 (use :reload 'my.namespace) 

in REPL.

+6
source

Check out the Stuart Sierra tools for managing namespace in repl and read the post blog, where it explains how to use it effectively. With a bit of coding discipline, you no longer have to leave your nrepl (or less, anyway). Good luck.

0
source

All Articles