emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: Concern about new binding.


From: Drew Adams
Subject: RE: [External] : Re: Concern about new binding.
Date: Fri, 5 Feb 2021 18:22:19 +0000

> Drew is making a good point here (I realize he sounds a bit
> annoyed, but I can sympathize).  His proposal make sense -- or at
> any rate, there's a good proposal easily derived from what he's
> saying.
> 
> If Emacs were to declare that from this point forward it will
> leave all currently-unbound `C-x LETTER' unbound, and *recommend*
> that packages not bind them by default either, then we'd have a
> few more very convenient keybindings left over for users.
> 
> A package could still suggest `C-x SOME-SPECIFIC-LETTER' as a
> binding for some entry point in the package, and even provide
> convenience mechanisms to cause that binding to happen.
> 
> We can't easil survey users about their bindings, but anecdotally
> it seem like a lot of people -- not only Drew -- have been using
> those last few remaining slots under `C-x' for their own favorite
> things.  (The fact that some packages also use that space is a
> clue that people consider that space to be desirable real estate
> in the mental keymap universe.)
> 
> This isn't about Magit per se -- it's bigger than Magit.  However,
> this proposal would make it somewhat more okay for Magit to
> continue binding `C-x g' by default too.  While Magit wouldn't be
> following the new recommendation either, at least Magit would not
> have to worry about clobbering some existing binding.  Given that
> Magit is so popular and so many people are accustomed to that
> binding already, this is still a decent outcome in the specific
> case of Magit anyway.  (The fact that Magit also binds `C-x M-g'
> by default is a separate headache, but that doesn't have to be
> resolved for this proposal to be considered.)
> 
> These days, when we decide to make a new global function binding
> in default Emacs, it's hard to imagine how the new binding could
> be *so* important that it must take over one of the existing free
> convenient slots and yet somehow not be important enough for us to
> just replace some other less important binding (thus leaving the
> free space free).
> 
> I'm not saying that scenario couldn't happen, but it's going to be
> rare.  It's certainly not happening in the case of
> `revert-buffer'.  I mean, let's ask ourselves: if having
> `revert-buffer' on a convenient key isn't important enough to
> replace some other little-used binding, how on earth can it be
> important enough to replace one of the free bindings?  After all,
> those free bindings aren't *actually* free -- users are using them
> for lots of things of their own choosing!
> 
> Emacs has always rewarded users who learn to customize their
> keybindings.  Let's make it possible for that reward to be as
> large as possible by guaranteeing them some conveniently free
> slots for their favorite functions and keymap prefixes.
> 
> The `C-c LETTER' space is great, but it's only 26 letters.  I used
> them up long ago, and I'm sure I'm not alone.  Having 4 or 5 more
> letters under `C-x' would be a significant boost.

I agree with all that Karl wrote, and the way he
expressed it.

I would, however, emphasize a distinction between
(1) users and 3rd-party libraries and (2) the code
of vanilla Emacs.

While I think it's positive for 3rd-party libraries
to only _suggest_ such bindings, I don't think that
needs to, or should be, part of the convention.  I
think, instead, that the "rule" should just be that
vanilla Emacs should (modulo important reasons) not
grab any more such key bindings.

The problem, at least so far, and I think in general,
is not really competition for scarce keys among 3rd
party libraries.  The problem is vanilla Emacs
using up the space of possible key bindings for its
default keys.  Some library, even a very popular one
such as Magit, binding some `C-x <something>' key is
not a big problem.  Use of that library is optional.
When vanilla Emacs claims a key for a (default)
binding, that act has a lot more clout.
___

I'd also like to see such a moratorium imposed for
_all_ additional keys, not just `C-x <something>'
prefix keys, and not just other multiple-key prefix
keys.

IOW, I'd like to see vanilla Emacs try harder not
to bind new keys by default.  Keys are just too
scarce now, and users and libraries need keys too.
___

Finally, let me offer another controversial
suggestion, which could offer help in another
direction.

If we were to reexamine Emacs default key bindings
in general, at first ignoring existing habits etc.
(but later taking them into account), we could, I
think, find some existing default keys that could
helpfully be repurposed for something more useful.

In particular, we could take some keys that are
repeating (just hold down the key to repeat the
command) but that are currently wasted on
non-repeating commands, and either reassign those
keys or change their commands to in fact be
repeating.

Even more useful/important would be to take some
such keys, which could usefully be used as prefix
keys, and make them such.  Consolidate multiple
commands, which today waste multiple keys, onto
a given prefix key.

Even just a little such reconsidering/refactoring
work could provide considerable benefit.

Of course, yes, the discussion might involve
considerable churn.  It would maybe help to
start with concrete suggestion of keys that some
think might be recuperated because they're
currently a bit "wasted".

One that comes to my mind, but I offer it only
as an example, not because I care much to get
rid of its binding in particular, is `C-o'.
It's repeatable, but is it very useful?  (And
it doesn't make use of a negative prefix arg.)

There are also keys that fit well into our
mnemonic scheme, but that maybe have outlived
their usefulness - as default bindings.

I'm thinking of `C-t', for example.

Yes, I do use `C-t', and it can be handy (and
yes, you can repeat it, to transport a char
forward incrementally - but not backward).

But hey, it's a wonderful key, and frankly,
isn't it a bit wasted bound to `transpose-chars'?
Imagine it as a prefix key, or used repetitively
for something more useful than transposing chars.

Again, I don't care about `C-o' or `C-t'.  I
mention those just to give an idea.  There are,
I think, keys currently bound by default that
could be put to better use.  A refactoring of
Emacs default key bindings could free up some
key "space".

Yes, at the cost of some finger memory and habit.
And yes, we might have trouble finding consensus.
And yes, discussion could range too wide and
lead nowhere.

But it could also be a good thing to try.



reply via email to

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