[ESS-bugs] Object completion in R buffer doesn't finish with options(error=recover)

Martin Maechler maechler at stat.math.ethz.ch
Thu Sep 14 22:56:33 CEST 2006


Thank Jeffrey, for the bug report.

It seems you should refrain from R object completion for the
moment when using options(error = recover). 
We are sorry for that.

>>>>> "RMH" == Richard M Heiberger <rmh at temple.edu>
>>>>>     on Thu, 14 Sep 2006 15:40:32 -0400 (EDT) writes:

    RMH> I can confirm the error.

Thanks.

    RMH> This is the first few lines of a new R session in ESS

    >> options(error=recover)
    >> lm [TAB]
	  ^^^^^ {I'm sure you did that}
    RMH> Enter an item from the menu, or 0 to exit
    RMH> Selection: 1

I can confirm the behavior too.
However, for me --- using R-2.4.0 alpha ---
the traceback() is actually reminding us (ESS-core)
that we really should take another action, too within the next
few days rather than weeks because of the upcoming R 2.4.0 :

 Browse[1]> traceback()
 1: assign(".Last.value", .ess.lvsave, envir = baseenv())

since indeed, assign()ing to .Last.value has become a  no-no
IIRC, even quite advocated by Kurt, right Kurt?

A possible replacement could be
   assignInNamespace(".Last.value", .ess.lvsave, "base")
which does `work' (not give an error), but actually does not
really what you think it should, since .Last.value really gets
immediately overwritten by the return value of
assignInNamespace() which is NULL.

That's something we should fix -- probably actually just by not
doing the assignment --- and IIRC get rid of any use of
.ess.lvsave .. 
This will leave .Last.value in an undesired state for the user,
but who really needs .Last.value  when using ESS? -- I've never
used it I think in the last 10 years.

But apart from the .Last.value  messing that we probably should
get rid of,
we still have the problem that name completion
does some hidden calls to R -- which might trigger an error and
the error gets caught by R's recover() instead of by "us" (i.e. ESS),
which gives the infinite loop behavior.

{all this is in lisp/ess-inf.el ;  I'm just now committing a few
comments and a few more "(ess-write-to-dribble-buffer ..)" so we
can more easily debug later.
I have to quit for today.

    RMH> Called from: eval(expr, envir, enclos)
    RMH> Browse[1]> ls()
    RMH> [1] "x"
    RMH> Browse[1]> traceback()
    RMH> 3: stop(txt)
    RMH> 2: library(abind)
    RMH> 1: .First()
    RMH> Browse[1]> x
    RMH> Error during wrapup: recursive default argument reference
    RMH> Browse[1]> c

    RMH> Enter a frame number, or 0 to exit   

    RMH> 1: names(package:methods)

    RMH> Selection: c
    RMH> Enter an item from the menu, or 0 to exit
    RMH> Selection: 0



    RMH> I am testing this on old systems, I will look at a newer system later.
    RMH> ESS 5.2.10
    RMH> R 2.2.1
    RMH> emacs 21.3.50.1 of 2004-12-23
    RMH> Windows XP

    RMH> The part that puzzles me is the "recursive default argument reference"

    RMH> _______________________________________________
    RMH> ESS-bugs ESS-bugs at stat.math.ethz.ch
    RMH> https://stat.ethz.ch/mailman/listinfo/ess-bugs




More information about the ESS-bugs mailing list