[R] X-emacs and R for Windows

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jul 1 17:38:08 CEST 2003


On Tue, 1 Jul 2003, A.J. Rossini wrote:

> Philippe Glaziou <glaziou at pasteur-kh.org> writes:
> 
> > Chriss, Neil <Neil.Chriss at sac.com> wrote:
> >> Is there any way to make XEmacs (or any other editor) the default editor for
> >> R so that when I type 
> >>  
> >> > sample <- function(x,y) {
> >> + z<-x+y
> >> + }
> >> + edit(sample)
> >>  
> >> the XEmacs (or other editor) is the editor for this function (the default
> >> seems to be MS Notepad, blech).

Yes, it is: what other editor can you guarantee to be on all Windows 
systems?

BTW, I think you want to say fix(sample): edit returns a result you may 
want to assign.

> >
> > See ?options
> >
> >> options()$editor
> > [1] "/usr/bin/vim"
> >> options(editor="emacs")
> >> options()$editor
> > [1] "emacs"
> 
> You might want to consider the emacs client variants (winclient, I
> think, on XEmacs, not sure what it is on Emacs, gnuclient or
> emacsclient); they require Emacs to be already running, and simply
> provide an attached frame to work in.

On NTEmacs I use gnuclient, which BTW will start up an emacs if one is not 
already running, otherwise start a new frame (or, my choice) a new buffer.

-- 
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




More information about the R-help mailing list