From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [babel-bug] Text properties silently stripped from code block evaluation results Date: Tue, 13 Dec 2011 18:26:03 -0700 Message-ID: <8739covt90.fsf@gmx.com> References: <87mxaw3yik.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:35673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Radbr-0002Z9-DJ for emacs-orgmode@gnu.org; Tue, 13 Dec 2011 20:26:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Radbq-0004Ic-75 for emacs-orgmode@gnu.org; Tue, 13 Dec 2011 20:26:15 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:36201) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Radbp-0004IU-PG for emacs-orgmode@gnu.org; Tue, 13 Dec 2011 20:26:14 -0500 In-Reply-To: <87mxaw3yik.fsf@gmail.com> (=?utf-8?B?IsWgdMSbcMOhbiBOxJtt?= =?utf-8?B?ZWMiJ3M=?= message of "Tue, 13 Dec 2011 23:19:47 +0100") 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: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Cc: emacs-orgmode@gnu.org =C5=A0t=C4=9Bp=C3=A1n N=C4=9Bmec writes: > `org-babel-insert-result' unconditionally strips any text properties > from the evaluation result. > > One problem is that this isn't documented. Another problem is that this > behaviour might not be desirable (I can't imagine why one _would_ want > to have the properties stripped, on the contrary -- I need them > preserved in at least one of my use cases). > > Please document the behaviour and either abstain from the strip-tease > altogether or provide a way to switch it off. The results of code blocks can be plain text or vectors of plain text, Emacs-lisp textual object with properties are not a result type supported by Org-mode code blocks. I think it would generally be more surprising if /fancier/ elisp objects were returned rather than plain text. Also, this would raise issues about how to pass properties to other (non elisp) programming languages. If you want to remove the property stripping behavior locally add the following elisp snippet to your .emacs which should have the desired effect. (defun org-babel-clean-text-properties (it) it) I just did this locally and all test cases still passed, so it should be safe. Best -- Eric --=20 Eric Schulte http://cs.unm.edu/~eschulte/