emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [babel-bug] Text properties silently stripped from code block ev


From: Eric Schulte
Subject: Re: [O] [babel-bug] Text properties silently stripped from code block evaluation results
Date: Tue, 13 Dec 2011 18:26:03 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Štěpán Němec <address@hidden> 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

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]