Subject: bug#74561: [PATCH] Allow limiting the size of *Completions*

From: Drew Adams <[email-masked]>
Date: Wed, 27 Nov 2024 23:23:12 +0000

FWIW, Icicles has had this since 2010.
`C-h v icicle-max-candidates':

  icicle-max-candidates is a variable defined in `icicles-opt.el'.

  Its value is nil

  Documentation:
  Non-nil means truncate completion candidates to at most this many.
  If you use library `doremi.el' then you can use `C-x #' during
  completion to increment or decrement the option value using the
  vertical arrow keys or the mouse wheel.  A numeric prefix argument for
  `C-x #' sets the increment size.  A plain prefix argument (`C-u')
  resets `icicle-max-candidates' to nil, meaning no truncation.

  If the value is an integer and you use Do Re Mi (library `doremi.el')
  then you can use multi-command `icicle-increment-option' anytime to
  change the option value incrementally.

  You can customize this variable.

If the list of candidates shown in `*Completions*' is truncated
because of `icicle-max-candidates' then:

1. Mode-line minor-mode lighter `Icy' is suffixed by `...'.  If you
   see `...' you know that if you increase `icicle-max-candidates'
   (e.g. by using `C-x #') then more candidates will be available.

2. The mode-line of buffer *Completions*' shows the number of
   candidates - e.g., `567 candidates'.  If the display is truncated
   then it shows the number displayed and the total number - e.g.,
   `149/567 candidates shown'.