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

Previous Next

Package: emacs;

Reported by: Aaron Cohen <aaron <at> brightbytes.net>

Date: Wed, 28 Jul 2021 19:39:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49761 in the body.
You can then email your comments to 49761 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Wed, 28 Jul 2021 19:39:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aaron Cohen <aaron <at> brightbytes.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 28 Jul 2021 19:39:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Aaron Cohen <aaron <at> brightbytes.net>
To: bug-gnu-emacs <at> gnu.org
Subject: file-cache-minibuffer-complete has become unusable for duplicate file
 names in MacOSX 27.x emacs
Date: Wed, 28 Jul 2021 12:22:12 -0700
[Message part 1 (text/plain, inline)]
In previous versions of emacs for the last decade, `
file-cache-minibuffer-complete` (C-Tab) worked well for me.

But in the MacOSX 27.x emacs series, it ceased to be able to handle
duplicate file names with extensions.  (It could never handle duplicate
file names with no extension, but that never bothered me much, as the only
files without extensions I need to visit are the Procfile and Gemfile in
the root of the project trees, which are easy to find manually.)

For example, I usually have around 5 projects in my file cache, and
currently across those 5 projects there are 8 files named `dashboard.rb`.

Previously, as soon as I'd gotten C-Tab to complete the file name to
`dashboard.rb`, continuing to hit C-Tab would cycle through the 8 files in
their various directories.

But starting in the 27.x series, C-Tab gets "stuck" on the first file
named `dashboard.rb`, and refuses to cycle through the remaining files with
that name.  (And again, this is always the behavior it has exhibited for
files without extensions: it gets stuck on the first instance, refusing to
cycle through additional instances.)

Also, perhaps relevantly, the behavior of the point while hitting C-Tab
repeatedly on an incomplete file name changed in version 27: it now jumps
to the beginning of the file name while the name is partially complete.
 (In previous versions, it would remain at the end of incomplete file
names, or wherever I'd moved it to in the minibuffer.)

Thanks for any assistance you can provide!!
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Thu, 29 Jul 2021 17:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Aaron Cohen <aaron <at> brightbytes.net>
Cc: 49761 <at> debbugs.gnu.org
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable
 for duplicate file names in MacOSX 27.x emacs
Date: Thu, 29 Jul 2021 20:55:29 +0300
> Thanks for any assistance you can provide!!

It would be nice to have a minimal reproducible test case.
What I've tried is to create a minimal set of files with:

  mkdir -p /tmp/a/ ; touch /tmp/a/Procfile /tmp/a/dashboard.rb
  mkdir -p /tmp/b/ ; touch /tmp/b/Procfile /tmp/b/dashboard.rb
  mkdir -p /tmp/c/ ; touch /tmp/c/Procfile /tmp/c/dashboard.rb

Then after adding them to the cache with:

  (file-cache-add-directory-list '("/tmp/a" "/tmp/b" "/tmp/c"))

typing 'C-x C-f d C-TAB' cycles them correctly:

  Find file: /tmp/c/dashboard.rb [1 of 3]
  Find file: /tmp/b/dashboard.rb [2 of 3]
  Find file: /tmp/a/dashboard.rb [3 of 3]

The same for 'C-x C-f P C-TAB' that cycles the files
without file extensions correctly as well:

  Find file: /tmp/c/Procfile [1 of 3]
  Find file: /tmp/b/Procfile [2 of 3]
  Find file: /tmp/a/Procfile [3 of 3]

This works in the development version 28.0.50 without
any significant changes in filecache.el for a long time.

Do you see the same problems when running emacs with -Q
without customization?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Thu, 29 Jul 2021 18:15:01 GMT) Full text and rfc822 format available.

Message #11 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 49761 <at> debbugs.gnu.org, aaron <at> brightbytes.net
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable for
 duplicate file names in MacOSX 27.x emacs
Date: Thu, 29 Jul 2021 21:14:10 +0300
> From: Juri Linkov <juri <at> linkov.net>
> Date: Thu, 29 Jul 2021 20:55:29 +0300
> Cc: 49761 <at> debbugs.gnu.org
> 
> Do you see the same problems when running emacs with -Q
> without customization?

What about the second part of the report, with cursor positioning
after typing an incomplete file name followed by C-TAB: do you see
that problem in your testing?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Thu, 29 Jul 2021 18:33:01 GMT) Full text and rfc822 format available.

Message #14 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49761 <at> debbugs.gnu.org, aaron <at> brightbytes.net
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable
 for duplicate file names in MacOSX 27.x emacs
