all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Francis Belliveau <f.belliveau@comcast.net>
To: Gregory Heytings <gregory@heytings.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages
Date: Mon, 8 Feb 2021 17:01:50 -0500	[thread overview]
Message-ID: <257D3F14-BC7F-4C72-ABB0-8178D501BCE5@comcast.net> (raw)
In-Reply-To: <7e12c1c3c1aae58993e2@heytings.org>

I vote against the removal of the current C-o functionality.  I would not want to use two keystrokes where I currently use only one.
I expect that those that use emacs in terminal windows will also find the remapping of C-z a problem, but that is actually never done in the middle of file modification so I wold expect it to be less of a problem.

Overall, I expect that if a package has a number of functions it wishes to map, if should have a method that installs itself into a keymap of user choosing.  Most packages do not need more than I few keys, although I have one that implements 15.  I put that behind M-o.

I do not know elisp enough to know if one can determine if a keystroke is a prefix key or not, but two functions could be implemented:
bind-keymap-to() and add-bindings-to-keymap() with appropriate prefixes and arguments of course.

A package that implements these two would allow a used to decide say:
    bind-keymap-to('C-o') and that would unbind C-o and convert it into a prefix key with empty keymap if it is not already a prefix key, then call the package's add-bindings-to-keymap('C-o').
Otherwise, if a user want to rebind a key that they already know is a prefix key, the can just call the "add-bindings" function.

Please do not tell me the syntax above is wrong since I expect that is it.  I only mean all that as a pseudo-code example.

The majority of the Rationale below is good, but it does not take into account the needs ot those who have decades of muscle-memory for high-speed editing that would get disrupted.  A command like "suspend" would never be used in an editing sequence, since it interrupts the edit session.  M-z and M-o are not keystrokes that I use, but I expect that those who do would have the same complaint with the remapping of "zap-to-char" thart I have with "open-line".  I cannot even guess why I would want a keystroke for "facemenu-keymap", but it sounds to me like it is already a prefix key.

BTW, your 25-years of history statement is inaccurate since I am sure that I have been using C-o since before 1990.


