Subject: bug#49761: file-cache-minibuffer-complete has become unusable for duplicate file names in MacOSX 27.x emacs

From: Aaron Cohen <[email-masked]>
Date: Fri, 30 Jul 2021 11:20:51 -0700

Well, it's now the default behavior.  It wasn't previously.  :-)

That is, I haven't changed my completion settings since the mid-90s (except
the icomplete-mode, which I set up a decade ago) , and they all worked fine
until emacs 27.

They look like this:

;;; Shows globs of possible completions in minibuffer
(setq-default completion-auto-help t)

;;; Case-insensitive file and buff
(setq read-file-name-completion-ignore-case t)
(setq read-buffer-completion-ignore-case t)

;;; Show completions in M-x
(icomplete-mode 1)

Oh, you mean
https://www.gnu.org/software/emacs/manual/html_node/emacs/Completion-Styles.html

`M-: completion-styles` shows the same thing in Emacs 26 and 27: '(basic
partial-completion emacs22)

In Emacs 27, I tried `(setq completion-styles '(basic emacs22))` and `(setq
completion-styles '(emacs22))`, but the completion behavior remained broken.

(Perhaps interestingly, when I tried `(setq completion-styles '(emacs22))`
in Emacs 26, while it still got stuck on the first Gemfile, the minibuffer
started showing me that the collision was caused by Gemfile.lock, which it
never did before.)

In any case, it seems like I'll need to stay with Emacs 26 for a while, as
C-Tab is by far my most-used minibuffer command.

On Fri, Jul 30, 2021 at 11:03 AM Juri Linkov <[email-masked]> wrote:

> >> 4. 'make C-TAB' then the completions buffer is displayed and the cursor
> >>    jumps to the beginning because there are completions that don't begin
> >>    with the same prefix "make" such as flymake.el, pmake.el,
> ob-makefile.el.
> >
> > Is this reasonable behavior?  It seems to try second-guessing what the
> > user will do next, but that guess is not necessarily correct.
>
> I don't know, this is the default behavior for completions
> that don't share a common prefix.
>