Enable zero buffer to execute R code in emacs-ess

I switched to using emacs-ess to develop my R code, and it works great. I would like to be able to write a small R-code, which I use to debug my R script, into a zero buffer and be able to execute the zero buffer code in the R processing buffer. I learned how to change the buffer mode from zero to text by placing it in a file .emacs is the following:

(setq initial-major-mode 'text-mode) 

Is there a similar statement that I can put in a .emacs file that would force the buffer to use ess-mode from scratch? I tried the following, which leads to an error about an invalid type argument:

 (setq initial-major-mode 'ess-mode) 
+4
source share
1 answer

You want (setq initial-major-mode 'R-mode) . Alternatively, you can simply execute the Mx R-mode when the buffer is zero to change the main mode.

+8
source

Source: https://habr.com/ru/post/1306968/


All Articles