[ESS] Editing Rd files in Aquamacs Emacs (MacOS X)
Vincent Goulet
vincent.goulet at act.ulaval.ca
Mon Jun 4 17:47:29 CEST 2007
Le 07-06-04 à 11:25, Jari Oksanen a écrit :
>
> On 4 Jun 2007, at 17:07, Vincent Goulet wrote:
>
>> Le 07-06-04 à 06:31, Jari Oksanen a écrit :
>>
>>> Is it possible to use nice editing mode for Rd files (R help
>>> files) in Aquamacs
>>> Emacs in MacOS X? I upgraded to the latest version I found
>>> (Aquamacs 0.9.9d) and
>>> it came completely without the needed lisp file essddr.elc in its
>>> ess-mode/lisp
>>> directory. The CVS version of Aquamacs seems to have the
>>> essddr.elc file, but I
>>> couldn't see any visible consequences of using that. Neither did
>>> it help to
>>> install locally the latest version of ESS (5.3.4). I assume that
>>> the conclusion
>>> is that the mode for editing Rd files is not available in
>>> Aquamacs. Can anybody
>>> please correct me.
>>
>> I never had any difficulties editing Rd files with Aquamacs, it's
>> that the Rd-mode does not get activated by default upon loading a
>> *.Rd file. An 'M-x Rd-mode RET' should do the trick. If you want
>> Rd-mode to activate automatically, add something like
>>
> Salut Vincent,
>
> I had a closer look at the issue with these instructions. Indeed,
> 'M-x Rd-mode RET' works if I install ESS from the source. However,
> this fails with pristine Aquamacs Emacs saying [No match], although
> this is said to come with ESS. The difference may be indeed that
> essddr.elc is not included in Aquamacs.
That's strange. I do have the file essddr.elc in Aquamacs 0.9.9d, and
I'm pretty sure I didn't modify the ess-mode folder in any way.
> Better keep now that configuration that has
>
> (load "~/Library/ess-5.3.4/lisp/ess-site")
>
> in ~/.emacs file (which also seems to work: I didn't come to think
> that Mac would have a more exotic location).
This location is deprecated. See http://www.emacswiki.org/cgi-bin/
wiki/PreferencesInAquamacs
>
>> (setq auto-mode-alist
>> (append '(("\\.Rnw$" . Rnw-mode))
>> auto-mode-alist))
>>
>
> This is for Rnw files: I've never had trouble with them.
Yes, sorry, I copy and pasted a longer setq statement and deleted the
wrong lines.
> However, I now have also these lines in my ~/.emacs:
>
> (add-hook 'Rd-mode-hook
> (lambda ()
> (abbrev-mode 1)
> (font-lock-mode 1)))
> (add-to-list 'auto-mode-alist '("\\.Rd\\'" . Rd-mode))
> (add-to-list 'auto-mode-alist '("\\.rd\\'" . Rd-mode))
>
> and now Rd-mode starts automatically.
>
> Thanks for the help.
>
> Best wishes, Jari Oksanen
>
More information about the ESS-help
mailing list