[ESS] Open R in an external terminal?

Shige Song shigesong at gmail.com
Fri Nov 11 03:07:02 CET 2011


How about open another Emacs window of the same instance by "C-x 5 2"
and use one window for your .R file and the second window for your R
session?

Shige

On Thu, Nov 10, 2011 at 9:03 PM, Mathieu Basille
<basille at ase-research.org> wrote:
> The closer I can see is by using screen, so that you can attach and detach a
> R session as you wish (which means using it within Emacs, or directly from
> the terminal, or...):
>
> - In a regular terminal, open a screen session:
>
> $ screen -S rsession
>
> and detach it (C-a C-d).
>
> - In Emacs, open a .R file. Divide the frame in two (C-x 2) and open a shell
> in emacs (M-x shell). You need then clearing capabilities that you can have
> with:
>
> TERM=xterm
>
> - Now restore your screen session:
>
> screen -r rsession
>
> - Open R as with a regular terminal, and use ESS-remote (M-x ess-remote) to
> associate this buffer to ESS.
>
> This said, screen shortcuts now conflicts with Emacs ones... I then have
> this in my .emacs:
>
> ;; used to 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)))
>
> To detach a screen session, you then need to type C-l C-a C-l C-d...
>
> Is this what you want?
> Mathieu.
>
>
> Le 10/11/2011 20:42, Harold Pimentel a écrit :
>>>
>>> You can't serisouly ask for:
>>>
>>> - Open a terminal
>>> - Type 'R' and enter...
>>
>> No.
>>
>> I would like to open an external R session and still use the ESS
>> commands to send regions, buffers, etc. to R. I realize this breaks
>> the Emacs philosophy, but it is still something I would like to do.
>>
>>
>> Thanks,
>>
>> Harold
>
> --
>
> ~$ 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.
>
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>



More information about the ESS-help mailing list