[ESS] Snw files are not weaved by C-c C-c from AucTeX-mode

A.J. Rossini blindglobe at gmail.com
Wed Aug 2 05:52:01 CEST 2006


On 8/1/06, Rodney Sparapani <rsparapa at mcw.edu> wrote:
> A.J. Rossini wrote:
> > Because those were hacks that Fritz introduced for some reason (I
> > don't really know why, and I don't have an opinion as to their
> > goodness), where as the standard Noweb format is the traditional
> >
> > << >>=
> >
> > @
> >
> > encoding.  It's not really robust, either, but there are cool
> > noweb-related toys for formatting and indexing that you can use by
> > using this.
> >
> <SNIP>
>
> I think hack is a little strong.  Code marks that are valid latex
> are the only kind that make any sense.  That way, you can still make a
> valid document if you don't have the statistical package installed
> (or emacs or ESS for that matter).

You are missing one critical point, and that is that Noweb isn't
restricted to LaTeX.   Noweb (and Sweave) support HTML (and could
directly support RTF) for document markup.   Noweb is
documentation-mode independent, and noweb-mode can be tweaked to
support XML/HTML editing modes with minimal work.  We default to LaTeX
for historical reasons (my dislike of raw HTML editing).

> Furthermore, this shows us the way to extend to other packages.
> Right now, <<>>= and @ don't tell you which package that you
> need to run: R, S+, SAS?  It's a minefield.  But, if we
> introduce the other environments as needed, then we have a system
> that can be rationally extended as necessary.  For example, the
> following environments:  Rinput, S+input, SASinput, etc.

The ESS/Noweb approach (which is probably still supported in the code,
though I've not checked recently) is:

<<thisChunkName.sas>>=
** -*- mode: SAS -*- ;
proc mixed ...

@


Originally, and in a historical sense, that should have been either:

<<thisChunkName.sas,mode=SAS>>=

@

or

<<thisChunkName.sas>>=

@ %mode SAS

Or simply recognizing the suffix on the chunk name (with the "default
code mode" being used should the chunk name not have a suffix or even
if the chunk is nameless).


but I was too lazy at the time to insist (by coding ESS or by convincing Fritz).

best,
-tony

blindglobe at gmail.com
Muttenz, Switzerland.
"Commit early,commit often, and commit in a repository from which we can easily
roll-back your mistakes" (AJR, 4Jan05).




More information about the ESS-help mailing list