[R-pkgs] rcompletion update

Deepayan Sarkar deepayan.sarkar at r-project.org
Tue Jan 2 20:03:09 CET 2007


Hi,

The rcompletion package, originally intended to provide completion for
readline-based R interfaces, has undergone a number of changes.  These
changes are summarised below:

  o Reorganisation:

    - The package has been split into two.  All the completion code
      has been moved to a pure R package called 'rcompgen'.
      'rcompletion' now requires 'rcompgen' and simply provides
      readline bindings that uses 'rcompgen' to generate possible
      completions.  (Source packages are available on CRAN, binaries
      should be available soon.)

    - The purpose of this reorganisation is to allow other backends to
      use the completion facilities provided by 'rcompgen', hopefully
      avoiding duplication of effort.  I'm happy to add further
      infrastructure to 'rcompgen' if that is helpful.

    - as a proof of concept, .../examples/altesscomp.el contains code
      that provides an alternative (using 'rcompgen') to ESS's
      built-in completion mechanism.  It should be enough to include
      the contents of this file in ~/.emacs (please read the comments at
      the end before doing so).  The file is also available at

      http://rcompletion.googlecode.com/svn/trunk/rcompgen/inst/examples/altesscomp.el

      I am particularly interested in feedback from ESS users
      regarding how this compares with the default mechanism in terms
      of speed (especially in older machines).

  o Hosting:

    - The project is now hosted on Google Code, at
      http://code.google.com/p/rcompletion/

    - (For those interested, this now also hosts my R bash_completion
      script)


  o New completion features:

    - when the token is determined to be the first argument of
      library() or require(), completion is done on _installed_
      package names.  This is disabled by default since the first call
      to installed.packages() can be slow (especially when using
      remote file systems).

    - when the token is determined to be the first argument of data(),
      completion is done on available data sets.

    - tokens after a question mark (?) match aliases in help topics
      rather than object names.  So, for example, ?INST will complete
      to ?INSTALL even though there is no object named INSTALL.

    - the old behaviour of appending a left-parenthesis to function
      names has been disabled by default, since this requires
      evaluation of the mode of _all_ matches, which is undesirable
      for lazy-loaded symbols.

As always, comments and suggestions are most welcome.

-Deepayan




More information about the R-packages mailing list