[ESS] ESS and .Rhistory
Feng Li
m at feng.li
Tue Apr 26 11:03:17 CEST 2011
Dear Stephen,
Your proposal sounds great. I really appreciate it if someone can
implement it:)
One more thing, as R is launched with "--no-readline" within ESS under
Linux, the R function loadhistory() does not work anymore. Is it
possible to define a function to let user to load history file manually?
I guess not so many people will eventually use it, but it is nice to
have one as a complete solution in ESS in the future.
Best regards,
Feng
On 04/26/2011 10:01 AM, Stephen Eglen 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
>>
>> ______________________________________________
>> ESS-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help
>
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>
--
Feng Li
Department of Statistics
Stockholm University
106 91 Stockholm, Sweden
http://feng.li/
<javascript:void(0);>
More information about the ESS-help
mailing list