[ESS] auto-completion for in buffer variables

Andreas Leha andreas.leha at med.uni-goettingen.de
Wed Mar 14 13:27:12 CET 2012


Hi all,

I have a question on auto-completion.  (I think, that at some point, the
behaviour I am after was enabled by default)

ess start with auto-completion for my due to these lines in my
.emacs:

,----[ ~/.emacs ]
| (require 'auto-complete)
| (add-to-list 'ac-dictionary-directories "/usr/share/auto-complete/dict/")
| (require 'auto-complete-config)
| (ac-config-default)
| ;; ...
| (setq ess-use-auto-complete t)
`----

Now, I enter this in a newly created file:

,----[ test.R ]
| ttt <- 1 <C-c C-n>
| test <- function(aaa) {
|   print(ttt)
|   print(aa<TAB>
`----
Since ttt is in my R workspace, I get completion for this when writing
the function.
Completion for aaa is not provided, since aaa is not yet part of the
workspace.

My question is: Can I enable completion for those symbols, that are part
of the ESS buffer, even if they are not part of my R-workspace (yet)?

As I mentioned, I seem to remember, that this was enabled at some point.
And I think, the same behaviour is shown for auto-completion in
shell-script-mode, for instance.

Best,
Andreas



More information about the ESS-help mailing list