[R] fix and edit don't work the expected way

Thomas Schönhoff tom_woody at swissinfo.org
Fri Sep 24 12:39:43 CEST 2004


Hello,

I am tinkering a bit with options(), namely, how to query and set them 
up to suit my needs.

1)
The basic problem seems that the editor entry in options looks like this:
 > options()
---------------------------------------------------------
$editor
[1] "emacsclient"
---------------------------------------------------------

After setting this option to /usr/bin/emacs by doing:

 > options(editor="/usr/bin/emacs")

I try to run fix(fun) or edit(fun) and run into this error:
-----------------------------------------------------------------
Error in edit(name, file, editor) : An error occurred on line 17
use a command like
x <- edit()
------------------------------------------------------------------

This error is also noticed when loading the function into edit()/fix(), 
doing some changes and trying to save these modifications too tmp buffer.


2)
Furthermore I try to set the $editor option not only for current but 
also for future session!? It seems like that I run regularily into 
troubles starting $editor(emacsclient) from within Emacs/ESS/R enviromnent.

How to do that?
I've read in FAQ that local copies of .Options are quietly disregarded 
at start up.
So I started looking at the global one in /etc/R/Renvir directory and 
also tried :
----------------------------------------------------------------------
 > save.image()
---------------------------------------------------------------------

But this wasn't of much help to store the $editor variable on the long run!
(Since I am at the beginning of my exploration of R I didn't want to 
mess up the whole system configuration by doing some modifications to 
this file)

Obviousely, I don't do it correctly, but I can't figure out whats wrong? 
Anyone help is appreciated.

Thanks

Thomas

------------------------------------------------------------------------------------------------------------
platform i386-pc-linux-gnu
arch     i386
os       linux-gnu (Debian)
system   i386, linux-gnu
status
major    1
minor    9.1
year     2004
month    06
day      21
language R

Emacs21        21.3+1-7
ESS            5.2.2-2




More information about the R-help mailing list