[ESS] Problem with ess tab-completion when max.print option is set too low

Martin Maechler maechler at stat.math.ethz.ch
Tue Mar 11 11:55:03 CET 2008


>>>>> "StEgl" == Stephen Eglen <S.J.Eglen at damtp.cam.ac.uk>
>>>>>     on Mon, 10 Mar 2008 23:37:47 +0000 writes:

    >> Not sure if this is on point, but I have the following in my .emacs, 
    >> that I got from Deepayan Sarkar (needs to be slightly modified now that 
    >> utils swallowed rcompgen if you are using R-2.7.0):

    StEgl> thanks for this;  does that mean that the previous defun for
    StEgl> alt-ess-complete-object-name (distributed in rcompgen package) will
    StEgl> not work in R 2.7.0?  If so, that's a little bit more work, to use the
    StEgl> right defun depending on the version of R.  All doable I think, just
    StEgl> more effort, e.g. to get Emacs to know which version of R is running
    StEgl> within an *R* buffer.  As people like Martin still run multiple
    StEgl> versions of R-x.y.z witin ESS, we'd want to keep this flexibility!

Of course.

I've now implemented and commited (to <ess>/lisp/essd-r.el )
the needed utilities:

There are now utility functions

      (ess-current-R-version)
      (ess-current-R-at-least <version>)

and I have renamed Jim's   (defun alt-ess-complete-object-name ..)
to new (defun ess-R-complete-object-name)
and changed it such that it works both for R < 2.7.0
and any other R with a correctly installed "rcompgen" package
(where R >= 2.5.0 comes bundled with "rcompgen" as a recommended
 package).

And yes, I have checked it in R-devel (2.7.0 to be) and an R
2.6.2 version and all seems to work nicely.

. . . . 

I think we should consider using it automatically instead of the
standard ESS completions when R >= 2.5.1 i.e. (with my new utility)

   (if (ess-current-R-at-least '2.5.0) ...)

*HOWEVER* : In ESS we'd also want object completion in several
	    other places, notably for finding help pages, and
	    there, we'd still go through the non-R code.

Martin




More information about the ESS-help mailing list