Subject: Re: bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p

From: Andy Moreton <[email-masked]>
Date: Fri, 26 Jul 2019 12:04:25 +0100

On Wed 24 Jul 2019, Paul Eggert wrote:

> Thanks for the patch. I improved it, wrote a NEWS entry and a test case for
> it, and installed the attached. I think this finishes off the issues in
> Bug#36502 and so am closing the bug report.

This patch causes a regression in UI behaviour, tested with 64bit MSYS2
build on Windows. Bisection shows this patch to be the cause. Before
this patch, from emacs -Q:

   C-x C-f ~/foo RET
   => opens existing directory "c:/home/ajm/foo/" in dired

   C-x C-f ~/bar RET
   => default path offered is "~/foo"
      entered path is appended to give "~/foo/~/bar"
      opens existing directory "c:/home/ajm/bar/" in dired

After this patch the second find-file fails and opens an empty buffer.
The echo area shows:

  Use M-x make-directory RET RET to create the directory and its parents

`buffer-file-name' in that buffer is invalid: "c:/home/ajm/foo/~/bar".

Please fix this.

    AndyM