[ESS] Misread quotes in .Rnw files

Therneau, Terry M., Ph.D. therneau at mayo.edu
Tue Jul 6 16:23:45 CEST 2010


I have a large .Rnw file with an annoyance.  When working with it at
work, any single quote in the text portion of the document is misread
and turn on alternate coloring.  Something such as
    .... If we follow Ripley's suggestion to .....

The ess coloring seems to think that anything after the single quote is
a string, for perhaps pages and pages until it finds the next one.  I've
"solved" this by putting  %' somewhere in the right margin of the line
so I get just a little bit of green text.

ESS 5.10
GNU Emacs 21.4.1 (x86_64-redhat-linus-gnu, X toolkit, Xaw3d scroll bars)
of 2008-06-14 on builders6.centos.org

The following lines exist in my own startup, copied from someone else (I
can't read em).

; R noweb codes
(defun Rnw-mode ()
  (require 'ess-noweb)
  (noweb-mode)
  (if (fboundp 'R-mode)
      (setq noweb-default-code-mode 'R-mode)))
 
Any hints on what needs to be done would be appreciated.

Terry Therneau

PS Overall the mode is a delight to use.  Kudos to the designers.



More information about the ESS-help mailing list