[ESS] Possible trivial bug in ess-eval-function

Martin Maechler maechler at stat.math.ethz.ch
Thu Feb 28 11:50:18 CET 2008


>>>>> "RMH" == Richard M Heiberger <rmh at temple.edu>
>>>>>     on Wed, 27 Feb 2008 17:59:20 -0500 writes:

    RMH> Good catch.  Here is the diagnosis.
    RMH> The problem is in ess-end-of-function in file ess-mode.el

    RMH> The repair is probably to expand the line
    RMH> (unless in-set-S4 (forward-sexp 1)) ; move over braces
    RMH> We need to confirm that we are at the beginning of set of braces.
    RMH> If so, (forward-sexp 1) is correct.
    RMH> If not, then we need to move forward one S language expression,
    RMH> which could be either a name or a name followed by a set of parentheses.

Well, it's been ``well known'' at least to some,
that  ess-beginning-of-function
and   ess-end-of-function
are not working correctly under all circumstances.

More than three years ago, 
I had created the file  <ESS>/etc/R-ESS-bugs.R 
for that reason.

I've now added version of the examples that Erik has shown.
Martin


    RMH> I am not ready to do that bit of regular expression detection.


    RMH> Rich




More information about the ESS-help mailing list