[ESS] teftex-toc does not work

svga at arcor.de svga at arcor.de
Thu Jan 15 11:51:52 CET 2009

Hi list,

I'm not sure if this is ess-related, maybe not. I use emacs and ess both on windows and Linux. On windows, reftex mode does not work properly with Rnw-files: 'M-x reftex-toc' does not work, the toc is not shown. Interestingly, reftex said it displays the toc of a .Rnw.tex file, e.g. Report.Rnw.tex instead of Report.Rnw (of course, Report.Rnw.tex does not exists). I use latest emacs/ess etc. from http://vgoulet.act.ulaval.ca/en/emacs/. Reftex works on 'normal-tex' files with .tex extension.

I've never saw this under Linux, yet.

Are there any ideas? Thanks, Sven

My .emacs:

;; ESS for Sweave files
(defun Rnw-mode ()
       (require 'ess-noweb)
       (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"))

;; turn on reftex-mode in LaTeX mode
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)

More information about the ESS-help mailing list