From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
To: 69786@debbugs.gnu.org
Subject: bug#69786: [PATCH] docs: mention the keymap to add keybindings to for term-mode
Date: Thu, 14 Mar 2024 02:39:23 +0300 [thread overview]
Message-ID: <844975c2f1ed019fb6be836643e118ed850e0605.camel@yandex.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 670 bytes --]
I've spent quite some time today trying to somehow override keybindings
for term-mode. While time was spent mostly due to some local mistakes,
one problem I also noticed is that term-mode has `term-mode-map` —
pretty much like any other major mode foo typically have `foo-mode-
map`. However, adding keybindings into it has no effect whatsoever.
Instead term-mode has an additional `term-raw-map`, which is the actual
location where one has to put custom bindings.
It is completely non-intuitive (and I also for some reason didn't get
the answer on emacs.stackexchange for the same problem when I was
trying to google it), so let's document that nuisance.
[-- Attachment #2: 1.patch --]
[-- Type: text/x-patch, Size: 1060 bytes --]
From f0cf72a973caf5063a4a1cab4fcc0bd73d0d7976 Mon Sep 17 00:00:00 2001
From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Date: Thu, 14 Mar 2024 02:33:06 +0300
Subject: [PATCH] docs: mention the keymap to add keybindings to for term-mode
A user typically expects a keymap for mode `foo` to be called
`foo-mode-map`. term-mode has `term-mode-map` too, but for
user-defined bindings to have effect they have to be put to
`term-raw-map` instead. So let's mention that.
* doc/emacs/misc.texi (Term mode): mention the keymap to add
keybindings to for term-mode
---
doc/emacs/misc.texi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 7eb28f56826..471cd2eed1a 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -1651,6 +1651,10 @@ Term Mode
interface is similar to the @code{more} program.
@end table
+@cindex keymap in Term mode
+ To add custom keybindings to the Term mode use @code{term-raw-map}
+keymap.
+
@node Remote Host
@subsection Remote Host Shell
@cindex remote host
--
2.44.0
next reply other threads:[~2024-03-13 23:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 23:39 Konstantin Kharlamov [this message]
2024-03-14 5:11 ` bug#69786: [PATCH] docs: mention the keymap to add keybindings to for term-mode Eli Zaretskii
2024-03-14 7:20 ` Konstantin Kharlamov
2024-03-14 7:23 ` Konstantin Kharlamov
2024-03-14 7:34 ` Eli Zaretskii
2024-03-14 7:33 ` Eli Zaretskii
2024-03-14 7:53 ` Konstantin Kharlamov
2024-03-14 11:09 ` Eli Zaretskii
2024-03-16 10:36 ` Konstantin Kharlamov
2024-03-16 11:31 ` Eli Zaretskii
2024-03-16 13:20 ` Konstantin Kharlamov
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=844975c2f1ed019fb6be836643e118ed850e0605.camel@yandex.ru \
--to=hi-angel@yandex.ru \
--cc=69786@debbugs.gnu.org \
/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).