Subject: Re: bug#64102: 28.2; fails to find pathname with a sub dir as symlink and with parent dir ('..')

From: Eli Zaretskii <[email-masked]>
Date: Sun, 18 Jun 2023 21:25:56 +0300

> Date: Sun, 18 Jun 2023 11:03:59 -0700
> Cc: [email-masked], [email-masked]
> From: Paul Eggert <[email-masked]>
> 
> On 2023-06-18 01:53, Eli Zaretskii wrote:
> 
> > Paul, any comments or ideas?
> 
> Emacs's behavior is well-documented and longstanding. It's also wrong, 
> in that it disagrees with almost every other program and it therefore 
> confuses users, particularly non-experts.
> 
> One possible way out would be to add a user-settable flag to select the 
> longstanding Emacs behavior, or the behavior of most other programs. We 
> could document that the default might change in the future. Of course 
> this approach would have its own problems.

Before we consider how to trigger the new behavior, would you please
describe what kind of changes will be needed for implementing it?

My take from the description of the issue is that we'd need to change
expand-file-name to follow symlinks, i.e. hit the disk, something that
it never did, at least not on Posix platforms.  If this is what is
needed, it would have serious implications, at least performance-wise,
because expand-file-name is called everywhere in Emacs where we deal
with file names.