0

Context

I have installed 'auto-complete-20150408.1132' using the MELPA repository from within Emacs-24.3.1 (M-x package-install); the OS is RedHat. Auto-completion with popup is working perfectly for C/C++ files etc. However, I cannot get it to work with ESS[R] 15.03-1.

~/.emacs:

;; general

(add-to-list 'load-path "~/.emacs.d/elpa/popup-20150609.2145")

(require 'popup)

(add-to-list 'load-path "~/.emacs.d/elpa/auto-complete-20150408.1132")

(require 'auto-complete)

(require 'auto-complete-config)

(add-to-list 'ac-dictionary-directories "~/.emacs.d/elpa/auto-complete-20150408.1132/dict")

(ac-config-default)

;; ESS R specific

(add-to-list 'load-path "/opt/R/ess-15.03-1/lisp/")

(load "ess-site")

(setq ess-use-auto-complete t)

Behavior

I start up emacs, then M-x R session within emacs and perform a few calcs and all is fine but no auto-complete. Then C-x C-f a blank file 'test.R' and type a couple of commands but there is absolutely no hint of any auto-complete.

I have searched and tried many combinations (also Marmalade repository) but simply cannot get it working and would really appreciate some insights as to what I have missed.

Many thanks!

schaueho
  • 3,419
  • 1
  • 21
  • 32
James
  • 1
  • 1
  • Hi LegalizeIt; I tried exactly your approach. So to be clear if I type library() and then 'Ctrl-Enter' it in test.R it evaluates and prints out the packages in the R window. Auto-complete then works on the 'library()' function but on nothing else. If i do the same with 'seq()' then auto-complete also works on seq().It is as if auto-complete only works after you have typed at least once. It is as if the auto-complete is missing some sort of dictionary of the available function names...! – James Jun 12 '15 at 16:49
  • emacs tells me the following:ac-source-R is a variable defined in `ess-r-completion.el'. Its value is ((prefix . ess-ac-start) (candidates . ess-ac-candidates) (document . ess-ac-help)), so it can see it under ~/.emacs.d/elpa/lisp/ The thing is when I look under ./auto-complete-20150408.1132/dict/ I see all these *-mode files with the many keywords there. Should ess-R not have something very similar to this, i.e. a file in a 'dict' directory. So long story short it is still not working I'm afraid. – James Jun 13 '15 at 12:22
  • Hmmm, I'm seeing this in the *ESS* buffer "(inferior-ess: waiting for process to start (before hook)" I hadn't realised before but I don't R is fully loading properly even though I can evaluate functions in the 'R' buffer. Perhaps this latest version has a bug ... any ideas how I can dig into exactly what and where something is failing? – James Jun 13 '15 at 18:06
  • Thank you for your help; I think you are right and the real problem is tangential to what I thought it was! I'll raise a new question. – James Jun 15 '15 at 16:38
  • Solved it: Turned out I had modified the R prompt to an illegal character and the load up was failing silently. I renamed my .Rprofile to 'bak' and loaded M-x R and all worked fine. Slowly, line at a time, I narrowed it down to the prompt changing line. Many thanks for your help! – James Jun 16 '15 at 06:22

0 Answers0