emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel-bug] Text properties silently stripped from code block evaluation results
@ 2011-12-13 22:19 Štěpán Němec
  2011-12-14  1:26 ` Eric Schulte
  0 siblings, 1 reply; 2+ messages in thread
From: Štěpán Němec @ 2011-12-13 22:19 UTC (permalink / raw)
  To: emacs-orgmode

`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.

-- 
Štěpán

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [babel-bug] Text properties silently stripped from code block evaluation results
  2011-12-13 22:19 [babel-bug] Text properties silently stripped from code block evaluation results Štěpán Němec
@ 2011-12-14  1:26 ` Eric Schulte
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2011-12-14  1:26 UTC (permalink / raw)
  To: Štěpán Němec; +Cc: emacs-orgmode

Štěpán Němec <stepnem@gmail.com> 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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-14  1:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-13 22:19 [babel-bug] Text properties silently stripped from code block evaluation results Štěpán Němec
2011-12-14  1:26 ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).