[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What happens with text properties in batch mode?
From: |
tomas |
Subject: |
Re: What happens with text properties in batch mode? |
Date: |
Fri, 7 Dec 2018 09:42:06 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Dec 07, 2018 at 08:56:23AM +0100, Marcin Borkowski wrote:
> Hi all,
>
> it seems that when I `princ' something with text properties (e.g.,
> colored faces) in batch mode, the colors disappear.
From a quick test here (which may be flawed, mind you), I can confirm
that princ removes the properties from strings.
> Is it documented anywhere? Can I disable this behavior?
I don't know about that. A cursory look at "print.c", and there, the C
functions `print' and `print_object' suggest that yes, it's intentional,
and it's pretty deeply rooted.
> I found this: https://github.com/Lindydancer/e2ansi, and its existence
> suggests that outputting colored stuff (using ANSI codes) is
> non-trivial. Am I right?
I think this is only relevant if you are trying to colorize the output
to an ANSI terminal (or more probably to an ANSI terminal emulator, like
an Xterm or the Linux console, unless you're working at a computer
museum, these days). Probably not relevant in your case, since `princ'
outputs most of the time to some buffer-like thingy, but can be trained
to do almost everything...
What are you trying to achieve?
Cheers
-- tomás
signature.asc
Description: Digital signature