Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to terminate the process in cider-repl?

When running into a deadlock because of an infinite loop, how can I exit from the cider-repl?

When it happens, I have to kill the emacs, or even reboot my computer to kill the cider-repl. Is there a better way of solving this?

like image 600
cranehuang Avatar asked Nov 17 '14 06:11

cranehuang


2 Answers

The key combination C-c C-c will break from a loop at the top level of the cider repl, while leaving emacs and the repl running.

In a regular terminal repl, the equivalent is C-c.

like image 119
noisesmith Avatar answered Oct 12 '22 20:10

noisesmith


When you're editing a file and have 'jacked-into' a cider repl, by default typing C-c C-c runs cider-eval-defun-at-point, but typing C-c C-b runs cider-interrupt, which cancels whatever is being evaluated.

like image 21
Adam Lee Avatar answered Oct 12 '22 20:10

Adam Lee