> When I open such a file, Auctex turns on a Noweb-mode which seems to
> be in conflict with my favorite cdlatex mode.
I have never been able to make AUCTeX and cdlatex play along in
a satisfying manner. I haven't spend any time on the issue either.
> Is it possible to make AucTeX understand that my foo.Rnw files are
> pure LaTeX files (despite the Rnw extension) and prevent it from
> loading noweb mode?
Look at auto-mode-alist. Maybe something simple like
#+begin_src emacs-lisp
(add-to-list 'auto-mode-alist '("\\.Rnw$" . latex-mode)
#+end_src
will work. It seems that ESS append auto-mode-alist.
> Another way is to solve the conflict between Noweb and cdlatex ;-)
I don't know what the problem is.
> Nota : my foo needs to keep the Rnw extension for compilation with Sweave.
There is a variable in newer versions of ESS that can be set to add
Sweave to C-c C-c of AUCTeX. I don't remember what it's called.
Here is what I use (note pgfSweave ≠ Sweave).
#+begin_src emacs-lisp
(add-hook 'Rnw-mode-hook
(lambda ()
(add-to-list 'TeX-command-list
'("Sweave" "pgfsweave %s"
TeX-run-command nil the:help "Run Sweave") t)
(add-to-list 'TeX-command-list
'("Sweave" "pgfsweave --pgfsweave-only %s"
TeX-run-command nil the:help "Run Sweave Only") t)
(setq TeX-command-default "Sweave")))
#+end_src
> Keep in mind that I'am just a user who does not understand the bowels of
> Emacs:-(
There is no excuse¹ :) '(emacs-lisp-intro '(included in Emacs) is very
friendly).
> i would be interested in a solution too.
> It would be perfect, if emacs could switch between TeX and
> Gnu-R Modes in noweb-Files.
What is Gnu-R modeS? ESS?
Notice, ESS comes with a wonderful noweb-based solution out of the box.
Maybe something can be hacked together using MuMaMo² if one despites
noweb-mode.
–Rasmus
Footnotes:
¹ http://www.youtube.com/watch?v=HM1Zb3xmvMc
² http://www.emacswiki.org/emacs/MuMaMo
--
Sent from my Emacs
_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex