At this moment in time, I am using nrepl primarily to talk to Clojurescript apps. I like to use nrepl from within emacs. I start nrepl by typing M-x nrepl-jack-in
.
Unfortunately, my nrepl session often gets completely hung. When this happens, I dutifully kill the 3 buffers related to nrepl. These buffers are:
*nrepl*
*nrepl-connection*
*nrepl-server*
*nrepl-server*
also has an active process, it ask me if I want to close it, and I say yes.
I then type M-x nrepl-jack-in
again.
This is a pain.
I would like to overload nrepl-jack-in
so that it automatically checks if any of these 3 buffers exist. If any of them do exist, it will kill these buffers and any active processes associated with these bufers. After doing this, the overloaded nrepl-jack-in
will proceed as usual. I would like this because then, whenever I detect that nrepl has decided to hang itself again, I could just type M-X nrepl-jack-in
and restart what I was doing.