Bastien <b...@gnu.org> writes:

> Achim Gratz <strom...@nexgo.de> writes:
>
>> Daniel Gerber writes:
>>> Not quite. I thought %S was not a typo because it escapes characters
>>> more nicely. E.g. with %s the buffer should contain \"\"\" to mean """
>>> in python.
>>
>> If that's the intention, then %S is arguably a latent bug, since the
>> escaping it applies can only by accident be compatible with the targeted
>> language.  I don't know if something like shell-quote arguments exists
>> for arbitrary programming languages.
>
> Maybe we should simply use %s (downcase) and escape quotes manually.
> If feels less random to me.
>
> What do you think?

I think using %S with strip-properties will address the great majority
of cases, and is certainly a better interim solution than the current
use of %s with no escaping.  I find string escaping is *normally* very
consistent between languages.

Then if someone wants to read the python spec, and implement custom
string escaping that would be useful, but it isn't immediately required.

Alternately maybe python's long-form """ strings should be used in all
cases?

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D

Reply via email to