4

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

  1. Exit nrepl (currently I just kill the buffer)

  2. Reload everything I was working with in nrepl.

The problem I'm trying to solve by doing this is that when I have loaded an ns form and it has an error, I am unable to load the correct code because it keeps giving me the previous error.

Brighid McDonnell
  • 4,293
  • 4
  • 36
  • 61
murtaza52
  • 46,887
  • 28
  • 84
  • 120

2 Answers2

6

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

M-x nrepl-quit

2) Reload everything in the nrepl. (I have this problem when I haave loaded the ns, and it has an error. Then I am unable to load the correct code, it still keeps giving me the previous error)

You can switch to the buffer and use C-c C-k to load the buffer, or just use C-c C-c to eval an expression. Another option would be:

(use :reload 'my.namespace)

in the REPL.

danlei
  • 14,121
  • 5
  • 58
  • 82
0

Check out Stuart Sierra's tools for namespace management at the repl, and read the blog post where he explains how to use it effectively. With a little bit of coding discipline, you won't have to exit your nrepl anymore (or less, in any case). Good luck.

Daniel Szmulewicz
  • 3,971
  • 2
  • 25
  • 26