Subject: Re: bug#60077: 29.0.60; Is xterm modifyOtherKeys support broken?

From: Len Trigg <[email-masked]>
Date: Thu, 15 Dec 2022 21:38:57 +1300

On Thu, 15 Dec 2022 at 19:41, Eli Zaretskii <[email-masked]> wrote:

> I'm not sure I understand: it sounds like you are saying that M-SPC
> doesn't work in xterm, either?  (Which version of xterm. btw?)

Yes, I am saying M-SPC does not work in xterm (which reports its version as
XTerm(353)).

So the
> question now becomes: how did it work before that change in wezterm
> for you, and why did modifyOtherKeys feature broke it?
>

I don't think it worked before the change in wezterm (I haven't used xterm
for years) -- I really just tested with xterm to see whether the issue was
specific to wezterm, and was surprised to find xterm already broken.

Which terminal file in lisp/term/ was/is Emacs loading at startup when
> you use wezterm?

For both xterm and wezterm I have the $TERM variable set to "xterm-direct",
so they both use lisp/term/xterm.el (which is consistent with my hack of
xterm--init-modify-other-keys affecting the behaviour of both). My
hypothesis is that under both xterm and wezterm emacs is sending the
terminal initialization code for turning on modifyOtherKeys, but the older
version of wezterm just ignored it (and M-SPC worked). But now they have
added modifyOtherKeys support, it is behaving like xterm (i.e. broken) by
sending M-SPC with an encoding that emacs doesn't recognize. Do you think
it's just a matter of the dolist on line 466 of xterm.el needing additional
entries (I don't see one there for M-SPC)?

Cheers,
Len.