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:23:32 +0300 Message-ID: <14fe1eb7d8a8a1ed56c747ffed5d68a3a4046759.camel@yandex.ru> 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="18455"; 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:24:58 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 1rkfST-0004fu-RY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Mar 2024 08:24:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkfS2-0001Z2-AD; Thu, 14 Mar 2024 03:24:30 -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 1rkfRz-0001YF-Aa for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 03:24: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 1rkfRy-0001iW-S2 for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 03:24:26 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rkfSY-0005nN-CQ for bug-gnu-emacs@gnu.org; Thu, 14 Mar 2024 03:25:02 -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:25:02 +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.171040105422205 (code B ref 69786); Thu, 14 Mar 2024 07:25:02 +0000 Original-Received: (at 69786) by debbugs.gnu.org; 14 Mar 2024 07:24:14 +0000 Original-Received: from localhost ([127.0.0.1]:48088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkfRl-0005m5-Hi for submit@debbugs.gnu.org; Thu, 14 Mar 2024 03:24:13 -0400 Original-Received: from forward500c.mail.yandex.net ([178.154.239.208]:60206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkfRj-0005lw-F2 for 69786@debbugs.gnu.org; Thu, 14 Mar 2024 03:24:12 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:22a1:0:640:9de0:0]) by forward500c.mail.yandex.net (Yandex) with ESMTPS id 5306860B0A; Thu, 14 Mar 2024 10:23:34 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id XNiPlD6Z3iE0-29tDcPT8; Thu, 14 Mar 2024 10:23:33 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1710401013; bh=ig+uDVsxSCxTc89OFvUi4PoA9grL/M855sLAjfnq5rQ=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=Aoz0G9cIV61VIZJXEbbiYEn9HAwgHBAfEWwf6WCL8Mu7jobJQXODlDCHrsQacuHvy xe4AH/uRATB7qN2JR0Fah1I7ovyeKZ0iQpeZG2quYy35sDuG7CjEFkUKYdjkT9Q2ZF yu8R6liIENLPiHNtf7TBM5Pch6RdOr7nST63La2c= Authentication-Results: mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru In-Reply-To: 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:281584 Archived-At: On Thu, 2024-03-14 at 10:20 +0300, Konstantin Kharlamov wrote: > 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. >=20 > Why not? >=20 > > Instead, this should be mentioned in the doc string > > of term-mode. >=20 > As a long-time Emacs user, I'd have never looked at major mode > documentation.=C2=A0 That's because you'd expect it describe what the mod= e > is for, however typically if you start using a major mode, you > already > know that.=C2=A0 As a matter of fact, the mode name alone is often enough > to > describe its purpose. >=20 > 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.=C2=A0 Instead I'd typically execute `C-h m` which is > guaranteed to pop up a buffer with all keybindings. =E2=80=A6with that said, if we have to put that to the mode documentation a= nd not to the manual, I think a more appropriate place might be docs for `term-mode-map` and `term-raw-map` accordingly. This is a place where I would have looked after finding out that my custom keyindings do not work.