[Rd] savehistory() for ESS {was "ess and debug package"}

Martin Maechler maechler at stat.math.ethz.ch
Fri Jan 30 18:16:52 MET 2004


>>>>> "StEgl" == Stephen Eglen <stephen at inf.ed.ac.uk>
>>>>>     on Fri, 30 Jan 2004 12:56:48 +0000 writes:

    >> I was trying to use the new debug package from within emacs, I get the 
    >> following error:
    >> >library(debug)
    >> Loading required package: mvbutils
    >> MVBUTILS: no "tasks" vector found in ROOT
    >> MVBUTILS loaded OK
    >> Loading required package: tcltk
    >> >mtrace(glm) # turns tracing on
    >> >names( tracees) # "glm"
    >> [1] "glm"
    >> >names( tracees) # "glm"
    >> [1] "glm"
    >> >glm(stupid.args) # voila le debugger
    >> Error in savehistory(file) : no history available to save
    >> 
    >> Has anybody been more succesfull?

    StEgl> I also just tried this sequence from Angel, and got the same error
    StEgl> with the CVS version of ESS.  (The sequence works fine when running R
    StEgl> from an xterm.)

Yes, as the above error message suggests, the problem is when
calling  savehistory() inside ESS.

As usual, in these cases, people are encouraged to read the help
page on such a command
... ;-) ... and  ?savehistory contains

  >> Details:
  >> 
  >>      This works under the 'readline' and GNOME interfaces, but not if
  >>      'readline' is not available (for example, in batch use).

Now it seems not everyone is aware that the readline interface
is turned off for ESS (using "R --no-readline") very much on
purpose -- not only for efficiency reasons, but also (and
mainly) because of very unwanted automagic command completion
behaviour of readline. 

To be honest, I don't see an easy solution to this problem but
am wondering if it was conceivable to enhance the R command line
by allowing to make use of the "history"-part of readline and
disabling everything else.

Martin



More information about the R-devel mailing list