emacs/doc/emacs
Stephen Berman 77ca60b48d Navigate *Completions* buffer based on 'completions-format'
This patch makes 'next-completion' and 'previous-completion' work
in the vertical completions format analogously to how they work in
the default horizontal format (bug#78959).  It also fixes wrapping
in the vertical format and confines navigation (including
wrapping) in column-wise movement in the vertical format to the
current line, analogously to how navigation (including wrapping)
in line-wise movement in the horizontal format is confined to the
current column.

* doc/emacs/mini.texi (Completion): Fix several typos and improve
wording is several places.
(Completion Commands): Document navigation of the *Completions*
buffer in the vertical format.  Document the difference between
format-sensitive movement and strictly column-wise or line-wise
movement.  Document 'minibuffer-complete-and-exit' and update the
documentation of 'minibuffer-completion-auto-choose' and
'minibuffer-choose-completion'.  Document the use of a numeric
prefix argument with the navigation commands.
(Completion Options): Rearrange and improve documentation of
'completions-sort', 'completions-format' and
'completion-auto-wrap', updating the latter to document the new
behavior.

* lisp/minibuffer.el (minibuffer-visible-completions-map): Rebind
"<left>" to 'minibuffer-previous-column-completion' and "<right>"
to 'minibuffer-next-column-completion'.
(minibuffer-next-completion): Add check for whether completions
format is vertical to decide whether to call
'next-line-completion' and replace calling 'next-completion' by
'next-column-completion'.
(minibuffer-next-column-completion)
(minibuffer-previous-column-completion): New commands.

* lisp/simple.el (completion-list-mode-map): Rebind "<left>" to
'previous-column-completion' and "<right>" to 'next-column-completion'.
(last-completion): Add handling for vertical completions format.
(completion--move-to-candidate-end): Always move point to the
position immediately after the last character of the completion
candidate.  This unifies the behavior, simplifies the
implementation and facilitates implementing the improved
navigation of the *Completions* buffer.
(previous-column-completion, next-column-completion): New
commands, replacing the previous definitions of
'previous-completion' and 'next-completion' to reflect their
column-wise operation.  Confine navigation (including wrapping) in
vertical format to the current line.
(previous-line-completion, next-line-completion): Implement
line-wise navigation (including wrapping) through all completions
in vertical format, not just those in the current column as in
horiztonal format.  Update doc strings.
(next-completion, previous-completion): Redefine to call
'{next,previous}-line-completion' when completions format is
vertical and '{next,previous}-column-completion' otherwise.

* test/lisp/minibuffer-tests.el
(completions-format-navigation--tests): New function providing a
template to define tests of the navigation and wrapping behavior
with specified numbers of completion candidates.
(completions-format-navigation-test-{2,3,4,5,10,15,16}): New tests.
2025-09-22 16:04:42 +02:00
..
abbrevs.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
ack.texi ; Fix a merge snafu. 2025-03-29 08:54:30 -04:00
android.texi Remove ctags program 2025-03-22 11:57:29 -07:00
anti.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
arevert-xtra.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
back.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
basic.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
book-spine.texi ; Yet another last-minute change in Emacs manual for printing 2021-07-24 13:15:50 +03:00
buffers.texi Fix capitalization ELisp -> Elisp 2025-03-12 09:38:33 +08:00
building.texi Add "forward history" support for some debuggers 2025-04-26 16:21:21 +03:00
cal-xtra.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calendar.texi Add simpler binds for calendar month/year navigation 2025-06-12 09:33:05 +03:00
ChangeLog.1 ; Delete troff markers from ChangeLog files 2025-02-20 02:46:43 +01:00
cmdargs.texi PATH defaults now act more like GNU and POSIX 2025-07-24 22:13:47 -07:00
commands.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
custom.texi Merge from origin/emacs-30 2025-07-12 05:25:03 -04:00
dired-xtra.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
dired.texi Improve and clarify documentation of 'dired-click-to-select-mode' 2025-08-23 16:36:11 +03:00
display.texi New command 'mode-line-invisible-mode' 2025-07-12 10:50:22 +03:00
doclicense.texi Merge from Gnulib 2017-10-01 18:31:10 -07:00
docstyle.texi Minor copyedits in the Emacs user manual 2021-06-06 12:58:40 +03:00
emacs-xtra.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
emacs.texi New commands for outgoing diffs including uncommitted changes 2025-08-30 11:44:53 +01:00
emacsver.texi.in Stop keeping doc/emacs/emacsver.texi in the repository 2014-11-09 16:17:17 -08:00
emerge-xtra.texi Avoid double spaces around abbrevations in Texinfo 2025-01-24 23:10:23 +01:00
entering.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
files.texi Bind vc-rename-file to C-x v R 2025-07-25 18:45:59 +01:00
fixit.texi ; Fix previous change 2025-01-24 15:58:47 +01:00
fortran-xtra.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
frames.texi Merge from origin/emacs-30 2025-07-12 05:25:03 -04:00
glossary.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
gnu.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
gpl.texi Merge from Gnulib 2017-10-01 18:31:10 -07:00
haiku.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
help.texi New Eldoc function `eldoc-show-help-at-pt' 2025-03-29 13:50:26 +03:00
indent.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
input.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
killing.texi ; Fix typos 2025-02-22 14:48:29 +01:00
kmacro.texi Improve documentation of 'insert-kbd-macro' 2025-04-27 09:52:25 +03:00
m-x.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
macos.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
maintaining.texi New project-find-matching-buffer-function for diff-mode 2025-09-01 15:27:57 +01:00
Makefile.in Update copyright year to 2025 2025-01-02 18:39:42 +01:00
mark.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
mini.texi Navigate *Completions* buffer based on 'completions-format' 2025-09-22 16:04:42 +02:00
misc.texi PATH defaults now act more like GNU and POSIX 2025-07-24 22:13:47 -07:00
modes.texi ; Improve documentation of 'treesit-enabled-modes' 2025-09-01 17:35:38 +03:00
msdos-xtra.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
msdos.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
mule.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00
package.texi ; * doc/emacs/package.texi (Package Statuses): Clarify "new". 2025-06-22 11:13:55 +03:00
picture-xtra.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
programs.texi ; * doc/emacs/programs.texi (Hideshow): Fix last change. 2025-09-20 13:38:00 +03:00
regs.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
rmail.texi Add post-save actions for Rmail attachments 2025-07-26 18:22:09 +03:00
screen.texi * doc/emacs/screen.texi (Mode Line): Fix reference. 2025-08-27 12:08:12 +02:00
search.texi ; Improve documentation of isearch ion minibuffer 2025-09-08 14:55:43 +03:00
sending.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
text.texi Add variable `fill-region-as-paragraph-function' 2025-06-29 07:33:24 +03:00
trouble.texi ; Add texinfo reference to GNU Coding Standards. 2025-03-13 07:12:26 +01:00
vc-xtra.texi ; * doc/emacs/vc-xtra.texi (Advanced VC Usage): Fix menu. 2025-07-25 18:59:46 +01:00
vc1-xtra.texi ; Improve recently-added documentation 2025-09-16 19:24:18 +03:00
windows.texi Add 'other-window-backward' for a default binding (bug#78803) 2025-08-02 17:25:14 +03:00
xresources.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00