Re: [R] setting editor environment variable EDITOR either when configuring R for installation or in .Rprofile

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed, 30 Jul 2008 19:43:09 +0100 (BST)

On Wed, 30 Jul 2008, Marc Schwartz wrote:

> on 07/30/2008 12:54 PM Mark Kimpel wrote:
>> I'm running R on Linux and use emacs as my editor. When doing
>> "edit(vignette(foo.vignette))" I would like to invoke emacs rather than the
>> default vi. I am able to manually set this by editing $R_HOME/etc/Renviron
>> but would like to avoid doing this with each install. I assume this can be
>> accomplished with a flag to .configure or in .Rprofile but I can't find the
>> syntax in R-admin. Editor is not listed as an environment variable in
>> appendix B of that manual.
>>
>> So, help is appreciated as I've probably missed something.
>> Mark
>>
>
> Mark,
>
> See ?options for 'editor'. This is also referenced in ?edit, where the
> default value for the 'editor' argument is getOption("editor").
>
> Thus, in your .Rprofile, put:
>
> options(editor="emacs")

Or just use the emacs() function provided (!), or set VISUAL.

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 30 Jul 2008 - 19:19:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 30 Jul 2008 - 19:33:00 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive