help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: not good proposal: "C-z <letter>" reserved for users


From: Dmitry Gutov
Subject: Re: not good proposal: "C-z <letter>" reserved for users
Date: Sun, 14 Feb 2021 01:47:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 13.02.2021 09:37, Robert Thorpe wrote:
Dmitry Gutov <dgutov@yandex.ru> writes:

On 12.02.2021 10:10, Robert Thorpe wrote:
I think that user-friendliness is beneficial.  It would help with
that if packages could bind some keys by default.

The current tradition is that a package provides a major or minor mode
(or several), puts one of them in their init file, and *those* install
some default keymaps.

auto-mode-alist entries, however, can be added through autoloads.

Yes.  But I don't think that solves the problems that Gregory Heyting
and Drew Adams are talking about.

Firstly, it can't do anything about changes in keybindings in future
Emacs versions.  Drew tells us that Emacs has recently mapped "C-x x",
"C-x p" and "C-x /".  I'm using Emacs 27.1, so all of those must have
been mapped for Emacs 28 (or perhaps the version after that).

Is that a problem? When such package finds out about a change like this, they can change the default binding, or they might keep it as it was.

After all, the changes like the ones you have mentioned are additive, both the project keymap and the later addition of buffer-related commands on 'C-x x'. They haven't been there before, and a fair number of users might not miss them if xyz-mode (which they do use) takes up either of the sequences.

The author of a third party package can't easily deal with that.  What if
their minor mode used "C-x x"?  In that case it will remove the keymaps
of a core feature (or the core feature will remove it's keymap).

Minor mode keymaps generally override the global keymap.

As Gregory Heyting has pointed out, what about packages that are not
modes?  Not every package is a minor mode or major mode.  So, how should
other types of package behave?

Depends on how their setup is documented. Minor or major modes are the majority, though.

Lastly, the usability issue is still there.  I think beginners find this
kind of thing difficult.

Having a key sequence overridden by a minor mode?

Considering beginners don't usually read the manual, they might not even know they are missing anything. Which might be a loss, of course, in certain cases. But not a difficulty.

These days there are lots of Emacs "starter
kits" that claim to make Emacs simpler.  A lot of what they do is
configuring third-party packages.

Philip Kaludercic suggested some code for prompting users before mapping
keys.  I think that's a good idea.

Some infrastructure for suggesting custom key bindings might work, but I feel the current third-party tradition has held up pretty well.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]