From: Eli Zaretskii <eliz@gnu.org>
To: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Cc: 69786@debbugs.gnu.org
Subject: bug#69786: [PATCH] docs: mention the keymap to add keybindings to for term-mode
Date: Thu, 14 Mar 2024 13:09:25 +0200 [thread overview]
Message-ID: <86le6l9ije.fsf@gnu.org> (raw)
In-Reply-To: <4f76012b122ae8334689a6b124ffb671a72f1454.camel@yandex.ru> (message from Konstantin Kharlamov on Thu, 14 Mar 2024 10:53:50 +0300)
> From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
> Cc: 69786@debbugs.gnu.org
> Date: Thu, 14 Mar 2024 10:53:50 +0300
>
> On Thu, 2024-03-14 at 09:33 +0200, Eli Zaretskii wrote:
> >
> > If you ignore doc strings in Emacs, you are making a mistake, IMO. I
> > believe many/most users do consult the doc strings, and I urge you to
> > teach yourself to look there, not just in the manuals. The manuals
> > don't (and cannot) cover all the public variables and functions,
> > whereas the doc strings can and do.
>
> I don't "ignore doc strings in Emacs", that is impossible to do because
> you have to consult at least function docs to customize, fix problems,
> etc 😊 Instead I ignore specifically major mode documentation and I'd
> be surprised if too many other people read it. You see, documentation
> should be intuitive. A user asks a question "how to do X", the answer
> intuitively should be "search docs for X". If you ask "why my
> customizations to term-mode-map do not work?", the answer would be
> "look at term-mode-map docs, perhaps it mentions something".
FWIW, I generally find the documentation strings of modes very useful.
> Similarly, by intuition, if I ask myself "what docs do I expect the
> `term-mode` to have", I'd reply "General information about the mode,
> i.e. that it launches a terminal and maybe a reference to shell and
> eshell alternatives". I'd not expect my problem with the not working
> keybindings to be mentioned in term-mode doc-string (even if it is
> actually there).
The doc string of a mode should, for example, mention the mode hook
and other important variables. And if there are some unusual things
going on with its keymaps, then yes, that should also be mentioned.
> > > I see that major mode docs may sometimes also describe keybindings
> >
> > I wasn't talking about the key bindings, I was talking about the
> > specific quirk of this mode: that it has several distinct keymaps
> > instead of just one. This is somewhat unusual, and thus deserves to
> > be called out in the doc string of the mode, since the maps belong to
> > the mode. (Each of the maps has its own doc string that explains its
> > purpose, but that is not enough because those doc strings are not
> > easily discoverable. Mentioning the maps in the doc string of the
> > mode will close the gap.)
>
> Okay then, I'll add docs to the `term-mode` if you think it might be
> useful for someone and (re: the other email) to `term-mode-map` and
> `term-raw-map` variables 😊
Thanks.
next prev parent reply other threads:[~2024-03-14 11:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 23:39 bug#69786: [PATCH] docs: mention the keymap to add keybindings to for term-mode Konstantin Kharlamov
2024-03-14 5:11 ` 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 [this message]
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=86le6l9ije.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=69786@debbugs.gnu.org \
--cc=Hi-Angel@yandex.ru \
/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).