Date: Thu, 29 Jul 2021 21:31:52 +0300
>> Do you see the same problems when running emacs with -Q
>> without customization?
>
> What about the second part of the report, with cursor positioning
> after typing an incomplete file name followed by C-TAB: do you see
> that problem in your testing?

No problem with cursor positioning.  filecache.el uses minibuffer-message,
and it works fine in testing with 'emacs -Q'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Thu, 29 Jul 2021 19:30:02 GMT) Full text and rfc822 format available.

Message #17 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 49761 <at> debbugs.gnu.org, aaron <at> brightbytes.net
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable
 for duplicate file names in MacOSX 27.x emacs
Date: Thu, 29 Jul 2021 22:29:06 +0300
> From: Juri Linkov <juri <at> linkov.net>
> Cc: aaron <at> brightbytes.net,  49761 <at> debbugs.gnu.org
> Date: Thu, 29 Jul 2021 21:31:52 +0300
> 
> >> Do you see the same problems when running emacs with -Q
> >> without customization?
> >
> > What about the second part of the report, with cursor positioning
> > after typing an incomplete file name followed by C-TAB: do you see
> > that problem in your testing?
> 
> No problem with cursor positioning.

Strange, that's not what I see.  If I type "C-x C-f", type a few
characters that should match several file names, then press C-TAB, the
cursor is placed on the first character I typed, making more typing
cumbersome, because I need first type C-e or somesuch to get to the
end of what I typed.  Isn't that what you see?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Thu, 29 Jul 2021 19:42:01 GMT) Full text and rfc822 format available.

Message #20 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49761 <at> debbugs.gnu.org, aaron <at> brightbytes.net
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable
 for duplicate file names in MacOSX 27.x emacs
Date: Thu, 29 Jul 2021 22:40:44 +0300
>> > What about the second part of the report, with cursor positioning
>> > after typing an incomplete file name followed by C-TAB: do you see
>> > that problem in your testing?
>> 
>> No problem with cursor positioning.
>
> Strange, that's not what I see.  If I type "C-x C-f", type a few
> characters that should match several file names, then press C-TAB, the
> cursor is placed on the first character I typed, making more typing
> cumbersome, because I need first type C-e or somesuch to get to the
> end of what I typed.  Isn't that what you see?

In my testing the cursor is placed at the end of the minibuffer.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Thu, 29 Jul 2021 22:52:02 GMT) Full text and rfc822 format available.

Message #23 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Aaron Cohen <aaron <at> brightbytes.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 49761 <at> debbugs.gnu.org
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable
 for duplicate file names in MacOSX 27.x emacs
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Thu, 29 Jul 2021 22:53:01 GMT) Full text and rfc822 format available.

Message #26 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Aaron Cohen <aaron <at> brightbytes.net>
To: Juri Linkov <juri <at> linkov.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 49761 <at> debbugs.gnu.org
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable for
 duplicate file names in MacOSX 27.x emacs
Date: Thu, 29 Jul 2021 14:37:41 -0700
[Message part 1 (text/plain, inline)]
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:

```
;; NOTE - WHEN THE FILECACHE GOES BAD, NUKE ALL FILES MATCHING THE PATTERN
.#* IN THESE DIRECTORY TREES
(require 'filecache)
;; Add all files under dir to file
(eval-after-load
    "filecache"
  '(progn

     (file-cache-add-directory "~/git/clarity_early_warning")
     (file-cache-add-directory-using-find "~/git/clarity_early_warning/app")
     (file-cache-add-directory-using-find "~/git/clarity_early_warning/bin")
     (file-cache-add-directory-using-find
"~/git/clarity_early_warning/config")
     (file-cache-add-directory-using-find "~/git/clarity_early_warning/db")
     (file-cache-add-directory-using-find "~/git/clarity_early_warning/lib")
     (file-cache-add-directory-using-find
"~/git/clarity_early_warning/spec")

;; ... etc ...
```


On Thu, Jul 29, 2021 at 12:41 PM Juri Linkov <juri <at> linkov.net> wrote:

> >> > What about the second part of the report, with cursor positioning
> >> > after typing an incomplete file name followed by C-TAB: do you see
> >> > that problem in your testing?
> >>
> >> No problem with cursor positioning.
> >
> > Strange, that's not what I see.  If I type "C-x C-f", type a few
> > characters that should match several file names, then press C-TAB, the
> > cursor is placed on the first character I typed, making more typing
> > cumbersome, because I need first type C-e or somesuch to get to the
> > end of what I typed.  Isn't that what you see?
>
> In my testing the cursor is placed at the end of the minibuffer.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Fri, 30 Jul 2021 05:51:01 GMT) Full text and rfc822 format available.

