[R] Setting up Xemacs + Sweave

A.J. Rossini rossini at blindglobe.net
Thu Apr 24 14:13:13 CEST 2003


Martin Maechler <maechler at stat.math.ethz.ch> writes:


>>>>>> "Tamas" == Tamas Papp <tpapp at axelero.hu>
>>>>>>     on Wed, 23 Apr 2003 19:44:00 +0200 writes:
>
>
>     Tamas> I have tried to setup my Xemacs for use with Sweave,
>     Tamas> which I indend to learn.  I have followed the
>     Tamas> instructions in the Sweave FAQ, that is to say, I put
>
> 	(defun Rnw-mode ()
> 	  (require 'ess-noweb)
> 	  (noweb-mode)
> 	  (if (fboundp 'R-mode)
> 	      (setq noweb-default-code-mode 'R-mode)))
> 	(add-to-list 'auto-mode-alist '("\\.Rnw\\'" . Rnw-mode))
> 	(add-to-list 'auto-mode-alist '("\\.Snw\\'" . Rnw-mode))
>
> 	(setq reftex-file-extensions
> 	      '(("Snw" "Rnw" "nw" "tex" ".tex" ".ltx") ("bib" ".bib")))
> 	(setq TeX-file-extensions
> 	      '("Snw" "Rnw" "nw" "tex" "sty" "cls" "ltx" "texi" "texinfo"))
>
>     Tamas> in my init.el. However, if I open an Rnw file
>     Tamas> (/usr/lib/R/library/tools/Sweave/Sweave-test-1.Rnw) it is not treated
>     Tamas> as one, only if I evaluate (Rnw-mode) using M-: on the buffer. My
>     Tamas> auto-mode-alist looks like this:
>
> Tamas, have you loaded/enable ESS  at all in your  init.el file?
> e.g., does
>       M-x R
> call R?
> ess-noweb I think is supposed to be called in to a `loaded' ESS
> environment.
>
> (but then I'm only rarely using Xemacs, but rather GNU emacs and
> I also don't know about the Debian package setup of these).

They are pretty much the same, so your advice is correct, Martin.

best,
-tony

-- 
A.J. Rossini rossini at u.washington.edu http://software.biostat.washington.edu/ 
Biostatistics, U Washington and Fred Hutchinson Cancer Research Center 
FHCRC:Tu: 206-667-7025 (fax=4812)|Voicemail is pretty sketchy/use Email 
UW  : Th: 206-543-1044 (fax=3286)|Change last 4 digits of phone to FAX 
CONFIDENTIALITY NOTICE: This e-mail message and any attachments ... {{dropped}}



More information about the R-help mailing list