From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#69786: [PATCH] docs: mention the keymap to add keybindings to for term-mode Date: Thu, 14 Mar 2024 10:20:22 +0300 Message-ID: References: <844975c2f1ed019fb6be836643e118ed850e0605.camel@yandex.ru> <86ttl9bdp2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1085"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.50.4 Cc: 69786@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 14 08:21:52 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rkfPU-00009z-7h for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Mar 2024 08:21:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkfP6-00018I-63; Thu, 14 Mar 2024 03:21:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkfP4-000184-Vx for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 03:21:27 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rkfP4-0001Hj-Nh for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 03:21:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rkfPd-0005iT-Rd for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 03:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Mar 2024 07:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 69786-submit@debbugs.gnu.org id=B69786.171040089721923 (code B ref 69786); Thu, 14 Mar 2024 07:22:01 +0000 Original-Received: (at 69786) by debbugs.gnu.org; 14 Mar 2024 07:21:37 +0000 Original-Received: from localhost ([127.0.0.1]:48084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkfPE-0005hW-QE for submit@debbugs.gnu.org; Thu, 14 Mar 2024 03:21:37 -0400 Original-Received: from forward502b.mail.yandex.net ([178.154.239.146]:33238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkfP9-0005hH-TN for 69786@debbugs.gnu.org; Thu, 14 Mar 2024 03:21:34 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-78.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-78.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:5d83:0:640:27eb:0]) by forward502b.mail.yandex.net (Yandex) with ESMTPS id 1C1AA5F465; Thu, 14 Mar 2024 10:20:24 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-78.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id MKirvp8r7eA0-pZRJdKTp; Thu, 14 Mar 2024 10:20:23 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1710400823; bh=EPHebAejLDCXtDAmTvRN+N1vF74fZzI4Guz23v4xdTQ=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=pyngyCtsUBoZaWBFcTXGMtP2MNykcyK0w57GrFsZS1Aygvem2d3CGfNC/QHPPJEDj pOHlu05vqjDNW9fbDdW87+cNuSSpevW1Hvb4t0lGDZFNa+yN+Y74MWoVXbS8KO6R11 qClJg0MuFafA/ldxEakD9QAJwVqWmdfvPj6jRmmE= Authentication-Results: mail-nwsmtp-smtp-production-main-78.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru In-Reply-To: <86ttl9bdp2.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281583 Archived-At: On Thu, 2024-03-14 at 07:11 +0200, Eli Zaretskii wrote: > > From: Konstantin Kharlamov > > Date: Thu, 14 Mar 2024 02:39:23 +0300 > >=20 > > 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` =E2=80= =94 > > 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. > >=20 > > 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. >=20 > Thanks, but the Emacs user manual is not the right place for this > kind > of information. Why not? > Instead, this should be mentioned in the doc string > of term-mode. As a long-time Emacs user, I'd have never looked at major mode documentation. That's because you'd expect it describe what the mode is for, however typically if you start using a major mode, you already know that. As a matter of fact, the mode name alone is often enough to describe its purpose. I see that major mode docs may sometimes also describe keybindings, but since it has to be explicitly added by the mode developer (which implies the docs may or may not be there), neither I'd look at it for that purpose. Instead I'd typically execute `C-h m` which is guaranteed to pop up a buffer with all keybindings. > Btw, your understanding of this is at least inaccurate if not > incorrect: whether custom key bindings should be added to > term-mode-map or term-raw-map depends on whether you want them for > the > line mode or for the raw mode.=C2=A0 The documentation should say so. Oh, thank you, I should fix that then.