From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Aleksey Midenkov Newsgroups: gmane.emacs.help Subject: Colors on TTY (v26) Date: Sun, 31 Mar 2019 11:22:59 +0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="92091"; mail-complaints-to="usenet@blaine.gmane.org" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 31 14:36:03 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hAZgw-000Nn1-JM for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Mar 2019 14:36:02 +0200 Original-Received: from localhost ([127.0.0.1]:52022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAZgv-0003rV-FH for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Mar 2019 08:36:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAVlb-0003OV-Ly for help-gnu-emacs@gnu.org; Sun, 31 Mar 2019 04:24:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hAVla-0002L4-Oy for help-gnu-emacs@gnu.org; Sun, 31 Mar 2019 04:24:35 -0400 Original-Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:45011) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hAVla-0002Km-E6 for help-gnu-emacs@gnu.org; Sun, 31 Mar 2019 04:24:34 -0400 Original-Received: by mail-lj1-x22f.google.com with SMTP id h16so5351729ljg.11 for ; Sun, 31 Mar 2019 01:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=n0gTfwrJAoRVjqWKuymYBrkXPRWNJXtay6rCPq99XTs=; b=jUpbvzIovGB/uRgX1MQ9ykyQT8BLGJ+gvwphcwmyptL1g+FjM+Y/B9GJpL9YxGEcU1 7ieAdXKUEOFw5UGlJUBwC+x1AsCLBGnWDNPfCcaljvjvC35Bm1qinUUf0lPKKEOBQe19 JVP6xRADk5ulSqjCoog/YNWcqi5a6RLqc+KAg2DeKywN6C5Sl8fE8iwsHFejQe0RUcq/ YVxq/IyldeotKbdvzBqiFGf/qeussNVifvasvpsu9AyGyJ+1y8+4v4v3tLl8hcrcPTMl ZioyrOVvusaC0Th5y/y+a8Jk1s+PDv2nQGEEw2r8XZdKEJITkXWhNxjQ75zPg5P2S0Q5 UNwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=n0gTfwrJAoRVjqWKuymYBrkXPRWNJXtay6rCPq99XTs=; b=hdRRoLv8DJtbt8FG5H7Z0ioigWVsSuPVMHc8wAayhJKHKi/wWJMBSouaYnRd1M3io/ PGp0pr8yO5DlxA5NnaCj2dZPTMtJTVjI4R44D9tSgIvxgvyTQ6dYoXJx2cDl0aNAz7KW em9o7RbuSv0Pb1lBvS1rPmsWjApcUXYV66wCYUnLMDJQCSsTGyZh5N69mFxxYqrv/ATw x1PS8bGV1mzcpOawCCl+Zrh6ZyGdAhv4FbISKMsxYau0PtR0P6ACBRCDzumBrdTrOaN6 e+dH2jLdJ4Nje6WT82Shcu/ACOzSGvFb0ykSOr8FirifiR6Y/0+P658EAzeqJ50WSVNV AD3Q== X-Gm-Message-State: APjAAAW9LU1WG9xAIWBv8Tw+CRoD3IwOpUAiOD0ndUtsVM531+1DdMNB wBkaJXnXRtTeiSTJbbD0YciVqprLpJ6TllCbvJI+dBrVetA= X-Google-Smtp-Source: APXvYqyw4w/m7oZLSPhYZL9t8R6I8TOeaEdLOpqnruuGwGw4AGv1ykKuNaSxOnvF0R3OdOfueeBnoYPikbeIIoeMSX0= X-Received: by 2002:a2e:3010:: with SMTP id w16mr6717281ljw.62.1554020672501; Sun, 31 Mar 2019 01:24:32 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::22f X-Mailman-Approved-At: Sun, 31 Mar 2019 08:35:51 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119788 Archived-At: Trial and error shown that emacs holds special knowledge on terminal names: f.ex. "xterm-something" works as 256 colors and "xterm2" works as 16 colors. This is in fact very strange because there are terminals like "screen.xterm-256color". So it's not good to hold special magic about term names for that. Why it doesn't check terminfo db for that (though it checks for 24bit as doc states)? Looks like a bug to me. To test it: 1. infocmp your current term into file; 2. rename file and rename term inside it; 3. tic renamed file; 4. set TERM to renamed term. And voila: it's either 256 or 16 colors depending on term name! Another bug: (list-color-display) always shows 16 colors from .emacs file (or from -f option). It detects 256 colors somehow later and then list-colors-display executed interactively shows different result. -- All the best, Aleksey Midenkov @midenok