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

From: Juri Linkov <[email-masked]>
Date: Fri, 30 Jul 2021 01:49:18 +0300

> The `-Q` option wasn't working for me, so I stripped everything out of my
> `init.el` except a few `global-set-key` forms and the initialization of the
> file cache, presented below.
>
> Both the new cursor behavior and the failure to cycle through duplicate
> file names still reproduce.
>
> Here's the start of how I load `filecache`: the same procedure is followed
> for 4 other projects:
> [...]
>      (file-cache-add-directory "~/git/clarity_early_warning")
>      (file-cache-add-directory-using-find "~/git/clarity_early_warning/app")
> ;; ... etc ...

Thanks, now I tried to add two separate emacs/lisp trees
with file-cache-add-directory-using-find that gives such results:

1. 'filec C-TAB' cycles between 2 filecache.el files from both Emacs repos;

2. 'README C-TAB' cycles between 4 README files, two files from each tree,
   that shows that it can cycle between duplicate files without extensions;

3. 'TAGS C-TAB' gets stuck with the message [File Cache: complete but not unique]
   Do you see the same message?

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.

   But the cursor doesn't jump to the beginning when all completions share
   the same prefix, e.g. 'fly C-TAB' that displays flymake.el and flyspell.el.