[ESS] fighting indentation in SAS mode

Vitalie Spinu spinuvit at gmail.com
Wed Nov 6 22:42:35 CET 2013

Could you please prepare a file with a sample SAS code in which you
would put all the bugs you found with examples. Similar to what we have
in etc/R-ess-bugs.R. I don't use SAS but I will try to find time to look
into it.

Would be nice if ESS indentation be compatible with SAS editor.



PS: Tabs are controlled by indent-tabs-mode; if it is t, emacs inserts
spaces. This might be the reason for your backspace problem.

 >>> Ross Boylan on Wed, 06 Nov 2013 13:17:02 -0800 wrote:

 RB> 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

 RB> I did some more tests.

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

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

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

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

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

 RB> Ross

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

More information about the ESS-help mailing list