[ESS] iESS - consistent string formatting within single and double quotes

Martin Maechler maechler at stat.math.ethz.ch
Fri Dec 2 09:42:22 CET 2011


>>>>> Richard M Heiberger <rmh at temple.edu>
>>>>>     on Thu, 1 Dec 2011 20:57:26 -0500 writes:

    > Aleks, Strings are handled as font-lock-string-face, which appears in
    > ESS *.el files only in ess-font-lock.el where alternate color schemes
    > are defined.  That means the iESS buffer is inheriting the definition
    > of a string from somewhere where strings are defined only by
    > double-quotes.  In lisp, the single quote is an important part of the
    > grammar and is not a string indicator, so that is possible place.  In
    > .r files we inherit from somewhere else where strings can be delimited
    > by single quotes.  Does this give you enough clues to suggest a repair?

Hmm, I'm pretty sure we don't want to change this:

The iESS buffer aka *R*  contains much R output, and the  ' - character
is often called apostrophe for a good reason:
It's used in many other contexts than just as a single quote:
In the other contexts, e.g., Maechler's e-mail, just the line
above this one, or then in the line above this one,... or in the
very first line of my answer...

No, no.. We really won't go there; long time ESS users already
know the pain we occasionaly have from treating `back quotes` as
something to be fontified in pairs and how ugly the *R* buffer
gets messed up, when R or C code called from R puts out messages
quoted `like' that...

==> there's a very good reason to not try finding a matching '
    to every apostrophe written there...

Martin

    > Rich
    > 2011/12/1 Aleksandar Blagotić <aca.blagotic at gmail.com>

    >> This one's bugging me for a while, and I never seemed to care about it
    >> much, until recently. As you can see in this image
    >> (http://i.imgur.com/w3JSH.png) the buffer on the left hand side
    >> formats strings within single quotes "properly", while I can achieve
    >> the same result in iESS buffer only for strings in double-quotes. I
    >> rarely use double quotes, unless I want to avoid escaping quotation
    >> marks. I reckon that this is an easy one, but currently I have no clue
    >> on this one. Any ideas?
    >> 
    >> 
    >> aL3xa
    >> 
    >> ______________________________________________
    >> ESS-help at r-project.org mailing list
    >> https://stat.ethz.ch/mailman/listinfo/ess-help
    >> 

    > [[alternative HTML version deleted]]


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



More information about the ESS-help mailing list