[ESS] Questions regarding R + Aquamacs + ESS

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Sun Sep 20 16:21:33 CEST 2009


> Hi (I did sent this post also to R-sig-mac, but I think this is the
> right forum for this post),
> 
> I have few questions regarding R 2.9.2 + Aquamacs + ESS. I'm moving
> from WinXP to Mac (Snow Leopard 10.6.1) and also from Tinn-R to
> Aquamacs (1.8c).
> 
> 1. Is there syntax highlighting in Aqaumacs? Now when I open .R file
> only the lines starting with comment mark (#), quoted words etc. are
> shown in color. What about R:s reserved words? In Tinn-R these words
> where shown blue. Is there this kind of functionality in Aquamacs?

ESS has more font-locking (syntax highlighting) than what you see;
unless you are wedded to Aquamacs, have you tried the version of Emacs
built by Vincent Goulet: 
  http://vgoulet.act.ulaval.ca/en/ressources/emacs/mac 

this should work nicely.



> 3. It seems to bit complicated to keep pressing C-c all the time, is
> there a way to make a shortcut key (e.g when pressing Alt-S an area of
> code is sent to ESS-window (into R)

sure, this falls into the general issue of rebinding keys; e.g. 

(defun my-ess-hook ()
  "Add my keybindings to ESS mode."
  (local-set-key (kbd "C-j") 'ess-eval-line-and-step)
  )
(add-hook 'ess-mode-hook 'my-ess-hook) 

change C-j and the function you want to sit on there accordingly.
 


I'll leave others to fill in 2 and 4!

Stephen



More information about the ESS-help mailing list