From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Gerber Subject: [PATCH] Strip text properties from string code block arguments Date: Tue, 07 Jan 2014 18:26:09 +0100 Message-ID: <52CC38B1.7060107@gmail.com> 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]:51467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0aQ1-0006Ng-WA for emacs-orgmode@gnu.org; Tue, 07 Jan 2014 12:26:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0aPt-0003xq-Iy for emacs-orgmode@gnu.org; Tue, 07 Jan 2014 12:26:21 -0500 Received: from mail-ea0-x22e.google.com ([2a00:1450:4013:c01::22e]:64075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0aPt-0003ws-Bq for emacs-orgmode@gnu.org; Tue, 07 Jan 2014 12:26:13 -0500 Received: by mail-ea0-f174.google.com with SMTP id b10so344087eae.19 for ; Tue, 07 Jan 2014 09:26:11 -0800 (PST) Received: from [192.168.0.12] (217-162-42-42.dynamic.hispeed.ch. [217.162.42.42]) by mx.google.com with ESMTPSA id h48sm181774216eev.3.2014.01.07.09.26.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 Jan 2014 09:26:11 -0800 (PST) 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: emacs-orgmode@gnu.org 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..baa5764 100644 --- a/lisp/ob-python.el +++ b/lisp/ob-python.el @@ -137,7 +137,7 @@ specifying a variable of the same value." org-babel-python-hline-to (format (if (and (stringp var) (string-match "[\n\r]" var)) "\"\"%S\"\"" "%S") - var)))) + (if (stringp var) (substring-no-properties var) var))))) (defun org-babel-python-table-or-string (results) "Convert RESULTS into an appropriate elisp value.