[ESS] Colors in noweb mode

Ross Boylan ross at biostat.ucsf.edu
Fri Feb 17 22:29:43 CET 2012


I am having a variation on this problem.  When I move around the major
mode changes appropriately (unlike the earlier report).  When I am in a
text section, the coloring of the code sections remains correct.  But
when I switch to the code section, all the text switches to coloring as
if it were code (e.g., "for" appears in a different color).

I think this is harmless, but it's a bit disorienting.

I'm running emacs 23.1.1 with ESS 5.14, both backported to Debian Lenny.
I upgraded because noweb mode was not mode-switching properly before
(emacs 22, ess 5.3.8).  Running in X windows.

This first line in the file worked:
 -*- mode: Noweb; noweb-default-code-mode: python-mode -*-
But setting noweb-code-mode: python-mode was not effective (even after
the upgrades).   That is, I was in fundamental mode when in a code
chunk--not a good way to do python programming! I used noweb-code-mode
earlier, so perhaps that was more important than the upgrade.

Other details: auctex 11.83 (which is not current) is installed
providing the latex-mode for the text chunks.  The debian noweb package
is installed and also provides noweb mode; the ESS version has priority
over it.  However, there were a bunch of packages that were installed
(eieio, speedbar, cedet) for emacs 22 that have no moved into the main
emacs 23. Though I removed the packages, some of their initialization
code is still executing, as (I think) is some from the noweb package.

The file I'm working on has nothing to do with R or ESS other than using
noweb-mode.

Is the noweb-mode.el provided as part of ESS now the "official" version
for that file?  I notice the maintainers are set to ESS, and unlike the
version with the noweb package the code does not have a big notice
saying it is incomplete (though comments indicate some undone bits).

Ross Boylan

On Fri, 2011-12-02 at 14:47 -0600, Terry Therneau wrote:
> Emacs in an Xwindow
> When I move around the modeline does not change (but it does on the
> laptop!)
> Updating to a newer emacs isn't in my pervue.
> 
> However, information that it might well be emacs and not some feature
> of my own setup is comforting.  Like many others, parts of my
> configuration file are stolen and other so long ago written that I don't
> remember details of what or why.
> 
> Thanks much
> 
> Terry Therneau
> 
> 
> On Fri, 2011-12-02 at 10:56 -0500, Kasper Daniel Hansen wrote:
> > Quick questions:
> > 
> > (1) are are using emacs in a terminal (-nw) or in an Xwindow?
> > (2) when you move around in noweb mode, does the modeline change
> > appropriately when you move from a latex chunk to an R chunk and back
> > again?
> > 
> > This is not too helpful, but I would consider upgrading Emacs.  In my
> > experience the newer Emacs (version 22 or 23) are much better at
> > handling this stuff (but this is purely anecdotal)
> > 
> > Kasper
> > 
> > On Fri, Dec 2, 2011 at 10:50 AM, Terry Therneau <therneau at mayo.edu>
> > wrote:
> > > I have a colors problem for .Rnw files, but only on the servers at
> > work.
> > >
> > > The problem: the code portions of the document are fine.  In the
> > text
> > > portion I get coloring appropriate to the code portions though.  So
> > for
> > > the text string
> > >      .... a second order Taylor series about it's value at ....
> > > the color changes to red at the single quote mark an persists until
> > the
> > > next one.  Words like "for", "in", and "function" are hightlighted,
> > etc.
> >
> 
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list