[ESS] completion in R files

Rainer M Krug r.m.krug at gmail.com
Fri Mar 22 10:41:53 CET 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 22/03/13 10:16, Andreas Leha wrote:
> Hi all,
> 
> the possibility to get completion in R files seems not be unknown to many people in the R
> community.
> 
> Maybe someone more knowledgeable than me should respond to this thread 
> (http://permalink.gmane.org/gmane.comp.lang.r.devel/33103) on the R-devel mailing list and
> explain since when completion in R buffers is available and how to activate it.

I would like to piggyback on this question:

1) Is there a way of getting completion with function names and

2) path completion is not working for me in my setup - might it be an interaction with org / ido
completion?

3) actually, object completion is also not working...

The inferior R process is running, and I get tooltips in the minibuffer.

Below please find the ESS section of my emacs.org file

Any suggestions welcome,

Rainer


* ESS
** Load ess
#+begin_src emacs-lisp
  (add-to-list 'load-path "~/.emacs.d/ess/lisp")
  ;; (load "~/.emacs.d/ess/lisp/ess-site")
  (require 'ess-site)
#+end_src

** ESS help
*** kill "bogus" help buffers
#+begin_src emacs-lisp
  (setq ess-help-kill-bogus-buffers t)
#+end_src

*** all help in one window and in own frame
#+begin_src emacs-lisp
  (setq ess-help-own-frame 'one)
#+end_src

** activate tracebug
#+BEGIN_SRC emacs-lisp
  (setq ess-tracebug-prefix "\M-t")
  (setq ess-use-tracebug t)
#+END_SRC

** Further customisations
#+begin_src emacs-lisp
  (setq inferior-R-args "--vanilla")
  (setq ess-eval-visibly-p nil)
  (setq inferior-ess-same-window t)
  (setq inferior-ess-client-command "Initial")
  (setq inferior-ess-own-frame nil)
  (setq ess-ask-for-ess-directory "TRUE")
#+end_src
** hideshow
hideshow-org (http://github.com/secelis/hideshow-org/tree/master)
#+begin_src emacs-lisp
  ;;(require 'hideshow)
  (require 'hideshow-org)
  (add-to-list 'hs-special-modes-alist
               '(ess-mode "{" "}" "/[*/]" nil
                          hs-c-like-adjust-block-beginning))
  (global-set-key "\C-ch" 'hs-org/minor-mode) ;; toggles hideshow-org
  (add-hook 'ess-mode-hook 'hs-org/minor-mode) ;; starts for ESS files
  ;; (add-hook 'ess-mode-hook '(lambda () (hs-org/minor-mode 1)))
#+end_src

** Additional syntax highlighting
#+begin_src emacs-lisp
  (add-hook 'ess-mode-hook
            '(lambda()
               (font-lock-add-keywords nil
                                       '(

("\\<\\(FIXME\\|TODO\\|COMMENT\\|DONE\\|CHANGES\\|FIXED\\)\\>" 1 font-lock-warning-face prepend) ;
highlight certain keywords

("\\<\\(if\\|for\\|function\\|return\\)\\>[\n[:blank:]]*(" 1 font-lock-keyword-face) ; must go
first to override highlighting below
                                         ("\\<\\([.A-Za-z][._A-Za-z0-9]*\\)[\n[:blank:]]*(" 1
font-lock-function-name-face) ; highlight function names

("\\([(,]\\|[\n[:blank:]]*\\)\\([.A-Za-z][._A-Za-z0-9]*\\)[\n[:blank:]]*=[^=]" 2
font-lock-reference-face) ; highlight argument names
                                         ))
               ))
#+end_src


> 
> Regards, Andreas
> 
> ______________________________________________ ESS-help at r-project.org mailing list 
> https://stat.ethz.ch/mailman/listinfo/ess-help
> 


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer at krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRTCdhAAoJENvXNx4PUvmCTJgH/jNUJxHWMbIyvIAX97p2M1a3
2+foCgcScteKgBOHPMFOzU4QNoXqnkwXS9FNmDn7GiHEZmi6ksFzQCOdMhvh4dRu
WOUm+sUQE9DjFSwEzG42pF1FZCkzNdndenXhFzV7+pAyvWjIei+J38lsWVH+989Y
bNsZf6Xi/ZLgaBLftuLeXmpYU2GbD9qBjArtsVMXvFVX1RJMLAGjCMpIkFqOJNtb
7dZwuX0uSPCJIuBFL4fjg4wLlgGbuMCyfTSbIA2ZAQys8yP5I6gZ6yCdQaofmTNR
HmRlFr2DSr1SoIempHDvoAqPV53l+DrM9ZMeDCe7CLFadQHD3l09/xyhRuLSm0g=
=mfQq
-----END PGP SIGNATURE-----



More information about the ESS-help mailing list