The rcompletion package, originally intended to provide completion for
readline-based R interfaces, has undergone a number of changes. These
changes are summarised below:
- 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
- (For those interested, this now also hosts my R bash_completion
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.