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: Jean Louis
Subject: Re: not good proposal: "C-z <letter>" reserved for users
Date: Sat, 13 Feb 2021 11:50:05 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* Robert Thorpe <rt@robertthorpeconsulting.com> [2021-02-13 10:38]:
> 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).
> 
> 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).

Instead of solving hypothetical problems, let us list third party
packages and any complaints practically and specifically and suggest
possible solutions to those specific problem.

I have my personal packages and I never had problem of key
reservation. The prefix key is on `s-p' and recently I have placed it
also on `C-c p' and also on F5. I would not bind it globally and
automatically for users, rather ecommend that users decide where to
bind the prefix key.

Helm package does it this way:

(defcustom helm-command-prefix-key "C-x c"

so users could change that prefix to anything they wish and want while
Helm has already provided a default. Helm has no problem how I see it.

Which packages have the problem with Emacs and need reservation?

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

That will always be the case for beginners within or without Emacs
subject. They are beginners. We were all beginners and may find this
or that difficult when beginning new things.

> 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.

One group of users will find that simpler one group will not. Variety
of users find this or that simpler, we can see from our conversations
here. What may be simple for you may be complex for me and so on.

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

That would be good idea. It would be good if packages would be advised
how to bind keys and to provide alternatives if some of the keys are
already bound by users. One can use the below function.

key-binding is a built-in function in ‘C source code’.

(key-binding KEY &optional ACCEPT-DEFAULT NO-REMAP POSITION)

Then the function (key-binding (kbd "s-p p")) yields at my side with
`cf-tabulated-people'. It could be used to detect which key is already
bound and then the configuration wizard could ask or suggest to user
how otherwise to bind the keys.

It could say that prefix key for the package could be placed on
{C-c j} or {C-c k} and could ask user to accept it, it would be then
entered into the configuration file.

Jean





reply via email to

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