Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-12 Thread Bastien
Hi Eric, Eric Schulte writes: > 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. Okay, that's no

Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-12 Thread Eric Schulte
Bastien writes: > Achim Gratz 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, sin

Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-12 Thread Bastien
Achim Gratz 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 applie

Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-09 Thread Achim Gratz
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 compat

Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-08 Thread Bastien
Daniel Gerber writes: > On 08/01/2014 17:31, Bastien wrote: >> Daniel Gerber writes: >> >>> This change in org-babel-python-var-to-python makes python code blocks >>> accept a string with text properties (as one gets when referring >>> another code block). I guess there should be something simil

Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-08 Thread Daniel Gerber
On 08/01/2014 17:31, Bastien wrote: Daniel Gerber writes: This change in org-babel-python-var-to-python makes python code blocks accept a string with text properties (as one gets when referring another code block). I guess there should be something similar for other languages. I've now fixed

Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-08 Thread Bastien
Daniel Gerber writes: > This change in org-babel-python-var-to-python makes python code blocks > accept a string with text properties (as one gets when referring > another code block). I guess there should be something similar for > other languages. I've now fixed this by using %s instead of %S,

Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-08 Thread Daniel Gerber
Hi Bastien, On 07/01/2014 18:31, Bastien wrote: Daniel Gerber writes: This change in org-babel-python-var-to-python makes python code blocks accept a string with text properties (as one gets when referring another code block). I guess there should be something similar for other languages. I

Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-08 Thread Bastien
Achim Gratz writes: > Bastien writes: >> I don't understand why properties would be a problem here. >> Can you elaborate a bit on this? > > With format "%S" prints an s-expression via prin1, not a string. So > either the format should be "%s" or the properties need to be stripped > unless one re

Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-07 Thread Achim Gratz
Bastien writes: > I don't understand why properties would be a problem here. > Can you elaborate a bit on this? With format "%S" prints an s-expression via prin1, not a string. So either the format should be "%s" or the properties need to be stripped unless one really wants to interpret the resul

Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-07 Thread Bastien
Hi Daniel, Daniel Gerber writes: > This change in org-babel-python-var-to-python makes python code blocks > accept a string with text properties (as one gets when referring > another code block). I guess there should be something similar for > other languages. I don't understand why properties

[O] [PATCH] Strip text properties from string code block arguments

2014-01-07 Thread Daniel Gerber
Hi, This change in org-babel-python-var-to-python makes python code blocks accept a string with text properties (as one gets when referring another code block). I guess there should be something similar for other languages. diff --git a/lisp/ob-python.el b/lisp/ob-python.el index 1457682..baa