How to stop current execution process in ESS when C-c C-c is unresponsive?

1.4k views Asked by At

I'm handling a datatable with a big amount of text in its fields and when, by mistake, I call a command that starts to print it causes R to freeze or to slowly print everything, I then have to kill emacs and resetup all my windows and buffers. This because during the printing process the command C-c C-c is unresponsive.

Do you knnow how to proceed to handle this without killing the whole working setup ?

1

There are 1 answers

2
Rorschach On

You could kill just the ess process with something like,

(defun ess-abort ()
  (interactive)
  (kill-process (ess-get-process)))
(define-key ess-mode-map (kbd "C-c C-a") 'ess-abort)
(define-key inferior-ess-mode-map (kbd "C-c C-a") 'ess-abort)

eg, in R repl,

library(ggplot2)
toString(diamonds)

followed by C-c C-a. Haven't tried it on Windows however.