From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Using Emacs in fbterm. Date: Mon, 29 Aug 2022 21:53:46 +0300 Message-ID: <83a67mx4n9.fsf@gnu.org> References: <83czcjvtt2.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30597"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 29 20:55:01 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oSjuW-0007lH-Td for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Aug 2022 20:55:01 +0200 Original-Received: from localhost ([::1]:42370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSjuV-0000XF-O7 for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Aug 2022 14:54:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSjt1-0008ET-4W for emacs-devel@gnu.org; Mon, 29 Aug 2022 14:53:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43612) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSjt0-0001eQ-J3; Mon, 29 Aug 2022 14:53:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=WMs5o4Bj3lrsSFtvEjdfE/gsHU7TxRyvWZs8oD+9UQU=; b=gJvu6v0xFc3D KXV+T6b8Yz4+WLFhw+JrnO1VTHQCsddxIchFQ0WGtA4qUd4f478Q3aSqNorj+lRXKfhlzX8iPztIO 4UCPPSOVFDnKifwMrcJs0H5tSrgQTy4VSqahGxgJqR/Pl2mhs3LXx2CZg9rFHyB7LlcHahSanIlqH S9H5k6DjB0cryWQqxPfzxuOOuKoFLYSdFRKhZn0Vrb+J2hiwCdNYlzBbw7AHZOTZgB0pg86keaBzz +RlkI6OWZdrJY8NpSB7MboPjkfuS8+odNPr1sRRIYPylv3CGfBkls5sxvg1W9ed7/O/t9sQNLcZxN wnZ2tDuRQxI3FASDOO84UQ==; Original-Received: from [87.69.77.57] (port=1130 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSjt0-0002gT-0Q; Mon, 29 Aug 2022 14:53:26 -0400 In-Reply-To: (message from Alan Mackenzie on Mon, 29 Aug 2022 18:44:26 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:294297 Archived-At: > Date: Mon, 29 Aug 2022 18:44:26 +0000 > Cc: emacs-devel@gnu.org > From: Alan Mackenzie > > > > 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.