GNU bug report logs - #51426
29.0.50; [PATCH] Should 'comint-term-environment' be connection-aware?

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Tue, 26 Oct 2021 22:55:02 UTC

Severity: wishlist

Tags: patch

Found in version 29.0.50

Fixed in version 29.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: 51426 <at> debbugs.gnu.org
Subject: bug#51426: 29.0.50; [PATCH] Should 'comint-term-environment' be connection-aware?
Date: Tue, 26 Oct 2021 15:54:03 -0700
[Message part 1 (text/plain, inline)]
`comint-term-environment' consults `system-uses-terminfo' to determine 
how to set environment variables to indicate comint's terminal 
capabilities. However, `system-uses-terminfo' describes whether the host 
system running Emacs uses terminfo, not whether the remote system uses 
it. Similarly for `comint-terminfo-terminal'.

If `comint-term-environment' were aware of connection-local variables, 
it would be possible to create a connection-local profile to configure 
this for remote hosts, e.g.:

  (connection-local-set-profile-variables
   'remote-terminfo
   '((system-uses-terminfo . t)
     (comint-terminfo-terminal . "dumb-emacs-ansi")))

  (connection-local-set-profiles
   '(:application tramp :machine "foo")
   'remote-terminfo))

(Note: "dumb-emacs-ansi" comes from the ncurses-term package[1] in 
Debian, and should be a good value to represent comint's capabilities.)

This lets the user pass a terminfo-friendly value for TERM to the remote 
system, even if the local system doesn't use terminfo. Then programs on 
the remote system can consult terminfo to their hearts' content.

I've attached a patch that does this, assuming the reasoning above makes 
sense. Perhaps it also warrants an entry in NEWS? I wasn't sure...

[1] https://packages.debian.org/buster/all/ncurses-term/filelist
[0001-lisp-comint.el-comint-term-environment-Make-it-conne.patch (text/plain, attachment)]

This bug report was last modified 3 years and 200 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.