Message #29 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 49761 <at> debbugs.gnu.org, aaron <at> brightbytes.net
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable
 for duplicate file names in MacOSX 27.x emacs
Date: Fri, 30 Jul 2021 08:50:06 +0300
> From: Juri Linkov <juri <at> linkov.net>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  49761 <at> debbugs.gnu.org
> Date: Fri, 30 Jul 2021 01:49:18 +0300
> 
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Fri, 30 Jul 2021 07:03:01 GMT) Full text and rfc822 format available.

Message #32 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Aaron Cohen <aaron <at> brightbytes.net>
Cc: 49761 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable for
 duplicate file names in MacOSX 27.x emacs
Date: Fri, 30 Jul 2021 10:01:54 +0300
> From: Aaron Cohen <aaron <at> brightbytes.net>
> Date: Thu, 29 Jul 2021 23:41:12 -0700
> Cc: Juri Linkov <juri <at> linkov.net>, 49761 <at> debbugs.gnu.org
> 
> In any case, the larger issue is that a prefix overlap is now causing C-Tab to get stuck.  The point goes
> where it should to assist the User in resolving the overlap.  It's not where the point goes but rather that
> Emacs gets stuck on the common suffix that is the new issue.

I suggest to play with your value of completion-styles: perhaps by
reordering it or by removing the more-aggressive styles from there you
will be able to get your desired behavior.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Fri, 30 Jul 2021 14:23:02 GMT) Full text and rfc822 format available.

Message #35 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Aaron Cohen <aaron <at> brightbytes.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49761 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable for
 duplicate file names in MacOSX 27.x emacs
Date: Thu, 29 Jul 2021 23:41:12 -0700
[Message part 1 (text/plain, inline)]
Comments:

2. The cycling is broken if you have one file without an extension with a
given name and another file with the same name and an extension.  For
example, all 5 of my projects are currently Ruby on Rails repos.  Every RoR
project has a `Gemfile` and a `Gemfile.lock`.  When I try to find a
particular Gemfile, C-Tab gets stuck on the first one.  This has always
been the case with C-Tab, so it doesn't bother me, though if there is a
workaround I'd love to know it.

3. Yes, I see the message "[File Cache: complete but not unique]" whenever
it gets stuck.  This has always been the case for 2, above, and in Emacs
27.x (and presumably 28.x) it is the case when a duplicated file has a
duplicate and also another file with a similar ending.  In my case, there
are 9 files named `dashboard.rb` across several projects, and even more
files across several projects that follow the pattern `*_dashboard.rb`.

4. The cursor-jumping-to-the-beginning-of-the-filename behavior is new in
Emacs 27.x.  It doesn't happen in case 2, above ... though that's because
the overlap termination location in that case is at the end of the
completed file name (the dot in `Gemfile.lock`). Whereas in the new
behavior, the overlap termination location is at the beginning (e.g. in my
project, the underscore in `db_dashboard.rb` or `homepage_dashboard.rb`).

In any case, the larger issue is that a prefix overlap is now causing C-Tab
to get stuck.  The point goes where it should to assist the User in
resolving the overlap.  It's not where the point goes but rather that Emacs
gets stuck on the common suffix that is the new issue.







On Thu, Jul 29, 2021 at 10:50 PM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Juri Linkov <juri <at> linkov.net>
> > Cc: Eli Zaretskii <eliz <at> gnu.org>,  49761 <at> debbugs.gnu.org
> > Date: Fri, 30 Jul 2021 01:49:18 +0300
> >
> > 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.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Fri, 30 Jul 2021 18:04:01 GMT) Full text and rfc822 format available.

Message #38 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49761 <at> debbugs.gnu.org, aaron <at> brightbytes.net
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable
 for duplicate file names in MacOSX 27.x emacs
Date: Fri, 30 Jul 2021 20:58:55 +0300
>> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Fri, 30 Jul 2021 18:34:02 GMT) Full text and rfc822 format available.

Message #41 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Aaron Cohen <aaron <at> brightbytes.net>
To: Juri Linkov <juri <at> linkov.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 49761 <at> debbugs.gnu.org
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable for
 duplicate file names in MacOSX 27.x emacs
Date: Fri, 30 Jul 2021 11:20:51 -0700
[Message part 1 (text/plain, inline)]
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 <juri <at> linkov.net> 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.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Fri, 30 Jul 2021 18:49:02 GMT) Full text and rfc822 format available.

