From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lin Sun 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 19:37:08 +0000 Message-ID: References: <865xvxpw3c.fsf@gnu.org> <24c6739d-d276-aea1-aa9b-99852dcf744f@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13716"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70691@debbugs.gnu.org, Eli Zaretskii To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 01 21:38:02 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 1s2FmD-0003Lb-Vh for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 May 2024 21:38:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2Flv-0004XE-6F; Wed, 01 May 2024 15:37: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 1s2Flt-0004Wy-W8 for bug-gnu-emacs@gnu.org; Wed, 01 May 2024 15:37:42 -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 1s2Flt-0006n0-2r for bug-gnu-emacs@gnu.org; Wed, 01 May 2024 15:37:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s2FmE-0005ht-4e for bug-gnu-emacs@gnu.org; Wed, 01 May 2024 15:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lin Sun Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 May 2024 19:38: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.171459226921931 (code B ref 70691); Wed, 01 May 2024 19:38:02 +0000 Original-Received: (at 70691) by debbugs.gnu.org; 1 May 2024 19:37:49 +0000 Original-Received: from localhost ([127.0.0.1]:39052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2Fm1-0005hf-6b for submit@debbugs.gnu.org; Wed, 01 May 2024 15:37:49 -0400 Original-Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]:46294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2Flz-0005hZ-Ih for 70691@debbugs.gnu.org; Wed, 01 May 2024 15:37:48 -0400 Original-Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5171a529224so9044049e87.0 for <70691@debbugs.gnu.org>; Wed, 01 May 2024 12:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714592240; x=1715197040; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vahrVLDD4cvfQmUME7DKmj3atjR3EXtOOjVYTW9Cm60=; b=hrUcEO0o7s+szf+hD3ALScwVl6Cs1zcrfAwT15MvZrF4lAZZQ4La2Fn4JHTrn1YnfG 5qpfBd9IDP1w8m8p1L2E7QpuymIgR5VSx1r3Ku9HkjBCyjO5eP5maCJ89ZYE8zrRPBe8 ClagYPAbG2jeRxteuNYINKYVw73RE2cCObRGpEzDCDUA1xZFqsSnTOYdYi0dChnsZ2d/ L1aDMDvsQLAVKyyuhePOAUfQYmmfn7O8fZWNKRLNTJ6jOCC6htl6jJ1W/YpzNuKGktAh DPLyWTKcCd6Ph3skhAJ3YpYSPDL6npsOMbc7fbpK6d+1UP2ZMX1WQjwrT1AhGoan8HvU aqow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714592240; x=1715197040; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vahrVLDD4cvfQmUME7DKmj3atjR3EXtOOjVYTW9Cm60=; b=HO2HwihUZsL1bUQL5Fv5N+8OHOAXrwblWC0h9Hp//hKOTy1NW3lj2CEmMlatSIJTO6 MUcZMQmxWWVy+Iq3fT59j0VrXiey5x3yFUSFxroqANJwGYm9BL/virpfuln77VIx6PUR 7II4hM+9OcZUrCSlnow2HnmjENxSwJqM8fBMBB/cHzHcboKJSYHOoCOrelmF/HBlYZga oXR8q4C3SVX13+BChpNuLHg23fiGSYU8Jff7/TdGYCtjsOrd4e1KVR27++nMPGnBagCa uBcva0ArEiO8w5MslR4qxHyEiC6TrlY/gyDJKr+BtZymro4Ls6kOVDkJD+1spgrtS+ql Ez4Q== X-Forwarded-Encrypted: i=1; AJvYcCUUVj7OBHWXNFegNDwxOnfKhRlApyBDl5DMzajpiFlXhxVQfBz7xp40GBFIZp9tsGbep7erev+EZHpHKXqrnaGEpyMa7eM= X-Gm-Message-State: AOJu0YzEetWnpn31zEfGWZKlmGgriPf24b3E7b68O/gNS9gUa158a/1A EzJ3M6sM01EmDK0NvWjkPsh/Qbnt1YjA9GvEo5EMXIxYD/OvPi/sTQ+zC8WkVW/oidjuFKorPeV 2yp8l16Zjt5El6HpVZo7JgDXfJyU= X-Google-Smtp-Source: AGHT+IEpq98+fUoplWr4n2LFwBGik60wdtg/Brvwst8YlQbouf2yCms7PzNDB1w1v6fCTD8qn7XiWsUj1f854oh/Bps= X-Received: by 2002:a05:6512:234b:b0:51d:895c:5a0d with SMTP id p11-20020a056512234b00b0051d895c5a0dmr2529001lfu.5.1714592239859; Wed, 01 May 2024 12:37:19 -0700 (PDT) In-Reply-To: <24c6739d-d276-aea1-aa9b-99852dcf744f@gmail.com> 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:284260 Archived-At: On Wed, May 1, 2024 at 6:19=E2=80=AFPM Jim Porter w= rote: > > 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? Thank you for the explanation, very clear. Please feel free to ignore the patch and close this ticket. Thanks