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: Re: Colors on TTY (v26) Date: Sun, 31 Mar 2019 22:45:55 +0300 Message-ID: References: <83v9zzgjmn.fsf@gnu.org> <83pnq7gcw9.fsf@gnu.org> <83mulahpcw.fsf@gnu.org> 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="263966"; mail-complaints-to="usenet@blaine.gmane.org" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 31 21:46:33 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 1hAgPY-0016aC-Pg for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Mar 2019 21:46:32 +0200 Original-Received: from localhost ([127.0.0.1]:40593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAgPX-00012X-N4 for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Mar 2019 15:46:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAgPK-00012Q-RI for help-gnu-emacs@gnu.org; Sun, 31 Mar 2019 15:46:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hAgPJ-0007tS-NE for help-gnu-emacs@gnu.org; Sun, 31 Mar 2019 15:46:18 -0400 Original-Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]:40261) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hAgPH-0007sR-TK; Sun, 31 Mar 2019 15:46:16 -0400 Original-Received: by mail-lj1-x229.google.com with SMTP id q66so6169127ljq.7; Sun, 31 Mar 2019 12:46:15 -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=OrbUBjr33tYmMCdcQKsiLgVuINz9S6CVRa88b4LvXRs=; b=g8iR+Q3eko8cAh3Dd/Cx1R9u4KcDG86X5Spl32oTKASGl4bolrPEQ7hED3O1N6bbGr swO8Doucl/avAuNwJBjYGZRsX4XO8P36ZgH9+mfuN59ybPGejjGSJGZolGFoR2bOvpTA hA7z9agsOktXMCxIzp95+hiRARJhVVSQy+U08xhpQm/NDePnnfTNbVPyV4fSnsY0E09Q YnePx9KdaaukZUWzck66zeS59/RC8GtpKhBQYyQDAieBMETudFZJRIQ7ulyL68CcSKcG dugHzXQhmKQEI+rcffGf5NuNYYXCxAk8bFWZeAbc/Ym4ceswpofejD7scXmIgH8UnhNw 4pTQ== 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=OrbUBjr33tYmMCdcQKsiLgVuINz9S6CVRa88b4LvXRs=; b=KT/x9A+G4M3r+96EnJIvrATpFvvZgQ5hCri8OJ7SoQ43vDC3UiI+TKpAlscbQ9EkQ6 Hg15OoS1KvpWrbdcxOZOLmabNjLKVRfqGtbL0qDfVdoEE1j9KTqVItaEkNLYRTmULzhO mIeOtkgcf+vx/JiL/ih2TF6C1nO+JO4Kioi/uNKl8t4bLhzlCR+R5QOg+6I6jDDg2yDp 13qufUVO9cPkaO1uMgHyAp8VmBULr6enhf87Ww2nkg25uYs7O5QXLVRXy8Dwiz7bnfzq i3HwEDk0zuP45jA1Jm6PuGKikZbd5LMzI7VDf6voJjnPykxYw9l87qQw2FgwjlSOprHI ZzMQ== X-Gm-Message-State: APjAAAUm9cYXJ84rmTMAnyjqsq8OYx34RfOGxLk03Acx01I8vdKhJ/B1 lcA7fI1o2LbBMLJCeuh2/ElqDg6OGqxaoisirAK82Kwc X-Google-Smtp-Source: APXvYqzTiFCaVOoLFWwhw9KwNagqu45Zi2UUxMlGBhS4KWI4/UxhiQ5YimbQuZU4iQpUnrpaJe9Qoo6IJ1R31TAB3hw= X-Received: by 2002:a2e:8648:: with SMTP id i8mr34314588ljj.166.1554061574298; Sun, 31 Mar 2019 12:46:14 -0700 (PDT) In-Reply-To: <83mulahpcw.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::229 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:119806 Archived-At: On Sun, Mar 31, 2019 at 9:26 PM Eli Zaretskii wrote: > > From: Aleksey Midenkov > > Date: Sun, 31 Mar 2019 21:09:56 +0300 > > Cc: help-gnu-emacs@gnu.org > > > > > I tried different terminal names. It seems, that it understands > "xterm-" prefix. The remaining part can be > > > arbitrary: I literally tried "xterm-something" and it worked. I > guess, there is no such file > > "xterm-something" in the > > > library. In any case, it's much better to rename terminal to > "xterm-*", than deal with distributed files. > > > > Just do "ls lisp/term/*.el" and see what you've got there. > > > > And? > > And you will see what names are supported without any need to guess. > And if you want more details about how this works, I can suggest > reading the section "Terminal-Specific Initialization" in the ELisp > manual. You could describe it briefly in the first place: same amount or less in characters, but more benefit for readers. > > > What do you mean "should not exists"? The code is there, it uses > > whatever knowledge it has when you call it. Where you did call it, it > > didn't yet query the terminal to see how many colors it supports, and > > didn't set up their names. IOW, you are shooting yourself in the foot > > by calling the function too early. There are various hooks provided > > by startup.el which allow you to call this function when colors are > > set up; do that, and Bob's your uncle. > > > > You may call it anything you like, but this misleading behavior causes > trouble. > > Yes, invoking code in .emacs which depends on stuff that gets set up > during startup can get some using to. It does make sense, eventually, > though. > > -- All the best, Aleksey Midenkov @midenok