RefTeX with ESS and Sweave oddity...

Jeff D. Hamann jeff.hamann at forestinformatics.com
Sat Jun 19 20:38:03 CEST 2004


ESS/Seave/R gurus:

I've been using ESS with great delight for a few years and finally ventured
into Sweave territory!

I've added the following (from the Sweave site) to my .emacs file,

(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"))

and I've notice when I try to use RefTex in an Rnw file, the behaviour is a
little off. When I type C-[ to add a citation, I get the usuall behaviour
and then as a scroll through the references I wish to add, the highlight bar
disappears and I only get the first citation in the search window, always.
Is there something else I need to add to this chuck in my .emacs file to
make that work?

I posted a message to the Author of Sweave and he replied with

"There are also some problems, e.g., with noweb mode and flyspell. Note that
the noweb mode is not written by me, I
simply use it. Maybe ask on the ESS mailing list?"

So I'm posting a message to this list to find out if anyone has a similar
problem and if there are any solutions. I'm not LISP-literate so I couldn't
tell you what the "noweb()" is all about.

Help?
Jeff.

---
Jeff D. Hamann
Forest Informatics, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
541-754-1428
jeff.hamann at forestinformatics.com
www.forestinformatics.com




More information about the ESS-help mailing list