From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Gerber Subject: Re: [PATCH] Strip text properties from string code block arguments Date: Wed, 08 Jan 2014 18:27:19 +0100 Message-ID: <52CD8A77.1060908@gmail.com> References: <52CC38B1.7060107@gmail.com> <87wqia1lmi.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0wut-0006uH-Co for emacs-orgmode@gnu.org; Wed, 08 Jan 2014 12:27:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0wuk-0000Kr-Rw for emacs-orgmode@gnu.org; Wed, 08 Jan 2014 12:27:43 -0500 In-Reply-To: <87wqia1lmi.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org 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 this by using %s instead of %S, let me know if this > works correctly for you. 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. Also, one quote is missing - (if (and (stringp var) (string-match "[\n\r]" var)) "\"\"%s\"\"" "%s") + (if (and (stringp var) (string-match "[\n\r]" var)) "\"\"\"%s\"\"\"" "\"%s\"")