[ESS] fighting indentation in SAS mode

Ross Boylan ross at biostat.ucsf.edu
Wed Nov 6 22:17:02 CET 2013


On Wed, 2013-11-06 at 09:38 -0600, Rodney Sparapani wrote:
> On 11/06/2013 07:31 AM, Martin Maechler wrote:
> > By default, using ESS SAS mode should be more gratifying than plain text
> > mode, right?
> 
> Right
> 
> > So is there something which should be changed in  ESS, i.e.,  ESS
> > 13.09-1  which is planned to be released
> > within about a week ?
> 
> I don't see an issue.  But, this is a good time to speak up or forever
> hold your peace ;o)  And, as always, patches welcome!
> 
> > Thanks for clarification,
> > Martin

I did some more tests.

First, it appears that SAS mode remembers the furthest right tab stop
you use, even inside commments, and wants to indent all later lines to
that point.

Second, "later" means chronologically later.  Even lines above the spot
where the tab is used are affected if typed in after using that tab
stop.

Third, deleting at a tab stop always takes you back one space, not one
tab stop.  This is not the behavior of the SAS editor, and not too
helpful when one is seeking to end from a nesting level.

Fourth, syntax is colorized in a helpful way.  The coloring seems to
know the exact procedures defined in SAS since "proc nlmixed;" is
colored by "proc nlm;" is not.  This is consistent with the behavior of
the SAS editor, and is helpful for catching typos.  OTOH, it means the
code is a bit brittle, since as SAS adds procedures (or maybe changes
syntax, e.g., adding options) the ESS code would need to be updated.
(If you're being really picky, it would need to know which version of
SAS was being targetted.  However, the set of SAS procedures is pretty
stable).  Also, SAS has tons of add-on modules; I haven't checked how
many of them are covered.

Obviously I'd like different behavior (for 1-3 above).  Also obviously
it's been this way for quite awhile, and so the new release won't be any
worse than the old ones if nothing is done.

Ross



More information about the ESS-help mailing list