[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] Folding Sweave code

From: Riccardo Romoli
Subject: [AUCTeX] Folding Sweave code
Date: Mon, 27 Feb 2012 21:14:50 +0100

Hi,  Is there an emacs minor-mode that lets you selectively fold/unfold environments while in Sweave?

I tried for some day to use emacs-folding-mode but a special character such $, let folding mode "goes crazy" and misunderstand the use of $. In particular after the first $ in the ESS script, all the code after became LaTeX 'math' code.

I also tested emacs-outline-minor-mode. But when I move through R from LaTeX (and vice versa) all the outlined part were unfolded despite I write in my .emacs:

(defun turn-on-outline-minor-mode ()
 (outline-minor-mode 1))
  (add-hook 'ess-mode-hook 'turn-on-outline-minor-mode)
  (add-hook 'LaTeX-mode-hook 'turn-on-outline-minor-mode)
  (add-hook 'latex-mode-hook 'turn-on-outline-minor-mode)
(setq outline-minor-mode-prefix "\C-c\C-o")

Do you have any suggestions?? None of you has the same problem? How you solved it?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]