help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: What happens with text properties in batch mode?


From: Eli Zaretskii
Subject: Re: What happens with text properties in batch mode?
Date: Fri, 07 Dec 2018 11:05:05 +0200

> From: Marcin Borkowski <mbork@mbork.pl>
> Date: Fri, 07 Dec 2018 08:56:23 +0100
> 
> it seems that when I `princ' something with text properties (e.g.,
> colored faces) in batch mode, the colors disappear.  Is it documented
> anywhere?  Can I disable this behavior?

princ is for human consumption, so the text properties are not
displayed.  There's prin1, which is for the Lisp reader, so it keeps
the properties, but in the form a Lisp reader can read and apply to
the string.

You need to use 'format' if you want to keep text properties on the
produced string.  princ and prin1 are the wrong tool for the job.



reply via email to

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