From: Eric Schulte <schulte.eric@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: Achim Gratz <Stromeko@nexgo.de>, emacs-orgmode@gnu.org
Subject: Re: [PATCH] Strip text properties from string code block arguments
Date: Sun, 12 Jan 2014 09:35:27 -0700 [thread overview]
Message-ID: <87r48dnoog.fsf@gmail.com> (raw)
In-Reply-To: <87zjn1juha.fsf@bzg.ath.cx> (Bastien's message of "Sun, 12 Jan 2014 12:43:45 +0100")
Bastien <bzg@gnu.org> writes:
> Achim Gratz <Stromeko@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
next prev parent reply other threads:[~2014-01-12 16:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 17:26 [PATCH] Strip text properties from string code block arguments Daniel Gerber
2014-01-07 17:31 ` Bastien
2014-01-07 19:21 ` Achim Gratz
2014-01-08 8:47 ` Bastien
2014-01-08 10:03 ` Daniel Gerber
2014-01-08 16:31 ` Bastien
2014-01-08 17:27 ` Daniel Gerber
2014-01-08 17:32 ` Bastien
2014-01-09 20:39 ` Achim Gratz
2014-01-12 11:43 ` Bastien
2014-01-12 16:35 ` Eric Schulte [this message]
2014-01-12 23:28 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r48dnoog.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=Stromeko@nexgo.de \
--cc=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).