Message #44 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Aaron Cohen <aaron <at> brightbytes.net>
Cc: 49761 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable for
 duplicate file names in MacOSX 27.x emacs
Date: Fri, 30 Jul 2021 21:47:59 +0300
> From: Aaron Cohen <aaron <at> brightbytes.net>
> Date: Fri, 30 Jul 2021 11:20:51 -0700
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 49761 <at> debbugs.gnu.org
> 
> Well, it's now the default behavior.  It wasn't previously.  :-)

I wasn't trying to find the reason for the change in behavior, I was
trying to help you get the behavior you want back.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Fri, 30 Jul 2021 19:14:02 GMT) Full text and rfc822 format available.

Message #47 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Aaron Cohen <aaron <at> brightbytes.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49761 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable for
 duplicate file names in MacOSX 27.x emacs
Date: Fri, 30 Jul 2021 12:12:34 -0700
[Message part 1 (text/plain, inline)]
Sorry, that remark was a response (with a smile to show benign intent) to
Juri's comment:

> ... this is the default behavior for completions that don't share a
common prefix.

... and not a response to any of your comments.  No offense meant - I
really appreciate your having spent any time responding to me!!

On Fri, Jul 30, 2021 at 11:48 AM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Aaron Cohen <aaron <at> brightbytes.net>
> > Date: Fri, 30 Jul 2021 11:20:51 -0700
> > Cc: Eli Zaretskii <eliz <at> gnu.org>, 49761 <at> debbugs.gnu.org
> >
> > Well, it's now the default behavior.  It wasn't previously.  :-)
>
> I wasn't trying to find the reason for the change in behavior, I was
> trying to help you get the behavior you want back.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Sun, 01 Aug 2021 08:42:01 GMT) Full text and rfc822 format available.

Message #50 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Aaron Cohen <aaron <at> brightbytes.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 49761 <at> debbugs.gnu.org
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable
 for duplicate file names in MacOSX 27.x emacs
Date: Sun, 01 Aug 2021 11:40:50 +0300
tags 49761 fixed
close 49761 28.0.50
thanks

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

And new is not always better ;-)

So now the new behavior (that became old now) was fixed
in the master branch for Emacs 28, and all test cases
that you presented work completely as expected.
Thanks for helping to understand where the problem was.

BTW, after the fix, the following additional information
is not necessary, but I discovered that in old versions
you can use the prefix argument to force C-TAB cycling.

An excerpt from etc/NEWS.20:

  ** file-cache-minibuffer-complete now accepts a prefix argument.
  With a prefix argument, it does not try to do completion of
  the file name within its directory; it only checks for other
  directories that contain the same file name.
  Thus, given the file name Makefile, and assuming that a file
  Makefile.in exists in the same directory, ordinary
  file-cache-minibuffer-complete will try to complete Makefile to
  Makefile.in and will therefore never look for other directories that
  have Makefile.  A prefix argument tells it not to look for longer
  names such as Makefile.in, so that instead it will look for other
  directories--just as if the name were already complete in its present
  directory.

and a comment from bindings.el:

  ;; The prefix argument works around a bug in the minibuffer completion.
  ;; The completion function doesn't distinguish between the states:
  ;;
  ;;   "Multiple completions of name" (eg, Makefile, Makefile.in)
  ;;   "Name available in multiple directories" (/tmp/Makefile, ~me/Makefile)
  ;;
  ;; The default is to do the former; a prefix arg forces the latter.




Added tag(s) fixed. Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Sun, 01 Aug 2021 08:42:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.0.50, send any further explanations to 49761 <at> debbugs.gnu.org and Aaron Cohen <aaron <at> brightbytes.net> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Sun, 01 Aug 2021 08:42:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Mon, 02 Aug 2021 20:04:02 GMT) Full text and rfc822 format available.

Message #57 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Aaron Cohen <aaron <at> brightbytes.net>
To: Juri Linkov <juri <at> linkov.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 49761 <at> debbugs.gnu.org
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable for
 duplicate file names in MacOSX 27.x emacs
Date: Mon, 2 Aug 2021 13:02:46 -0700
[Message part 1 (text/plain, inline)]
Very much appreciated!!

And thank you for investigating and isolating the issue: I had
misidentified the actual problem and didn't provide a duplication recipe,
making your job much harder.

I promise to do better next time, and provide a test case.  :-)

Thanks again!!

On Sun, Aug 1, 2021 at 1:41 AM Juri Linkov <juri <at> linkov.net> wrote:

