Thanks very much Professor Ripley.
I was running R 2.10 under XP. As part of troubleshooting I uninstalled and 
installed 2.11. I also updated cygwin.  This is a system-specific problem, 
editing still works on my home laptop.

I am running CRAN build of R.

Yes I did mean Vim.

I believe it is a symbolic link, either way, it used to work...

Yes, warning is dislpayed and no editor is presented, R prompt is returned.  
How can I access the editor's error message?  Any other troubleshooting I can 
engage in?

Thanks for your help.
Matt


Sent from my iPhone

On Jan 31, 2011, at 11:05 AM, Prof Brian Ripley <rip...@stats.ox.ac.uk> wrote:

We need to know much more (see the posting guide)

- What version of R?  Did you update recently?
- Are you running a Windows build of R, or did you compile your own from the 
sources as a Cygwin build?

On Mon, 31 Jan 2011, beehatch wrote:

Hi all,

I've been a happy user of R under cygwin for a number of years now.  I
prefer the bash interface and readline history, and I find Vi to be the
most efficient editor.

But I think you actually mean vim, a vi clone!

Recently, the edit command has started giving me errors:

edit(file='foo.R')
Error in edit(name, file, title, editor) : unable to run editor 'vi'

Vi works from bash shell and is in the path. 'vi' is a symbolic link to
the executable, so I tried specifying the full path using
options(editor='c:/cygwin/bin/vim-nox.exe'):

Hmm, this suggests that you are running a Windows version of R: that is not 
supposed to be able to run 'symbolic links' (which are not even a Windows 
concept, and are part of the Cygwin emulation layer), and AFAIK never have.  I 
guess it was Cygwin that changed recently ....

edit(file='foo.R')
NULL
Warning message:
In edit(name, file, title, editor) : editor ran but returned error
status

Which is only a warning! Windows executables quite often do not follow the 
POSIX rules for return values, but Cygwin ones should.

I've tried changing to another editor (ultraedit) and that works, but I'd
like to get Vi working again.  Any suggestions for troubleshooting would
be appreciated.

Thanks in advance
Matt

-- 
Brian D. Ripley,                  rip...@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@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.

Reply via email to