GNU bug report logs - #64121
28.2; C-SPC not working in term char mode

Previous Next

Package: emacs;

Reported by: Al Petrofsky <al <at> petrofsky.org>

Date: Sat, 17 Jun 2023 00:08:02 UTC

Severity: normal

Found in version 28.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Al Petrofsky <al <at> petrofsky.org>
Subject: bug#64121: closed (Re: bug#64121: 28.2; C-SPC not working in term
 char mode)
Date: Sun, 18 Jun 2023 06:36:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

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

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 64121 <at> debbugs.gnu.org.

-- 
64121: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64121
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: al <at> petrofsky.org, 64121-done <at> debbugs.gnu.org
Subject: Re: bug#64121: 28.2; C-SPC not working in term char mode
Date: Sun, 18 Jun 2023 09:34:59 +0300
> Date: Sat, 17 Jun 2023 07:08:25 +0000
> From: Gregory Heytings <gregory <at> heytings.org>
> cc: Al Petrofsky <al <at> petrofsky.org>, 64121 <at> debbugs.gnu.org
> 
> > Could someone else please reproduce this and review the proposed 
> > changes?  TIA.
> 
> I can reproduce this (with Emacs 29), and the proposed changes LGTM.

Thanks, installed on the master branch, and closing the bug.

[Message part 3 (message/rfc822, inline)]
From: Al Petrofsky <al <at> petrofsky.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.2; C-SPC not working in term char mode
Date: Fri, 16 Jun 2023 20:06:57 -0400
[Message part 4 (text/plain, inline)]
   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.

To fix it, C-SPC needs to get special handling akin to the handling of
C-/.  Here's a patch that also makes C-M-SPC and C-M-/ work.

--- term.el 2022-09-06 17:31:54.000000000 -0400
+++ term-c-spc-fixed.el 2023-06-15 11:21:41.780140053 -0400
@@ -916,6 +916,9 @@
     (define-key map [next] 'term-send-next)
     (define-key map [xterm-paste] #'term--xterm-paste)
     (define-key map [?\C-/] #'term-send-C-_)
+    (define-key map [?\C- ] #'term-send-C-@)
+    (define-key map [?\C-\M-/] #'term-send-C-M-_)
+    (define-key map [?\C-\M- ] #'term-send-C-M-@)
     map)
   "Keyboard map for sending characters directly to the inferior process.")

@@ -1359,6 +1362,9 @@
 (defun term-send-del   () (interactive) (term-send-raw-string "\e[3~"))
 (defun term-send-backspace  () (interactive) (term-send-raw-string "\C-?"))
 (defun term-send-C-_  () (interactive) (term-send-raw-string "\C-_"))
+(defun term-send-C-@  () (interactive) (term-send-raw-string "\C-@"))
+(defun term-send-C-M-_  () (interactive) (term-send-raw-string "\e\C-_"))
+(defun term-send-C-M-@  () (interactive) (term-send-raw-string "\e\C-@"))

 (defun term-char-mode ()
   "Switch to char (\"raw\") sub-mode of term mode.
[Message part 5 (text/html, inline)]

This bug report was last modified 1 year and 343 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.