On Oct 25, 2009, at 4:04 PM, Tariq Perwez wrote:
> Hi Everyone,
>
> I am a beginner running R 2.9.2 under Ubuntu and typically use Emacs
> w/ESS.
> However, I am confused with history() command. When I issue command
> history() in Emacs within an R session, this is what get:
>
>> history()
> Error in savehistory(file) : no history available to save
>
>
> Similarly, history(max=10) command gives the same error message.
>
> However, there is this In/Out Menu in the Emacs when R is running,
> and if I
> press List Input History from this menu, I see the entire history in
> a new
> frame. Unfortunately, I cannot control how much history I can view
> by this
> menu approach. I would greatly appreciate if someone could explain
> what is
> going on with history() command under Emacs/ESS. Interestingly,
> history()
> command seems to work fine in an R session within the terminal. Best
> regards,
>
> Tariq
When R is run under ESS it uses the --no-readline command line option,
which disables the normal history() mechanism. The use of readline is
described in ?history.
If you start R using:
R --no-readline
from a terminal session, you will observe the same behavior as under
ESS.
You can review the manual for ESS and see a description of the built-
in ESS command history mechanism.
Also, ESS related questions should really go to the ESS list:
https://stat.ethz.ch/mailman/listinfo/ess-help
HTH,
Marc Schwartz