[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What happens with text properties in batch mode?
From: |
Marcin Borkowski |
Subject: |
Re: What happens with text properties in batch mode? |
Date: |
Sat, 08 Dec 2018 20:29:03 +0100 |
User-agent: |
mu4e 1.1.0; emacs 27.0.50 |
On 2018-12-07, at 10:05, Eli Zaretskii <eliz@gnu.org> wrote:
>> 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.
Actually, I don't - I was just curious why princ does TRT for me, and
couldn't find it documented.
Best,
--
Marcin Borkowski
http://mbork.pl