all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>, Lin Sun <sunlin7.mail@gmail.com>
Cc: 70691@debbugs.gnu.org
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	[thread overview]
Message-ID: <24c6739d-d276-aea1-aa9b-99852dcf744f@gmail.com> (raw)
In-Reply-To: <865xvxpw3c.fsf@gnu.org>

On 5/1/2024 5:15 AM, Eli Zaretskii wrote:
>> From: Lin Sun <sunlin7.mail@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?





  parent reply	other threads:[~2024-05-01 18:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-01  6:40 bug#70691: 30.0.50; [PATCH] Eshell's TERM env varible use eshell-term-name as default Lin Sun
2024-05-01 12:15 ` Eli Zaretskii
2024-05-01 15:51   ` Lin Sun
2024-05-01 18:19   ` Jim Porter [this message]
2024-05-01 19:37     ` Lin Sun
2024-05-01 19:49       ` Lin Sun
2024-05-02  6:07       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24c6739d-d276-aea1-aa9b-99852dcf744f@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=70691@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=sunlin7.mail@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.