[ESS] Problems in Editing Sweave Files

David Meyer david.meyer at wu-wien.ac.at
Mon Sep 19 15:33:40 CEST 2005


Dear Emacs gurus,

When I am editing Sweave files in Emacs, two issues keep confusing me:

1) Normally, I use the fly-spell-mode (M-x flyspell-mode). But as soon
as an R chunk gets active, the flyspell-mode is deactivated---not only
for that R chunk, but also for the rest of the document. So, Emacs
"forgets" about fly-spell being activated as soon as I come accross an R
chunk.

2) I can't manage to mark an R chunk using the keyboard (i.e., with
Ctrl+Space etc.), because the selection vanishes as soon as I reach a
border of the chunk (@ or <<..>>= line). It works with the mouse,
though.

I am using GNU Emacs 21.4.1 and ESS 5.2.2. on gentoo linux.

I am using the following in 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"))


Can anybody help me?

Thanks!

David.




More information about the ESS-help mailing list