> On Feb 8, 2021, at 05:02, Gregory Heytings <gregory@heytings.org> wrote:
> 
> 
> [S Boucher apparently intended to reply to the following proposal sent on emacs-devel.]
> 
> =Proposal=
> 
> It is proposed to repurpose one key, and to reserve it in the key binding conventions for third-party packages.  The keys that could be reserved for that purpose are:
> 
> Option 1. C-z, with a single exception: "C-z C-z" would be bound to "suspend-frame"
> 
> Option 2. C-z and M-z, with two exceptions: "C-z C-z" would be bound to "suspend-frame", and "M-z M-z" to "zap-to-char"
> 
> Option 3. C-o, with a single exception: "C-o C-o" would be bound to "open-line"
> 
> Option 4. C-o and M-o, with two exceptions: "C-o C-o" would be bound to "open-line", and "M-o M-o" to "facemenu-keymap"
> 
> =Rationale=
> 
> The current key binding conventions (see `(elisp) Key Binding Conventions') reserve keys for users, for major modes and for minor modes, but not for third-party packages [1].
> 
> When such packages need to bind a command to a key, they can (1) either suggest users to bind it to a key reserved for users (for example, org-mode suggests to globally bind "C-c c" to org-capture), or (2) bind it to a key currently unused by Emacs (for example, Magit binds "C-x g" to magit-status in buffers visiting a file in a Git repository).
> 
> Neither of these solutions are optimal: (1) requires an explicit configuration by the user, something which might confuse newcomers, and which other users might not want to do because they already use the keys reserved for users for other purposes, and (2) might conflict with the evolution of Emacs when one or more commands are bound to a yet unused key.
> 
> Reserving one key for third-party packages solves the above problems: third-party packages can automatically bind a few keys in that reserved area, without conflicting with keys reserved for users and without conflicting with future Emacs evolutions.
> 
> =Limit=
> 
> Conflicts are still possible, when two or more packages bind the same keys.  These are, however, conflicts between packages, not between a package and Emacs, or between a package and users' personal configurations.
> 
> Such conflicts are also less likely for typical users, who install a few packages each binding a few keys.
> 
> Finally, such conflicts can be dealt with without confusing users too much: a package could automatically choose fallback key bindings when the preferred ones are already used by another package, and/or issue a warning to the user that they need to bind its commands manually.
> 
> =Note=
> 
> [1] These conventions were written 25 years ago, at a time when there were far fewer third-party packages, and have not changed substantially since them.
> 




  parent reply	other threads:[~2021-02-08 22:01 UTC|newest]

Thread overview: 160+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 10:02 PROPOSAL: Repurpose one key and reserve it for third-party packages Gregory Heytings
2021-02-08 16:41 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-08 22:01 ` Francis Belliveau [this message]
2021-02-09  0:05   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09  8:36     ` "Windows" key [was: Repurpose one key and reserve it for third-party] packages tomas
2021-02-10 22:54     ` PROPOSAL: Repurpose one key and reserve it for third-party packages Francis Belliveau
2021-02-09  6:31 ` Jean Louis
2021-02-09  9:13   ` Gregory Heytings
2021-02-10 11:17     ` Jean Louis
2021-02-09 17:13   ` [External] : " Drew Adams
2021-02-09 17:49     ` Gregory Heytings
2021-02-09 18:12       ` Drew Adams
2021-02-09 19:23         ` Gregory Heytings
2021-02-09 20:52           ` [External] : " Drew Adams
2021-02-09 21:15             ` Gregory Heytings
2021-02-09 21:47               ` [External] : " Drew Adams
2021-02-09 22:06                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09 22:58                   ` Drew Adams
2021-02-09 23:23                     ` Drew Adams
2021-02-09 23:48                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-10 11:07                 ` Gregory Heytings
2021-02-10  9:05               ` Robert Thorpe
2021-02-10 14:42                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-10 14:59                   ` Gregory Heytings
2021-02-10 11:33       ` [External] : " Jean Louis
2021-02-10 11:41         ` Thibaut Verron
2021-02-10 15:29           ` Eli Zaretskii
2021-02-10 11:30     ` Jean Louis
2021-02-09  8:13 ` Marcin Borkowski
2021-02-09  9:13   ` Gregory Heytings
  -- strict thread matches above, loose matches on Subject: below --
2021-02-15 19:01 Gregory Heytings
2021-02-15 19:55 ` Dmitry Gutov
2021-02-07 22:05 Gregory Heytings
2021-02-08  0:13 ` Ergus
2021-02-08  2:57 ` Jorge Javier Araya Navarro
2021-02-08  3:46 ` Richard Stallman
2021-02-08  7:20   ` Stefan Kangas
2021-02-08 14:58     ` Lars Ingebrigtsen
2021-02-08 21:00       ` Gregory Heytings
2021-02-08 21:33       ` Stefan Monnier
2021-02-09  8:13         ` Lars Ingebrigtsen
2021-02-09 16:54           ` Sean Whitton
2021-02-09 17:13             ` Lars Ingebrigtsen
2021-02-09 17:43             ` Eli Zaretskii
2021-02-09 21:21               ` Sean Whitton
2021-02-09 18:37             ` Stefan Monnier
2021-02-08 22:45       ` Stefan Kangas
2021-02-08 15:45     ` Thibaut Verron
2021-02-08 23:01       ` Stefan Kangas
2021-02-09  9:13         ` Simen Heggestøyl
2021-02-09  9:30         ` Juri Linkov
2021-02-09 13:01           ` Gregory Heytings
2021-02-08 21:00     ` Gregory Heytings
2021-02-09  6:03     ` Richard Stallman
2021-02-08 12:36   ` Alan Mackenzie
2021-02-08 21:00   ` Gregory Heytings
2021-02-08  4:52 ` Robin Tarsiger
2021-02-08  8:41   ` Thibaut Verron
2021-02-08 17:07     ` Robin Tarsiger
2021-02-11 12:59     ` Arthur Miller
2021-02-08 21:00   ` Gregory Heytings
2021-02-09  7:42     ` Yuri Khan
2021-02-09  8:23       ` Gregory Heytings
2021-02-08 23:14   ` Stefan Monnier
2021-02-09  8:23     ` Gregory Heytings
2021-02-08 12:42 ` Augusto Stoffel
2021-02-08 21:00   ` Gregory Heytings
2021-02-08 14:54 ` Dmitry Gutov
2021-02-08 21:00   ` Gregory Heytings
2021-02-08 17:59 ` Sean Whitton
2021-02-08 22:40   ` Eric Abrahamsen
2021-02-09 16:45     ` Sean Whitton
2021-02-10  5:28       ` Richard Stallman
2021-02-10  9:29         ` Thibaut Verron
2021-02-11 13:37           ` Richard Stallman
2021-02-11 13:52             ` Thibaut Verron
2021-02-10 10:42         ` Alfred M. Szmidt
2021-02-10 11:35           ` Thibaut Verron
2021-02-10 12:59             ` Alfred M. Szmidt
2021-02-11 13:37           ` Richard Stallman
2021-02-11 14:38             ` Stefan Kangas
2021-02-11 15:13               ` Robert Pluim
2021-02-11 16:08                 ` Stefan Monnier
2021-02-12  8:21                   ` Alfred M. Szmidt
2021-02-12  8:36                     ` Robert Pluim
2021-02-12 15:11                       ` Alfred M. Szmidt
2021-02-13  3:26                       ` Richard Stallman
2021-02-10 11:07         ` Gregory Heytings
2021-02-10 13:00           ` Alfred M. Szmidt
2021-02-10 13:59             ` Gregory Heytings
2021-02-10 14:10               ` Alfred M. Szmidt
2021-02-10 14:51                 ` Gregory Heytings
2021-02-10 15:12                   ` Alfred M. Szmidt
2021-02-10 15:23                     ` Gregory Heytings
2021-02-11 13:37           ` Richard Stallman
2021-02-11 13:55             ` Gregory Heytings
2021-02-12  9:40       ` Jean Louis
2021-02-08 20:32 ` Ulrich Mueller
2021-02-08 21:00   ` Gregory Heytings
2021-02-08 21:37     ` Ulrich Mueller
2021-02-08 22:00       ` Gregory Heytings
2021-02-09 16:57       ` Sean Whitton
2021-02-09 17:19         ` Gregory Heytings
2021-02-09 17:59           ` Ulrich Mueller
2021-02-09 18:24             ` Gregory Heytings
2021-02-09 18:19           ` Thibaut Verron
2021-02-09 19:16             ` Gregory Heytings
2021-02-09 19:28               ` Thibaut Verron
2021-02-09 20:15                 ` Gregory Heytings
2021-02-09 19:47               ` Stefan Monnier
2021-02-09 22:19             ` Gregory Heytings
2021-02-09 21:34           ` Sean Whitton
     [not found] ` <8735y56naf.fsf@posteo.net>
     [not found]   ` <8ed9b43502ae9a36b057@heytings.org>
2021-02-09 23:18     ` Philip K.
2021-02-10 11:07       ` Gregory Heytings
2021-02-10 23:35         ` Philip K.
2021-02-11  8:45           ` Gregory Heytings
2021-02-11 13:53             ` Philip K.
2021-02-11 15:47               ` Philip K.
2021-02-11 15:59               ` Gregory Heytings
2021-02-11 16:20                 ` Philip K.
2021-02-11 17:48                   ` Gregory Heytings
2021-02-11 18:34                     ` Philip K.
2021-02-11 21:15                       ` Gregory Heytings
2021-02-11 22:48                         ` Philip K.
2021-02-12  0:01                           ` Gregory Heytings
2021-02-12 10:27                             ` Philip K.
2021-02-12 11:59                               ` Gregory Heytings
2021-02-12 13:23                                 ` Philip K.
2021-02-12 13:54                                   ` Gregory Heytings
2021-02-12 14:09                                     ` Philip Kaludercic
2021-02-12 16:04                                       ` Gregory Heytings
2021-02-12 17:25                                         ` Philip Kaludercic
2021-02-12 17:54                                           ` Gregory Heytings
2021-02-12 18:16                                             ` Philip Kaludercic
2021-02-12 21:48                                               ` Gregory Heytings
2021-02-13  0:37                                                 ` Philip Kaludercic
2021-02-13  8:33                                                   ` Gregory Heytings
2021-02-13  9:09                                                     ` Philip Kaludercic
2021-02-13 13:06                                                       ` Gregory Heytings
2021-02-13 14:28                                                         ` Philip Kaludercic
2021-02-13 15:01                                                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-13 16:08                                                             ` Philip Kaludercic
2021-02-13 15:02                                                           ` Gregory Heytings
2021-02-13 15:21                                                             ` Jean Louis
2021-02-13 15:28                                                               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-13 20:14                                                             ` Philip Kaludercic
2021-02-13 20:58                                                               ` Jean Louis
2021-02-13 21:18                                                               ` Gregory Heytings
2021-02-13 21:32                                                                 ` Philip Kaludercic
2021-02-13 10:05                                                     ` Jean Louis
2021-02-13  8:24                                                 ` Jean Louis
2021-02-13 12:44                                                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-13 14:26                                                     ` Jean Louis
2021-02-13 15:09                                                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-13 15:24                                                         ` Jean Louis
2021-02-13 15:38                                                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-13 15:45                                                             ` Jean Louis
2021-02-12  4:45                           ` Robert Thorpe
2021-02-12  9:58                             ` Philip K.
2021-02-11 16:59             ` Leo Butler

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=257D3F14-BC7F-4C72-ABB0-8178D501BCE5@comcast.net \
    --to=f.belliveau@comcast.net \
    --cc=gregory@heytings.org \
    --cc=help-gnu-emacs@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.