[ESS] Start R process from project root

Jeremie Juste jerem|eju@te @end|ng |rom gm@||@com
Fri Oct 16 22:32:17 CEST 2020


Hello Pavel,

A simple way to achieve that would be to use bookmarks or file
registers.

(info "(emacs) Registers")

For instance you can set a file register like the following in your init.el|.emacs
(set-register ?r '(file . "favourite-project/"))

Notice that the file register works fine for directories as well. 

then you can call jump-to-register. I use it all the time so I rebinded
it to C-M-z
(global-set-key (kbd "C-M-z") 'jump-to-register)

Then with the command C-M-z r you are in your favourite-project from
which you can start R.

One more thing, you might also want to do
(setq ess-ask-for-ess-directory nil) 

so that R does ask you where you want to start R. :-)

HTH,
Jeremie



More information about the ESS-help mailing list