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

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

bug#36525: M-x default when cursor on top of a M-x command in INFO


From: Drew Adams
Subject: bug#36525: M-x default when cursor on top of a M-x command in INFO
Date: Sun, 7 Jul 2019 17:27:44 -0700 (PDT)

> > A better way to handle this is to have a key
> > (Icicles uses `M-.') that pulls text from the
> > buffer into the minibuffer, appending it to
> > whatever input text might already be there.
> >
> > Summary:
> >
> > Repeated `M-.' can have two different behaviors.
> > You can choose (by an option) which one to use.
> > [...]
> >
> > Whether vanilla Emacs would allow flexibility
> > to this degree is not so important as at
> > least having Emacs have a key that grabs
> > _something_ from the buffer text and appends
> > it to minibuffer input.  Choice #2 above is
> > pretty simple to realize - give users an
> > option to specify which kind of text thing
> > they want to insert.
> 
> Do you think `M-.' is a suitable key for vanilla Emacs?
> Its global keybinding is `xref-find-definitions',
> but is this command useful in the minibuffer?
> Or could be taken for grabbing text from the buffer
> to the minibuffer?

Default key choice preferences are somewhat
of a mine field for discussion...

Dunno whether `xref-find-definitions' is
usable from the active minibuffer.  I'm
not familiar with it.  Perhaps so, with
non-nil `enable-recursive-minibuffers'.

I will point out that `M-.' is a repeatable
key.  And a repeatable key is good for a
command that is repeatable, such as doing
something to/with consecutive bits of text
(e.g. "things") from a buffer.

Is `xref-find-definitions' a repeatable
command (i.e. by holding the key pressed)?
On the other hand, in the old days `M-.'
was bound to `find-tag', which was not
repeatable (unless perhaps with non-nil
`enable-recursive-minibuffers').

In Icicle (minor) mode, where `M-.' is
bound to a command that inserts buffer
text into the minibuffer, I've never
noticed any conflict between that and
the global binding of `M-.'.  That may be
some evidence that it would be OK to use
it for something similar in the vanilla
Emacs minibuffer.

---

All of that said, I'd suggest that,
_other things being equal_, keys like
`M-.' should not be bound globally to
commands that can't benefit from holding
them down to repeat the action.

`M-.' was bound to `find-tag' eons ago,
before there were so many default key
bindings, so many modes, so many libraries,
and so many commands that are repeatable.

It's not as if repeatable key bindings
are as scarce as berkelium, but there's
also no great reason to "waste" them on
non-repeatable commands.  Habit does
matter to some extent, though, which I
suppose is why `M-.' is still bound to a
find command.





reply via email to

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