Subject: Re: bug#64121: 28.2; C-SPC not working in term char mode

From: Al Petrofsky <[email-masked]>
Date: Sat, 17 Jun 2023 02:26:40 -0400

On Sat, Jun 17, 2023 at 2:12 AM Eli Zaretskii <[email-masked]> wrote:

> > From: Al Petrofsky <[email-masked]>
> > Date: Fri, 16 Jun 2023 20:06:57 -0400
> >
> >    emacs-28.2 -Q
> >    M-x term RET RET
> >    C-SPC
> >
> > This should send an ASCII NUL (a zero byte) to the pty, but instead it
> > displays "Mark set" in the echo area.
>
> I cannot reproduce this here: I don't see "Mark set" in the echo area.
>
> Maybe this somehow depends on the terminal emulator?  (I use PuTTY.)
>

I should have mentioned this bug won't show up if emacs is running in a
tty. The bug
stems from the subtle difference between C-SPC and C-@ input events on
graphical
terminals.  On a tty, C-SPC and C-@ become the same thing before they get
to emacs.

> How to verify that the null character is sent to the pty?
>

You can start an emacs -nw inside the term. Then pressing C-SPC should
result in a "Mark set" in the inner emacs's echo area.