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#70691: 30.0.50; [PATCH] Eshell's TERM env varible use eshell-term-name as default Date: Wed, 1 May 2024 11:19:39 -0700 Message-ID: <24c6739d-d276-aea1-aa9b-99852dcf744f@gmail.com> References: <865xvxpw3c.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34823"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70691@debbugs.gnu.org To: Eli Zaretskii , Lin Sun Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 01 20:21:09 2024 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 1s2EZp-0008qv-9a for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 May 2024 20:21:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2EZP-0002bU-Lc; Wed, 01 May 2024 14:20:43 -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 1s2EZN-0002bH-Em for bug-gnu-emacs@gnu.org; Wed, 01 May 2024 14:20:41 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2EZN-0002LT-6f for bug-gnu-emacs@gnu.org; Wed, 01 May 2024 14:20:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s2EZi-00051r-3I for bug-gnu-emacs@gnu.org; Wed, 01 May 2024 14:21: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: Wed, 01 May 2024 18:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70691 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70691-submit@debbugs.gnu.org id=B70691.171458761219299 (code B ref 70691); Wed, 01 May 2024 18:21:02 +0000 Original-Received: (at 70691) by debbugs.gnu.org; 1 May 2024 18:20:12 +0000 Original-Received: from localhost ([127.0.0.1]:38724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2EYt-00051D-TZ for submit@debbugs.gnu.org; Wed, 01 May 2024 14:20:12 -0400 Original-Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:42247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2EYr-000517-LS for 70691@debbugs.gnu.org; Wed, 01 May 2024 14:20:10 -0400 Original-Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6f0aeee172dso772991b3a.1 for <70691@debbugs.gnu.org>; Wed, 01 May 2024 11:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714587582; x=1715192382; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=CbaQuCHATbQ6Svz3umgj7ru4sVoV/vRHNRgn3CZcvfU=; b=UKm78UOzRC5a8Jbnhu3lHSctBR44Y7ZDPBYu6PtteGgeY5YAAOKdmehw8egAOy37rp 3eb8dGk/D9GedKk4JdP6veISDjalktUPw5kcqzAx0XUMW1A+78pficL4ZGSU1DG1xBzA f6sfkbxrl1pEpPjiYkJ1HK8t5StcTlj4Hultq5CzftVDH5lujQTmN39cSNIwlMYQKP4y ZjZIi2ReY0/MJlXWB5Pj//toVLDqWdiXDQVRrxVoSsJ71k/wxSNXbew0XTdY33Hdf5+j 9JV+maS57rrdDxpIA1xiMJK0aie95f25jTok5YD53fwz0xzV+YF7neZXC05Vb6AZS9jx bSKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714587582; x=1715192382; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CbaQuCHATbQ6Svz3umgj7ru4sVoV/vRHNRgn3CZcvfU=; b=iOBu4GLLi+RbqRc7e0F9PPRFxrNsXHYZCB9HQGv7tt+MQSCXTrh7AAPeUWxMd1LlaD UNZHXDQHn1FFIawB1hl0luK28kX0XckOpbhPMBMkIVfAXdxEeFcJTnoL5f5tQkiMyyKt PBJiNSFtMRGScJbYOlKyt14m//0Ttb23ZBvhCbYUZNmlyzrLfkJgSAc95K7XYWcAkBgK 3291w3YkHUD7yojehAD6xx3I4AYrnqUlP7hMdzaqigoBNm1HNbKgunvZ2M/aAhpqqN5g DBJrh6mhOCwox383FnBweVFZEy9Gz0BWhwHWLC2enaCtheTtVWdBf17T1qvmvGnyCIU1 +jLw== X-Gm-Message-State: AOJu0YyU/DNwYIIociUc7lwgo8dfMcANGOxE7mUKAd/r15Z22R0QzTDK wyEYnQpxE8pIj8HOSJeSQZxGLq4cGu4VKyfCTW+i+dAE6BxnQ29t X-Google-Smtp-Source: AGHT+IFjP08u2yce+AKFTncL1kA7QcHZegzczTvAcMqmuLRdnkQKHQBxoI9bTiyoWCv/NyPH3WWJLw== X-Received: by 2002:a05:6a00:4b0a:b0:6ec:ef1c:4dcd with SMTP id kq10-20020a056a004b0a00b006ecef1c4dcdmr676776pfb.6.1714587581786; Wed, 01 May 2024 11:19:41 -0700 (PDT) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id t8-20020a056a0021c800b006ecffb316ccsm22812865pfj.202.2024.05.01.11.19.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 May 2024 11:19:41 -0700 (PDT) Content-Language: en-US In-Reply-To: <865xvxpw3c.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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284257 Archived-At: On 5/1/2024 5:15 AM, Eli Zaretskii wrote: >> From: Lin Sun >> Date: Wed, 1 May 2024 06:40:25 +0000 >> >> Since emacs-29 the Eshell has been enhanced for the ansi-color a lot. [snip] >> >> So we can safely export eshell's "TERM" with `eshell-term-name` to >> support executables with colors. >> I attached the patch, please help review it. Thanks. > > The fact that we can safely do that does not yet mean we _should_ do > it. In my book, setting TERM is a user preference, more or less. > IOW, this is a change in the default behavior. > > Jim, WDYT? Unfortunately, I don't think this is the right way to do things (or else I'm just not understanding some part of it). The docstring for 'eshell-term-name' says, "Name to use for the TERM variable when running visual commands," and its value defaults to 'term-term-name'. For visual commands (which use term.el), the terminal can do a lot more than just setting colors, such as moving the cursor around. "Normal", non-visual Eshell can't do that, so I think using the same setting for $TERM would be wrong. We could make Eshell set $TERM to "dumb-emacs-ansi", which should have the correct terminal settings. I believe that terminfo has been upstreamed into ncurses. However, I think if you want colors, it's best to change 'comint-terminfo-terminal' instead to "dumb-emacs-ansi" (and then Eshell will use that setting automatically). I *don't* think we should change 'comint-terminfo-terminal' by default though; that would be pretty invasive. Maybe we could use the Customize interface to make selecting "dumb-emacs-ansi" a matter of just checking a box, instead of typing it out by hand?