> tags 49761 fixed
> close 49761 28.0.50
> thanks
>
> > Well, it's now the default behavior.  It wasn't previously.  :-)
>
> And new is not always better ;-)
>
> So now the new behavior (that became old now) was fixed
> in the master branch for Emacs 28, and all test cases
> that you presented work completely as expected.
> Thanks for helping to understand where the problem was.
>
> BTW, after the fix, the following additional information
> is not necessary, but I discovered that in old versions
> you can use the prefix argument to force C-TAB cycling.
>
> An excerpt from etc/NEWS.20:
>
>   ** file-cache-minibuffer-complete now accepts a prefix argument.
>   With a prefix argument, it does not try to do completion of
>   the file name within its directory; it only checks for other
>   directories that contain the same file name.
>   Thus, given the file name Makefile, and assuming that a file
>   Makefile.in exists in the same directory, ordinary
>   file-cache-minibuffer-complete will try to complete Makefile to
>   Makefile.in and will therefore never look for other directories that
>   have Makefile.  A prefix argument tells it not to look for longer
>   names such as Makefile.in, so that instead it will look for other
>   directories--just as if the name were already complete in its present
>   directory.
>
> and a comment from bindings.el:
>
>   ;; The prefix argument works around a bug in the minibuffer completion.
>   ;; The completion function doesn't distinguish between the states:
>   ;;
>   ;;   "Multiple completions of name" (eg, Makefile, Makefile.in)
>   ;;   "Name available in multiple directories" (/tmp/Makefile,
> ~me/Makefile)
>   ;;
>   ;; The default is to do the former; a prefix arg forces the latter.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49761; Package emacs. (Mon, 02 Aug 2021 20:13:02 GMT) Full text and rfc822 format available.

Message #60 received at 49761 <at> debbugs.gnu.org (full text, mbox):

From: Aaron Cohen <aaron <at> brightbytes.net>
To: Juri Linkov <juri <at> linkov.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 49761 <at> debbugs.gnu.org
Subject: Re: bug#49761: file-cache-minibuffer-complete has become unusable for
 duplicate file names in MacOSX 27.x emacs
Date: Mon, 2 Aug 2021 13:12:07 -0700
[Message part 1 (text/plain, inline)]
Oh, and I've confirmed that the workaround of `C-u C-Tab` works great for
cycling through files when `C-Tab` would otherwise get stuck.  So, I'm good
until the next official release.

On Mon, Aug 2, 2021 at 1:02 PM Aaron Cohen <aaron <at> brightbytes.net> wrote:

> Very much appreciated!!
>
> And thank you for investigating and isolating the issue: I had
> misidentified the actual problem and didn't provide a duplication recipe,
> making your job much harder.
>
> I promise to do better next time, and provide a test case.  :-)
>
> Thanks again!!
>
> On Sun, Aug 1, 2021 at 1:41 AM Juri Linkov <juri <at> linkov.net> wrote:
>
>> tags 49761 fixed
>> close 49761 28.0.50
>> thanks
>>
>> > Well, it's now the default behavior.  It wasn't previously.  :-)
>>
>> And new is not always better ;-)
>>
>> So now the new behavior (that became old now) was fixed
>> in the master branch for Emacs 28, and all test cases
>> that you presented work completely as expected.
>> Thanks for helping to understand where the problem was.
>>
>> BTW, after the fix, the following additional information
>> is not necessary, but I discovered that in old versions
>> you can use the prefix argument to force C-TAB cycling.
>>
>> An excerpt from etc/NEWS.20:
>>
>>   ** file-cache-minibuffer-complete now accepts a prefix argument.
>>   With a prefix argument, it does not try to do completion of
>>   the file name within its directory; it only checks for other
>>   directories that contain the same file name.
>>   Thus, given the file name Makefile, and assuming that a file
>>   Makefile.in exists in the same directory, ordinary
>>   file-cache-minibuffer-complete will try to complete Makefile to
>>   Makefile.in and will therefore never look for other directories that
>>   have Makefile.  A prefix argument tells it not to look for longer
>>   names such as Makefile.in, so that instead it will look for other
>>   directories--just as if the name were already complete in its present
>>   directory.
>>
>> and a comment from bindings.el:
>>
>>   ;; The prefix argument works around a bug in the minibuffer completion.
>>   ;; The completion function doesn't distinguish between the states:
>>   ;;
>>   ;;   "Multiple completions of name" (eg, Makefile, Makefile.in)
>>   ;;   "Name available in multiple directories" (/tmp/Makefile,
>> ~me/Makefile)
>>   ;;
>>   ;; The default is to do the former; a prefix arg forces the latter.
>>
>
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 31 Aug 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.