5

When using Emacs with ESS, when I evaluate functions that take longer to complete (reading in larger files or executing SQL queries), the whole Emacs becomes busy (freezes, hangs, crashes - whatever you call it), and I can't continue editing, using the menu etc until the R session is finished. This seems weird to me, because the R process that is busy is (or should be) completely separate from the main Emacs process. Is there any way to simply send the long block of code to R process and watch it execute, while continuing working with Emacs?

9

While doing due research on this, I stumbled upon a small section in the ESS manual:

The default value of ess-eval-visibly (t) means that ESS calls block Emacs until they finish. This may be undesirable, especially if commands take long to finish. Users who want input to be displayed and Emacs not to be blocked can set ess-eval-visibly to 'nowait. This sends the input to the iESS buffer but does not wait for the process to finish, ensuring Emacs is not blocked.

This is exactly what I wanted, and evaluating (eventually adding to my emacs.el)

    (setq ess-eval-visibly 'nowait) 

does the trick. I was very glad to find it, and thought to post it here in case someone didn't get the exact wording to find this answer in the official ESS manual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.