Subject: bug#16528: [External] : bug#16528: 24.3; too many keybindings in minibuffer-local-completion-map

From: Drew Adams <[email-masked]>
Date: Fri, 20 Aug 2021 21:11:36 +0000

> I don't know about good arguments, but FWIW on AZERTY, where '-' is a
> pain to reach for, I enjoy 'SPC' doing word completion and inserting
> hyphens for Elisp symbols on M-x, C-h v, C-h f, etc.

FWIW, Icicles has (always has had) an option for which
keys to use for word-completion.  The default value is
`M-SPC'.

`icicle-word-completion-keys':

  ...because the spacebar is such a convenient key to
  hit, other people prefer to use `SPC' for word
  completion, and to insert a space some other way.
  The usual way to do that is via `C-q SPC', but command
  `icicle-insert-a-space' is provided for convenience.
  You can bind this to `M-SPC', for instance, in
  `minibuffer-local-completion-map',
  `minibuffer-local-completion-map', and
  `minibuffer-local-must-match-map'.

And if Emacs thought that word-completion for AZERTY
keyboards (or anything else) would likely result in
a significant number of users wanting to customize the
key(s) to use for it, Emacs too could offer an option.

Or else users such as yourself would just add a
binding for SPC in the relevant minibuffer keymaps. 

> I'll admit it's a pretty niche use-case, although off the top of my
> head, I can't find much uses for self-inserting SPC/?/C-j in the
> minibuffer either

Hearing that, I'm guessing your use of minibuffer
completion doesn't encounter a lot of different kinds
of completion candidates.  That's fine; users are
different, as are the things they complete.

> (Emacs 28's yank-from-kill-ring comes to mind, but
> '?' and 'SPC' are already self-inserting there[1]).

Individual commands can bind whatever keys in whatever
minibuffer keymaps make most sense for those commands.

But I think the general case, that is, no a priori
knowledge of what kinds of completion candidates might
be used, should treat those 3 keys as self-inserting.

Instead of the commands you mentioned making SPC
self-inserting, commands for which SPC should have
some action _other than_ self-insertion should bind
SPC to that particular action.  That's applying
particular use-case knowledge to completion for that
use case.

The normal and generally expected action for SPC is
self-insertion.  That makes sense for the minibuffer
also, in general.  Any text at all can be a completion
candidate.  And a minibuffer is pretty much a general
editing buffer.