How to rename R-sessions in ESS?

Earlier, I asked how to switch R sessions to ESS , and using Cx Cs greatly accelerated my workflow.

However, if I have several R sessions (at least 3), it can be difficult to remember which one is R , which is R:2 and which is R:3 . Is there a way to force ESS, Emacs, or tramp to automatically indicate different r sessions based on the server / directory in which R is running?

+8
r emacs tramp ess
source share
2 answers

[update]

Newer versions of ESS (> 12.09) use buffer names instead of internal process names. Now you can rename your lower buffer with Mx rename-buffer and this will be done correctly. You can also configure ess-gen-proc-buffer-name-function to automatically rename process buffers at startup.

[/ update]

R, R: 2 etk are the names of the processes in ESS. I asked this question on the ess mailing list about a year ago. There seems to be no easy way to change this behavior. These emacs are not ESS. You can change the buffer names associated with the process, but the process names will not be changed.

Unify change buffer names as far as I could see. And in any case, in recent versions of emacs buffers with the same file name, partial paths are indicated to make them unique. Thus, it looks like uniquify has been accepted into basic emacs for files, but not for other things like proc names.

+6
source share

Not sure about automatic renaming (and you can ask about it on the ESS mailing list), but I sometimes use Mx rename-buffer , which does exactly what it should do.

+2
source share

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


All Articles