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.help Subject: Re: Forcing emacs to not use 256 colors Date: Fri, 30 Jun 2023 15:00:13 +0300 Message-ID: <83o7kxrwhe.fsf@gnu.org> References: <20230628115134.6f5874ca@fecfc4134a3d> <0100018902b4043c-e3851df4-1be4-4dbb-b58b-22fcd8412452-000000@email.amazonses.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37858"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 30 14:01:18 2023 Return-path: Envelope-to: geh-help-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 1qFCoQ-0009cz-2w for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 30 Jun 2023 14:01:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFCnb-0000HT-5g; Fri, 30 Jun 2023 08:00:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFCn6-0008Kz-PC for help-gnu-emacs@gnu.org; Fri, 30 Jun 2023 08:00:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFCmx-00029T-VP for help-gnu-emacs@gnu.org; Fri, 30 Jun 2023 07:59:51 -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=PzhKvdA9wAxX9oOWCj/tC7ubSvptnl9TMVatcO9xb8A=; b=eqtGJ+iSPGS6 LO5tzPeVMB5Iu2+TK3g2Rbv5Rv9+GtvOXCWfXk7IZnmIj25HWO3WcMQpozFvb6v9vXnlidbW9UpSt Z7sEGLSHr6OujqbDYsHulWNXMGCjkhvpF00fAIH82tOianStNObjimIcKBrcaIISYuxP7eCDtF7h7 n+ZXfKCxd7YoUyVlnGwxfQ0geoMEvGO7aOWD035JppqiUEGVZA1TEzJhBKTzLy6uyXumnr+Sl/jFa m5G5LYJq7xyKlx7PnkFw8XK0qHtQzenPcwDu4m8DaUGjDRZaf5AN7fpZOXFkf6aozQrUrfDW+/m4X zV5MAvRr0U2CiOa4fY7Gyg==; Original-Received: from [87.69.77.57] (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 1qFCmu-0004fa-Er for help-gnu-emacs@gnu.org; Fri, 30 Jun 2023 07:59:47 -0400 In-Reply-To: <0100018902b4043c-e3851df4-1be4-4dbb-b58b-22fcd8412452-000000@email.amazonses.com> (message from Tom Noonan II on Wed, 28 Jun 2023 15:51:39 +0000) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144067 Archived-At: > From: Tom Noonan II > Date: Wed, 28 Jun 2023 15:51:39 +0000 > > Good day: > > I'm a long time emacs user and I'm used to the default 16 color syntax > highlighting. I recently upgraded my system which brought in 256 color > support, and I find the new syntax highlighting colors distasteful. I > also dislike how the colors may be completely different depending on if > I'm using a 16 color terminal or a 256 color terminal. I'd like to > force emacs to only use 16 color or less palettes. > > I took a look at M-x customize-themes but that doesn't look like what I > want. That appears to be changing the overall theme, including > foreground and background colors. I want to force the default, non > -256color behavior everywhere, not change the overall coloring. > > I tried searching but the results are getting flooded out with posts on > how to enable 256 colors. Is there a way to disable these 256color > specific syntax highlighting pallettes? Or otherwise limit the color > mapping to the various $TERM values? Either (a) install and use a terminal emulator that supports only 16 colors, or (b) edit the terminfo database for your terminal emulator to tell Emacs that only 16 colors are supported. That said, I'm curious: why do you dislike more than 16 colors? If you don't like the default colors themselves, isn't it better to customize the faces to use the colors you like? That way, you will not need to lie to Emacs about the number of supported colors, and the customizations will work on any terminal.