emacs-devel
[Top][All Lists]
Advanced

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

Re: Using Emacs in fbterm.


From: Alan Mackenzie
Subject: Re: Using Emacs in fbterm.
Date: Mon, 29 Aug 2022 18:44:26 +0000

Hello, Eli.

On Mon, Aug 29, 2022 at 20:33:13 +0300, Eli Zaretskii wrote:
> > Date: Mon, 29 Aug 2022 16:41:00 +0000
> > From: Alan Mackenzie <acm@muc.de>
> > 
> > There is a problem with colours in Emacs in fbterm.  When one does M-:
> > (defined-colors) it prints a list of just eight colours, black, red,
> > ...., white.
> > 
> > However, the face constructing mechanism seems to assume more than eight
> > colours, and this seems buggy.

> Face constructing makes no such assumptions.  If the colors defined
> for the face are not directly supported by the terminal (in this case,
> not in the 8 colors), Emacs uses color-translation to find the closest
> color that is supported.  See tty-colors.el.  If this translation
> doesn't produce satisfactory results, the face colors need to be
> either:

>   . changed such that (a) on color-rich terminals the colors are
>     similar, but (b) on 8-color terminals we get better results; or
>   . the face definition should be changed to have a separate setting
>     of colors for terminals with 8 colors

> > The face hi-green, for example, rather than having background
> > "green" gets "light green".  This appears on the terminal as dark
> > yellow, which is clearly wrong.

> Why do you think it's wrong?

hi-green MUST be green, otherwise, what's the point?  What is wrong is
the "light" in light green.  It's simply "green" on the Linux console.
Looking at the Lisp expression in customize-face, light green can only
happen when (min-colors 88) is satisfied.

> Given that yellow is closer to hi-green (judging by its RGB
> components) than green, I see nothing wrong here.

> > Also the face mode-line-inactive is indistinguishable from the default
> > face

> ??? It should be the same as mode-line face of the active mode line.
> I wonder how come it's the same as the default in your case.  Is that
> in "emacs -Q"?

It was, yes.

I've made further progress in diagnosing this.  If the environment
variable TERM is "linux", the problems with the colours don't happen.
If it's "fbterm", they do.

So, I would guess that somewhere in the depths of the face construction,
there's a test for TERM being "linux".  Or, maybe, an inappropriate
terminfo entry is getting used when it's "fbterm".  Or something like
that.  Maybe the fbterm terminfo entry is inconsistent with fbterm
itself.

I think it's worth fixing, whatever it is.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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