unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Len Trigg <lenbok@gmail.com>
Cc: 60077@debbugs.gnu.org
Subject: bug#60077: 29.0.60; Is xterm modifyOtherKeys support broken?
Date: Thu, 15 Dec 2022 08:41:48 +0200	[thread overview]
Message-ID: <831qp1mamr.fsf@gnu.org> (raw)
In-Reply-To: <CAOGVwemh-DCbiGfUYAdH4X3S3LMnXkHuhPXrT-25wWuq5mPUXA@mail.gmail.com> (message from Len Trigg on Thu, 15 Dec 2022 10:48:35 +1300)

> From: Len Trigg <lenbok@gmail.com>
> Date: Thu, 15 Dec 2022 10:48:35 +1300
> 
> I often run emacs in the terminal, and usually this is inside wezterm as my
> terminal emulator. Recently wezterm has added support for the
> modifyOtherKeys xterm extension, and since then emacs M-SPC has stopped
> working in the terminal (instead it inserts "~32").
> 
> I can get M-SPC working again in wezterm by preventing emacs from enabling
> modifyOtherKeys, either by setting xterm-extra-capabilities to nil or by
> stubbing out xterm--init-modify-other-keys. Initially we thought that
> this may be a problem with wezterm, but then I tried replicating with
> xterm and exactly the same thing happens. This suggests to me that the
> issue is with emacs rather than xterm or wezterm.
> 
> To replicate:
> 
> 1) run: xterm -e emacs -nw -Q
> 2) in say *scratch* check whether M-SPC works or whether it inserts ~32
> (for me it inserts ~32)
> 
> To replicate disabling modifyOtherKeys:
> 
> 1) put the following into $HOME/test-dir/init.el
> ------
> ;; Dirty hack to not use xterm modifyOtherKeys feature
> (defun my-disable-xterm--init-modify-other-keys (orig-fun &rest args))
> (advice-add #'xterm--init-modify-other-keys :around
>             #'my-disable-xterm--init-modify-other-keys)
> ------
> 2) run: xterm -e emacs -nw --init-dir=$HOME/test-dir
> 3) in say *scratch* check whether M-SPC works or whether it inserts ~32
> (for me it works correctly)
> 
> This seems to demonstrate the out of the box behaviour being broken, but
> I don't understand enough about terminals etc to know whether there is
> some other factor at play.
> 
> Relevant link where this was discussed:
> https://github.com/CyberShadow/term-keys/issues/14

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?)  So the
question now becomes: how did it work before that change in wezterm
for you, and why did modifyOtherKeys feature broke it?

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





  reply	other threads:[~2022-12-15  6:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 21:48 bug#60077: 29.0.60; Is xterm modifyOtherKeys support broken? Len Trigg
2022-12-15  6:41 ` Eli Zaretskii [this message]
2022-12-15  8:38   ` Len Trigg
2022-12-15  8:57     ` Len Trigg
2022-12-15  9:10       ` Eli Zaretskii
2022-12-15 19:48         ` Len Trigg
2022-12-16  6:52           ` Eli Zaretskii
2022-12-16  7:40             ` Eli Zaretskii
2022-12-16 16:04             ` Eli Zaretskii
2022-12-15  9:06     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=831qp1mamr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=60077@debbugs.gnu.org \
    --cc=lenbok@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).