[ESS] RFC: and .Rhistory -- new default == *no* .Rhistory ??

Martin Maechler maechler at stat.math.ethz.ch
Thu Sep 1 17:24:19 CEST 2011


With this e-mail, we are polling you, the active ESS users.
Or in other words, we ask you to "vote" on one aspect of this
issue, for which I need to give a bit more context :

>>>>> Yihui Xie <xie at yihui.name>
>>>>>     on Sun, 28 Aug 2011 08:24:57 -0500 writes:

    > On Sun, Aug 28, 2011 at 8:05 AM, Martin Maechler
    > <maechler at stat.math.ethz.ch> wrote:
    >> On Sat, Aug 27, 2011 at 18:48, Yihui Xie <xie at yihui.name>
    >> wrote:
    >>> Hi,
    >>> 
    >>> Has this been changed in ESS 5.14?
    >> 
    >> Nope...  It was just a proposal by Stephen .. and we had
    >> forgotten about it.
    >> 
    >> BTW (to ESS-core): There's also an ess-history-directory
    >> variable (with a "nice" idea behind: You can think of a
    >> person-wide "global" history file), which is not at all
    >> made use of, currently... and we should

    > OK, I see. It will be great if ESS does not drop the
    > .Rhistory bombs under every single directory in which I
    > start R :-)

  [...]

I have now committed changes to the SVN (subversion) development
version of ESS,  -->  https://svn.r-project.org/ESS/trunk/
in order to solve these problems.

1) The user customizable variable  ess-history-directory
   is now finally made use of.  Consequently, a user now can
   customize it to, e.g.,  
     "~/.R/.Rhistory"
    and then have that *one* history file for all projects, 
    and he/she would typically no longer get the message about
    missing .Rhistory files *nor* would .Rhistory files be created
    all over the place.

2) We have implemented Stephen's proposal, namely the
   customizable variable  ess-history-file  can now have three
   possible kind of values :

       nil --  do not attempt to read/write a history file
         t --  use the default naming scheme for loading the history
   "fname" -- use this value as the filename.

  Note that from above,  't'  corresponds to the current default
  in ESS (which is 'nil' there !).

Now to the opinion poll :

Many of us really do not care about the R buffer history, since
we believe that a much more recommendable way is to work with
*.R script files (and possibly additionally *.Rout "transcript"
files, by just saving a *R* buffer),
and the ESS Core team is also in this "camp".

Consequently, we think that it would make sense to have a
*NON*-back compatible default of 'nil', i.e.,
not reading nor writing any .Rhistory files at all.
However, as said, this is not back compatible to the 20 year old
default behavior of (formerly S-mode, now) ESS,
and so we are a bit reluctant to just impose such a change to
the potentially completely unsuspecting user base.

 {{ Of course, we could name the next version of ESS,  6.0 ,
    but that could also be a bit too much for such a small
    change .... }}

So now your feedback is very much welcome...

Martin Maechler, for the ESS core team.


    >>> I still see .Rhistory even if I set ess-history-file to
    >>> be nil, which has been a pain for me for a long time.
    >>> 
    >>> Thanks!
    
  [...]
    >>> Regards, Yihui

    >>> On Tue, Apr 26, 2011 at 3:01 AM, Stephen Eglen
    >>> <S.J.Eglen at damtp.cam.ac.uk> wrote:
    >>>> Dear Erik, Feng,
    >>>> 
    >>>> Thanks for this -- I was blissfully unaware about this
    >>>> persistence of history across R sessions.  Howabout if
    >>>> we change the semantics of ess-history-file to be:
    >>>> 
    >>>>     nil --  do not attempt to read/write a history file
    >>>>       t --  use the default naming scheme for loading the history
    >>>> "fname" -- use this value as the filename.
    >>>> 
    >>>> 
    >>>> Stephen

    >>>>> Feng,
    >>>>> 
    >>>>> On 04/20/2011 09:00 AM, Feng Li wrote: > Dear list,
    >>>>> >
    >>>>> > I tried to change the ESS default R history to a
    >>>>> permanent file so > that ESS does not generate
    >>>>> .Rhistory everywhere. I tried both
    >>>>> >
    >>>>> > (setq ess-history-directory "~/.R/history")
    >>>>> >
    >>>>> > and
    >>>>> >
    >>>>> > (setq ess-history-file "~/.R/history/.Rhistory")

  [.............]



More information about the ESS-help mailing list