Subject: bug#59486: completion-auto-wrap disobeyed by vertical navigation

From: Eli Zaretskii <[email-masked]>
Date: Thu, 24 Nov 2022 10:13:16 +0200

> From: Juri Linkov <[email-masked]>
> Date: Thu, 24 Nov 2022 09:59:52 +0200
> 
> > And here are the corresponding commands for navigating
> > the completions buffer from the minibuffer:
> >
> > +(defun minibuffer-next-line-completion (&optional n)
> > +(defun minibuffer-previous-line-completion (&optional n)
> 
> It seems there commands can't be bound in the minibuffer.
> Ideally, these keybindings could be added to
> minibuffer-local-completion-map:
> 
>   "M-<left>"  #'minibuffer-previous-completion
>   "M-<right>" #'minibuffer-next-completion
>   "M-<up>"    #'minibuffer-previous-line-completion
>   "M-<down>"  #'minibuffer-next-line-completion
> 
> But maybe 'M-<left>' and 'M-<right>' can't be taken from moving by words
> even when 'C-<left>' and 'C-<right>' are duplicate keys that are doing
> the same.  Or to bind 'M-<left>' and 'M-<right>' only in
> completion-in-region-mode-map that is more transient by nature
> and is active only as long as the completions buffer is shown.

Please don't usurp M-<LEFT> and M-<RIGHT>, as they are needed on TTY frames
where C-<LEFT> and C-<RIGHT> are not available.

I don't really understand the difference between minibuffer-previous-* and
minibuffer-previous-line-* commands (the available documentation is minimal
and doesn't explain this difference), so it's hard to suggest an
alternative.  But one immediate alternative is to use <LEFT> and <RIGHT> for
the minibuffer-previous-* family, like previous-completion does.