emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: Proposal: add a binding for `imenu' under M-g


From: Drew Adams
Subject: RE: [External] : Re: Proposal: add a binding for `imenu' under M-g
Date: Thu, 21 Apr 2022 15:36:34 +0000

> Do you think that additionally to 'M-g i' imenu should be bound also to
> 'M-g M-i'?
> Then it could be typed without releasing the Meta modifier.

I'm speaking generally, here, not only, or necessarily,
about this particular binding.
___

It's generally (always?) true that M-<something>
followed by M-<something-else> is more convenient
than M-<something> followed by <something-else>.

But that's not, in itself, a reason to add the
former binding, in addition to the latter.

It generally makes more sense to do that when
the <something-else> provides a _repeatable_
action.  Why?  Because that's a case where you
particularly might want to just hold down the
last key, to repeat the action.

A command such as `imenu' is not such a case.
There's no use case for holding down the key
that invokes it.
___

Beyond this lack of a particular reason for
adding such a binding, is the general argument
not to multiply bindings unnecessarily (Occam).

Although today there might appear to be lots
of "free" keys to bind on `M-g', that's not a
good reason to foreclose their possible binding
to something else in the future.
___

And a M-<something> binding often has another
relation in Emacs to a <something> binding (or
to a C-<something>, or a C-M-<something>,
binding): it often provides an analogous or
similar operation.  Motion commands, for
instance.
___

Additional bindings for the same command can
always be added later, per popular acclaim.
I don't see a good reason to do that at the
outset.
___

For these reasons, I'd say leave `M-g M-i'
unbound, at least for now.  Binding `M-g i'
to `imenu' doesn't call for also binding
`M-g M-i' to it.

> But the problem is that 'M-i' is equivalent to
> 'TAB', so this means taking the keybinding
> 'M-g TAB' that might have more sense for another
> command associated with TABs like navigating to
> the next link, then 'M-g S-TAB' to the previous
> link, etc.

Yes, for example.

There are a plethora of existing and potential
"goto" commands - candidates for consideration
for `M-g'.  Let's not be in a hurry to give any
command multiple `M-g' bindings.


reply via email to

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