[Top][All Lists]

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

Re: Using Emacs in fbterm.

From: Eli Zaretskii
Subject: Re: Using Emacs in fbterm.
Date: Mon, 29 Aug 2022 21:53:46 +0300

> Date: Mon, 29 Aug 2022 18:44:26 +0000
> Cc: emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
> > > 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?

Why, because of the textual similarity? that's a wrong way of finding
the best match for a color.  Long time ago what is now tty-colors.el
used such "heuristics", and it was found to be less satisfactory than
the current system based on RGB values.

So we won't go back to the sub-optimal method.

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

You are misinterpreting what the code does.  It doesn't work the way
you think it does.

Once again, if the results of automatic translation of colors are
unsatisfactory, we should do one of these:

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

Please try to see which one of these gives better results, and let's
go with that.  Although...

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

Which problems do or don't happen depending on $TERM?

> So, I would guess that somewhere in the depths of the face construction,
> there's a test for TERM being "linux".

I doubt that.

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

That's possible, but also unlikely.  If terminfo is the problem, then
looking at the color commands that we send to the terminal (in term.c)
could perhaps point out the reason.

reply via email to

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