GNU bug report logs -
#70691
30.0.50; [PATCH] Eshell's TERM env varible use eshell-term-name as default
Previous Next
Reported by: Lin Sun <sunlin7.mail <at> gmail.com>
Date: Wed, 1 May 2024 06:42:02 UTC
Severity: normal
Tags: notabug, patch, wontfix
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Wed, May 1, 2024 at 6:19 PM Jim Porter <jporterbugs <at> gmail.com> wrote:
>
> On 5/1/2024 5:15 AM, Eli Zaretskii wrote:
> >> From: Lin Sun <sunlin7.mail <at> gmail.com>
> >> 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
This bug report was last modified 1 year and 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.