all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#64121: 28.2; C-SPC not working in term char mode
@ 2023-06-17  0:06 Al Petrofsky
  2023-06-17  6:12 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Al Petrofsky @ 2023-06-17  0:06 UTC (permalink / raw)
  To: 64121

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

   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.

[-- Attachment #2: Type: text/html, Size: 1640 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-18  6:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-17  0:06 bug#64121: 28.2; C-SPC not working in term char mode Al Petrofsky
2023-06-17  6:12 ` Eli Zaretskii
2023-06-17  6:26   ` Al Petrofsky
2023-06-17  6:40     ` Eli Zaretskii
2023-06-17  7:08       ` Gregory Heytings
2023-06-18  6:34         ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.