On 10/29/2021 1:21 AM, Michael Albinus wrote: > Jim Porter writes: > >> Sure, that seems like a good idea. I expanded the example in the >> section on "Per-Connection Local Variables" to show setting >> `system-uses-terminfo'. Hopefully this will point people in the right >> direction, and make it more apparent that >> `connection-local-set-profiles' lets you set multiple profiles for a >> connection, not just one. (That's documented in the Emacs Lisp manual, >> but I think it would be helpful to show it in the Emacs manual as >> well.) > > Thanks. However, you don't show the second setting, > comint-terminfo-terminal. Is it obvious to the reader that this shall be > changed as well? I didn't change it initially because I wasn't sure it's a value that people are likely to change connection-locally. `system-uses-terminfo' is definitely important to be able to set connection-locally: while many systems support terminfo, some don't (e.g. FreeBSD and MS Windows). `comint-terminfo-terminal' seemed less consequential. However, after doing a bit of archaeology, I think it might make sense to `comint-terminfo-terminal' connection-locally in the example, so I've attached an updated patch. `comint-terminfo-terminal' was only added in Emacs 26.1, and I believe the "dumb-emacs-ansi" terminfo file was added to Debian's ncurses after that, so it makes sense that someone would want to set this differently when connecting to a newer host vs an older host. (I think TERM=dumb-emacs-ansi is the best setting to use if your terminfo database has it, since it reflects comint's capabilities more accurately than TERM=dumb.) I didn't explain the above reasoning in the manual though, since it won't be so relevant as time goes on. Once people see that you can do this, it should hopefully be reasonably obvious why. If we need more explanation beyond this, it probably makes sense to expand the docstring for `comint-terminfo-terminal'.