Question

I previously asked how to switch R sessions in ESS, and the use of C-x C-s has sped up my workflow greatly.

However, if I have multiple R sessions (even as few as 3), it can be difficult to remember which on is R, which is R:2, and which is R:3. Is there a way to get ESS, Emacs, or tramp to automatically name the different r sessions based on server / directory that R is running in?

Was it helpful?

Solution

[update]

New versions of ESS (> 12.09) operate on buffer names instead of internal process names. Now you can rename your inferior buffer with M-x rename-buffer and that will do the right thing. You can also configure ess-gen-proc-buffer-name-function to set up the automatic custom renaming of process buffers on startup.

[/update]

R, R:2 etk are the process names in ESS. I asked this question on ess mailing list an year or so ago. It seems like there is no straightforward way of changing this behavior. It's an emacs feature not ESS. You can change buffer names associated with the process but process names will be unchanged.

Uniquify changes buffer names as far I could see. And in any case in recent versions of emacs buffers with same file name are designated with partial paths to make them unique. So it looks like uniquify was adopted into base emacs for files, but not for other stuff like proc names.

OTHER TIPS

Not sure about automatically renaming (and you could ask that on the ESS mailing list) but I sometimes use M-x rename-buffer which does just what it is supposed to do.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top