A defcustom won't really work, since the correct value of TERM to use might be different for different frames. For example, I might sometimes launch Emacs directly within an xterm, and other times launch it within a screen session. Also, we already have the term-file-aliases variable, which enables a workaround as mentioned up the thread. However, I still think we should aim to work correctly with GNU Screen without any additional configuration required by the user. The current state is broken in that regard. If we'd rather minimize complexity and just add a handful of aliases to term-file-aliases, that's probably fine too. On Tue, Jan 19, 2021 at 1:27 PM Eli Zaretskii wrote: > > From: Lars Ingebrigtsen > > Date: Tue, 19 Jan 2021 16:56:27 +0100 > > Cc: 45824@debbugs.gnu.org > > > > Hm... but wouldn't that possibly cause problems? That is, if your TERM > > is > > > > linux2.6.26 > > > > then if we split on dots, then Emacs will first look for > > "text/linux2.6.26.el", and then "term/linux2.6.el"... and those are > > indeed different terminfos as found on my system: > > > > linux2.6 > > linux2.6.26 > > > > > The command I used to list all the relevant terminfo files was: > > > find /lib/terminfo /usr/share/terminfo -name '*.*' -type f -exec > > > basename '{}' ';' | sort -u > > > > Now, there is no term/linux2.6.el, so perhaps this is irrelevant... And > > perhaps if there was a term/linux2.6.el, perhaps loading that would be > > OK in this case? Anybody got an opinion here? > > Maybe we should just introduce a way for users to specify the terminal > type that would override the value of TERM in the environment? Some > defcustom that could be set in the init file? That way, we don't need > to worry about inventing a new rule, with all the unintended > consequences that could bring us. > -- Alex Hutcheson alexhutcheson@google.com