[ESS] ESS and .Rhistory

Yihui Xie xie at yihui.name
Sun Aug 28 15:24:57 CEST 2011


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 also noticed another issue which also involves with ESS ignoring the
configuration, and I will report in a separate email.

Thanks!

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA



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
>
>> 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!
>>
>> BTW, the trick from Erik works very well.
>>
>> Regards,
>> Yihui
>> --
>> Yihui Xie <xieyihui at gmail.com>
>> Phone: 515-294-2465 Web: http://yihui.name
>> Department of Statistics, Iowa State University
>> 2215 Snedecor Hall, Ames, IA
>>
>>
>>
>> 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
>>> "some.string" -- 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")
>>>>
>>>> If I recall correctly, it's because of the way the ess-history-file
>>>> variable is set in the ESS code.  The following works for me:
>>>>
>>>>   (defun ei-no-rhistory ()
>>>>     (setq ess-history-file "/dev/null"))
>>>>
>>>>   (add-hook 'inferior-ess-mode-hook 'ei-no-rhistory)
>>>>
>>>>
>>>> where "ei" in the function name is just my initials.  See if that
>>>> works for you. You can change /dev/null to whatever you want.  There
>>>> may be a cleaner solution, but I was just happy not to find .Rhistory
>>>> files all over the place, which bother me greatly for some unknown
>>>> reason :).
>>>>
>>>> --Erik
>>>>
>



More information about the ESS-help mailing list