[ESS] ess-remote

basille at ase-research.org basille at ase-research.org
Sat Sep 15 05:49:21 CEST 2012


This is what I used to do with a local Emacs connecting to a screen with R, 
thx to the help of other contributors from the list:

1) open a screen session in a regular terminal on the server side:
$ screen -S name
2) detach it with C-a d
3) open emacs on the client side
4) open a shell: M-x shell
5) give the shell clearing capabilities:
$ TERM=xterm
6) resume the screen session:
$ screen -r
or if several sessions exist:
$ screen -r name
7) link it to ESS: M-x ess-remote
8) use Emacs + ESS as usual... Note that data and outputs are on the server 
side (check getwd())

It can be a bit annoying, especially if the SSH connection is not that 
good, but at least it's working. The relevant part of my .emacs are:

;; Send screen keybindings to shell in emacs
(define-key shell-mode-map (kbd "C-l") (lambda (seq) (interactive "k")
     (process-send-string nil seq)))
(define-key inferior-ess-mode-map (kbd "C-l") (lambda (seq)
     (interactive "k") (process-send-string nil seq)))

But it does use ess-remote, and I was also curious to see other solutions 
since Rodney mentioned that ess-remote was deprecated...

Mathieu.


Le 14/09/2012 17:04, Kasper Daniel Hansen a écrit :
> On Fri, Sep 14, 2012 at 3:34 PM, Seb<spluque at gmail.com>  wrote:
>> On Fri, 14 Sep 2012 15:17:13 -0400,
>> Sam Steingold<sds at gnu.org>  wrote:
>>
>>>> * Seb<fcyhdhr at tznvy.pbz>  [2012-09-14 11:55:25 -0500]: Yes, tramp is
>>>> really comfortable, although I've also noticed the problem with help,
>>>> so it's great to hear about pager="cat" option.  It might make sense
>>>> to put it in ~/.Rprofile:
>>
>>>> if (Sys.getenv("SSH_CONNECTION") != "") options(pager="cat")
>>
>>> what if I am running in a terminal+bash+ssh+screen+R?
>>
>> I don't know screen, sorry, but where is Emacs/ESS here?
>
> My guess is that he wants to connect to R running inside a screen
> session on a remote server.
>
> I might add, I am pretty interested in this as well.  I do most of my
> computing in this way, but I run R inside emacs, inside screen
> remotely (essentially everything, including Emacs is remote).  It
> would be really nice to be able to connect to a remote screen session
> (with R running inside) from a local Emacs.
>
> Kasper


-- 

~$ whoami
Mathieu Basille, Post-Doc

~$ locate
Laboratoire d'Écologie Comportementale et de Conservation de la Faune
+ Centre d'Étude de la Forêt
Département de Biologie
Université Laval, Québec

~$ info
http://ase-research.org/basille

~$ fortune
``If you can't win by reason, go for volume.''
Calvin, by Bill Watterson.



More information about the ESS-help mailing list