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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 15 Dec 2022 11:06:57 +0200

> From: Len Trigg <[email-masked]>
> Date: Thu, 15 Dec 2022 21:38:57 +1300
> Cc: [email-masked]
> 
>  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)?

I don't really know.  But one solution is to disable modifyOtherKeys
in your init file.  Or maybe you could dig deeper into what xterm.el
does with modifyOtherKeys support and tell why M-SPC fails.