From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Newsgroups: gmane.emacs.bugs Subject: bug#34606: Emacs colors are off in screen sessions Date: Thu, 21 Feb 2019 09:56:18 -0500 Message-ID: <863a6869-ee18-f49d-68e3-2a1d86c648ed@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="148965"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 To: 34606@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 21 15:57:57 2019 Return-path: Envelope-to: geb-bug-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 1gwpnR-000ccm-Fm for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Feb 2019 15:57:57 +0100 Original-Received: from localhost ([127.0.0.1]:33387 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwpnN-0004Kf-IS for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Feb 2019 09:57:53 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwpmd-0003tT-9N for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2019 09:57:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwpmb-0008Ar-CK for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2019 09:57:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58983) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gwpmY-000891-OX for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2019 09:57:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gwpmY-00035i-JT for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2019 09:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Feb 2019 14:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34606 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.155076099311845 (code B ref -1); Thu, 21 Feb 2019 14:57:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Feb 2019 14:56:33 +0000 Original-Received: from localhost ([127.0.0.1]:59749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gwpm4-00034z-Oi for submit@debbugs.gnu.org; Thu, 21 Feb 2019 09:56:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gwpm3-00034m-0s for submit@debbugs.gnu.org; Thu, 21 Feb 2019 09:56:31 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:41892) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwplv-0007ds-Nd for submit@debbugs.gnu.org; Thu, 21 Feb 2019 09:56:25 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwplu-0003La-Nf for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2019 09:56:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwplt-0007cO-E6 for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2019 09:56:22 -0500 Original-Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]:44576) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gwplt-0007bs-4B for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2019 09:56:21 -0500 Original-Received: by mail-qt1-x831.google.com with SMTP id d2so6094182qti.11 for ; Thu, 21 Feb 2019 06:56:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=NKkJzLft44t4+dvOSxunrrjU5HqaSfgYUV2YHdEMTos=; b=fZkUKnNZiRnuWXVpXyVDfuHoox3VtfbkHnyU15acjGO3mFpDtvW7SwFLo9SVmol2yj dPhgs3DROD+GCEUoOn1m+U7GkkBPOcNF+OhbyDuK27NhjBp7MI/oDCtJDQizN/zcMC4b H0JuNr9MXqPLXPtQmd1eJeFeRCrS8BwjVnWSmYL2+Ag1ESQmsA8huHtrncACZaX+vbP8 CdPv+CWf7HMg04cbRbWMt+b5o3HiNhJ1uR5FHJG9r9KJysR58CFr/5lpbrH7ib90wR3/ cryvmfGtjmouflxvtthyeZOKcMvJrAA3vrA1+I+ogtYnUeNegSDPFw9MrnWLPzVJ8+JH ONUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=NKkJzLft44t4+dvOSxunrrjU5HqaSfgYUV2YHdEMTos=; b=f/+fSNU1W/WT4GhJnflALSLi0pHUxRyuFmw3ki81Rm91WXxb7VjP6FWF8Ni3z1wR8p dIIzPovZ+V6JefCK4U2TZsTNiowbfiJY1kTSKo27gWKNFQPaSbHOA4fUMe7Is1eTFzW5 qwE1Gh0uXNSwJkB50ZtWKO3+OsPnY9GzMlAcFiWIXuW/cSD2MBp+7fwn7P8zuObqZmu9 D6lRvh4daLYjBQS/pr1N/rntTTJuguwtD0Iu4gSHzX+SVT6//IMAV3DD+1nVSxrPNw1u /HsjLaCJ3Xf+TnpTVL0dDT403ZadAFZGzitAt4taUXtvMSlO0GsuB7Aqr35opQ6grR6+ zipA== X-Gm-Message-State: AHQUAuYXFKAlFnN9Q4i5KTLqX5Y8JP3Zmg4y47oGbS/QmeJFuyjWm3x3 VDEeluyUvv9sh+cexoRBudIZoxj0 X-Google-Smtp-Source: AHgI3IZODNYEPZOPGThfNCpZ48YwcWHiLKdBpNuyWNKQSK9QKQqZBhjWYGcLW4zoORuoNndnOocaHQ== X-Received: by 2002:ac8:1754:: with SMTP id u20mr31424769qtk.190.1550760980122; Thu, 21 Feb 2019 06:56:20 -0800 (PST) Original-Received: from ?IPv6:2601:184:4180:66e7:7153:e8ef:c4f6:5d09? ([2601:184:4180:66e7:7153:e8ef:c4f6:5d09]) by smtp.googlemail.com with ESMTPSA id v31sm16957658qtc.62.2019.02.21.06.56.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 06:56:19 -0800 (PST) Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155619 Archived-At: Hi all, I'm having issues with color selection and syntax highlighting in Emacs running in screen. I'm comparing the appearance of `emacs -nw -Q` on GNU / Linux Mint 18.3 (based on Ubuntu 16.04). In a newly created gnome-terminal window (TERM=xterm-256color), I get orange comments in *scratch*. In a newly created screen (TERM=screen), I get pale yellow comments in *scratch*. If I change TERM to either xterm-256color or screen-256color, I get the expected orange text. If I install the ncurses-term package, I get the same colors in gnome-terminal, but in a newly created screen TERM becomes screen.xterm-256color and I get red comments in *scratch*. If I change TERM to xterm-256color nothing changes, and if I change TERM to screen-256color I get the expected orange text (may be relevant: https://emacs.stackexchange.com/questions/20545/emacs-colors-being-set-differently-when-term-is-screen-256color-and-xterm-256) Is this all as expected? Why does changing to xterm-256color yield different results with or without ncurses-term? If I understand correctly, the reason why TERM changes after I install ncurses-term is that this package provides the screen.xterm-256color termcap entry, and then screen acts as documented: When screen tries to figure out a terminal name for itself, it first looks for an entry named "screen.", where is the contents of your $TERM variable. If no such entry exists, screen tries "screen" (…) Is there anything that Emacs could do differently to make things smoother? In particular, could TERM=screen.xterm-256color behave the same as TERM=screen-256color? Thanks, Clément.