From: Drew Adams <drew.adams@oracle.com>
To: "Philip K." <philipk@posteo.net>, Ergus <spacibba@aol.com>
Cc: emacs-devel <emacs-devel@gnu.org>,
Thibaut Verron <thibaut.verron@gmail.com>,
"T.V Raman" <raman@google.com>
Subject: RE: Emacs default key bindings [was: Opening Up More Keymaps Re: Standardizing more key bindings?]
Date: Fri, 2 Oct 2020 15:50:58 -0700 (PDT) [thread overview]
Message-ID: <d7922758-b6d1-4bca-86de-1637958d42cf@default> (raw)
In-Reply-To: <87sgawp8ex.fsf@posteo.net>
> > C-x is reserved for emacs internal use.
> > C-c for users.
As I said, both of those statements are wrong.
> According to "(elisp) Key Binding Conventions":
>
> > Sequences consisting of ‘C-c’ followed by a control
> > character or a digit are reserved for major modes.
>
> (not the exceptions listed in the info node)
And? What's your point? `C-c' is _not_ reserved for
users, in general. `C-c <letter>' is reserved for users.
> while C-x is a lot safer for users. It would be very
> unusual for a major mode to rebind "C-x ...",
Why do you think so? There's nothing in the conventions
about `C-x'.
Don't confuse statements about a binding being reserved
for some use with a claim that a binding not listed as
reserved is somehow off limits. Such a claim would be
improper.
Everything that's not stated in the conventions is OK.
(Even things that are stated in the conventions are only
that: conventional.) The conventions exist to help us
not get our feet stepped on, by ourselves or others.
> which is why I bind most of my local functions to that map.
You're free to do so. Nothing wrong with that, whether
you mean as user or as a library writer.
> On the other hand, something like C-c C-... will often be
> shadowed by a major mode [or] minor mode, hence I don't
> bother trying.
`C-c C-<something' is reserved for a major mode. If
you're writing a major mode, you can use it, following
the convention. If you're writing a library and the
library binds `C-c C-<something>' in a map other than
for a major mode then that violates the convention.
As a user you can bind any key to anything, including
binding `C-c C-<something'.
The conventions don't cover user bindings, except to
say that `C-c <letter>' are _reserved_ for users.
A user binding `C-c C-<something' (e.g. globally) might
find a major mode overriding that binding. That's all.
next prev parent reply other threads:[~2020-10-02 22:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-02 18:14 Emacs default key bindings [was: Opening Up More Keymaps Re: Standardizing more key bindings?] Drew Adams
2020-10-02 19:21 ` Philip K.
2020-10-02 20:41 ` Drew Adams
2020-10-02 19:24 ` Ergus
2020-10-02 20:45 ` Drew Adams
2020-10-02 22:31 ` Philip K.
2020-10-02 22:50 ` Drew Adams [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-10-02 18:46 arthur miller
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=d7922758-b6d1-4bca-86de-1637958d42cf@default \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=philipk@posteo.net \
--cc=raman@google.com \
--cc=spacibba@aol.com \
--cc=thibaut.verron@gmail.com \
/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).