GNU bug report logs -
#68801
30.0.50; minibuffer-visible-completions=t makes RET in completion-in-region a no-op with nothing selected
Previous Next
Reported by: Spencer Baugh <sbaugh <at> janestreet.com>
Date: Mon, 29 Jan 2024 18:51:02 UTC
Severity: normal
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> The annoying thing is that this breaks the enhancement to
> completion-show-help I recently made. When a completion is not
> selected, RET isn't bound, so the help shows "Click or type M-x
> minibuffer-choose-completion-or-exit on a completion to select it."
>
> I'm not sure the right way to fix that. Selectively binding RET based
> on whether a completion is selected feels sketchy anyway, it may confuse
> users because e.g. C-h c RET won't work.
>
> Maybe instead we should always bind RET, but if no completion is
> selected, we run the command that RET was bound to before
> completion-in-region-mode started?
Then 'minibuffer-choose-completion-or-exit' could be more smart
to run whatever command was bound to RET initially, instead of
using the hard-coded 'minibuffer-complete-and-exit'.
But this might require juggling with keymaps.
> Alternatively... as a completely separate point, I'd like
> completion-in-region to select the first completion candidate by
> default. I think that's useful in some cases and, for
> completion-in-region, doesn't have any negatives: we couldn't do it in
> the minibuffer because it would interfere with accepting the default,
> but there are no defaults in completion-in-region.
>
> If we make c-i-r select the first completion candidate by default, that
> would both:
>
> - Make the completion-show-help help render correctly with the "only
> override RET when there's a selected completion" patch.
>
> - Partially mitigate the RET issue all on its own
Calling 'first-completion' makes sense even for the minibuffer,
at least optionally.
This bug report was last modified 1 year and 69 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.