[ESS] flyspell and Rnw files

Vitalie Spinu spinuvit at gmail.com
Thu Jun 28 10:15:51 CEST 2012


  >> Kasper Daniel Hansen <kasperdanielhansen at gmail.com>
  >> on Tue, 26 Jun 2012 11:18:43 -0400 wrote:

  > (Only tangentially related to ESS, but posted here in case some knows).
  > I use flyspell-mode to spell check my Rnw files.  I have a number of
  > custom latex command like
  >   \Rcode{}
  >   \Rclass{}
  > I want to disable flyspell checking of what is inside these commands,
  > like not spell check 'arg' in
  >   \Rcode{arg}

  > Googling suggests that this is not straightforward, but it may be possible.

Now it's not straightforward. From next version of ESS you will probably
be able to have R-mode inside those commands. Just remember to ask the
same question in september, for how to do that.

Best, 
Vitalie.


  > Answers to a related question, in case other people were wondering:
  > the following enables flyspell in tex chunks, but disables it in R
  > chunks

  > (add-hook 'ess-mode-hook
  > 	  (lambda ()
  > 	    (turn-off-flyspell)
  > 	    ))

You can turn flyspell-prog-mode in R to get spell checker only in
comments and strings. 

  > (add-hook 'LaTeX-mode-hook
  > 	  (lambda ()
  > 	    (turn-on-flyspell)
  > 	    ))

  > Kasper

  > ______________________________________________
  > ESS-help at r-project.org mailing list
  > https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list