From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#50179: [PATCH] Add support for "bright" ANSI colors to ansi-color and term-mode Date: Tue, 24 Aug 2021 11:59:53 -0700 Message-ID: References: <838s0rvyfu.fsf@gnu.org> <83zgt6vi43.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32938"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50179@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 24 21:01:19 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mIbfh-0008Ft-EX for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Aug 2021 21:01:17 +0200 Original-Received: from localhost ([::1]:38308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIbfa-0007e0-Db for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Aug 2021 15:01:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIbfS-0007bz-Mm for bug-gnu-emacs@gnu.org; Tue, 24 Aug 2021 15:01:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33707) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mIbfS-0000Yy-Ec for bug-gnu-emacs@gnu.org; Tue, 24 Aug 2021 15:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mIbfS-0005wq-DL for bug-gnu-emacs@gnu.org; Tue, 24 Aug 2021 15:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Aug 2021 19:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50179 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 50179-submit@debbugs.gnu.org id=B50179.162983161322797 (code B ref 50179); Tue, 24 Aug 2021 19:01:02 +0000 Original-Received: (at 50179) by debbugs.gnu.org; 24 Aug 2021 19:00:13 +0000 Original-Received: from localhost ([127.0.0.1]:45253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIbef-0005vd-Dx for submit@debbugs.gnu.org; Tue, 24 Aug 2021 15:00:13 -0400 Original-Received: from mail-ua1-f42.google.com ([209.85.222.42]:43980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIbec-0005uK-T3 for 50179@debbugs.gnu.org; Tue, 24 Aug 2021 15:00:11 -0400 Original-Received: by mail-ua1-f42.google.com with SMTP id j31so5838003uad.10 for <50179@debbugs.gnu.org>; Tue, 24 Aug 2021 12:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=duDSmaLKLenOOH1mv+5x83JS9NVaVZu5kJ84mu330iU=; b=hvr2EUAuAKH8Yf9LRUNlRh9quK6xi+FHbbxzk64f48dDZesoQ2cZWuskZvhba6gRUg Hlq3HSdQmdjgWs0KbxO/rYCYw4+p6EsFitoI4cVH5Y5ZANFINhKR1Xhj8L7AGm7rYDAM MK7wCyTGO3bhHTPcctFfwZkr8vB+OIY2gc+Htg7lALP7uT4hEBxeKRh27fjB3bmP1C/g 4wRwG/5SlZ0x6Nw/I5v0u2nhOrcx5M7E22a5DKIHdaoR4QWFHcpL1e5C3d2eFp0QBBQt x9pXttxOGjrEc8q1l5vX7xPV8tBJlF92V9rOkzMtNTylCG/tBzPjUgntpYbnEaW87duL 60JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=duDSmaLKLenOOH1mv+5x83JS9NVaVZu5kJ84mu330iU=; b=cE5oLjuFBrGVjof9vwiSoFvF1kqoMtLPZaWk1eLZKPdyKtyT/550WJHXb47mdRR5kR 9VzbAelPbYUbCwSP/UeWktyQwR/FvjSoo1QOOUq+JUUrSDrkXhdDngnwSw/gAjhkW3yg g+CJIm471xzhnhTNOghVQ6a1Mrp37QEx6p/Rqn8zu3I8oFmAIGoghumwrS0HTlm3CnBF tnn87/j6lgWvJaDSvjsWVM+Jr6SZKxsEsD/yoehGAzImImGeeZ/Bit3LVYyZj3qghzW6 ZrIf/KdADQxKDQlQb+4X1tYegAqicc02mVWD3ftqbpV7h4cR4tQJEAHvPcF8W69rkYTY 39XA== X-Gm-Message-State: AOAM531CZd+yIF/M4nTg57kK86fNqWzYRMx1UlbNAteO2YZGi1/ojpTF 5w2LmfvW/+848EPqrs8i/cy3CZeMISaTGhoSC4E= X-Google-Smtp-Source: ABdhPJysJPjsZNAfFSaejmiuLf4vF8HsMIAGhCiS/QpL6kpCbjbIAUpsGd1+F5Nw1G5lSn/wvExvPK4bsYZ8PQBow4U= X-Received: by 2002:a05:6102:22d5:: with SMTP id a21mr28758974vsh.32.1629831605015; Tue, 24 Aug 2021 12:00:05 -0700 (PDT) In-Reply-To: <83zgt6vi43.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212575 Archived-At: On Tue, Aug 24, 2021 at 10:59 AM Eli Zaretskii wrote: > > > From: Jim Porter > > Date: Tue, 24 Aug 2021 10:38:06 -0700 > > Cc: 50179@debbugs.gnu.org > > > > > I wouldn't offer a customizable list for this: users have no > > > particular reason to redefine standard colors. > > > > I made this a defcustom because `ansi-color-faces-vector' and > > `ansi-color-names-vector' are defcustoms too. More practically > > speaking, I'd want to customize this new variable to make these colors > > match the Emacs theme I use. I chose colors in this patch to > > complement `ansi-color-names-vector', but they'd clash with my theme. > > How can named colors change with the theme? Faces can, but colors are > absolute. Bright-yellow is the same color whatever the theme. At > least IMO. I wonder if others think otherwise. The colors in `ansi-bright-color-names-vector' are just the color values that get used to set face attributes on bits of text. They (and the values in the other defcustoms mentioned above) get compiled into `ansi-color-map', which contains entries like `(foreground-color . "yellow2")'. Those then get applied as face attributes onto the relevant text. While you'd always want bright-yellow to be some kind of bright-looking yellow, the exact RGB value for that is just a matter of preference. In particular, a theme might need to adjust these color values so that there's appropriate contrast between ANSI-colorized text and the default foreground/background color specified by the theme. > > Would it be ok to use `ansi-color-bold-is-bright' > > (from patch 1 in `ansi-color.el') in `term.el'? > > Yes, why not? Mostly just my relative unfamiliarity with the preferred way to do things here. `ansi-color.el' and `term.el' seemed very independent of each other, and I wasn't sure if there was a particular reason for that. I'll just use `ansi-color-bold-is-bright' for both patches then.