Subject: bug#62732: 29.0.60; uniquify-trailing-separator-p affects any buffer whose name matches a dir in CWD

From: Eli Zaretskii <[email-masked]>
Date: Tue, 11 Jul 2023 18:31:07 +0300

> From: Spencer Baugh <[email-masked]>
> Cc: Stefan Monnier <[email-masked]>,  [email-masked],
>    [email-masked]
> Date: Tue, 11 Jul 2023 08:31:51 -0400
> 
> Eli Zaretskii <[email-masked]> writes:
> > My comments assumed that indeed we will (almost) always want to tell
> > create-file-buffer this is a directory.
> 
> One contribution, not intended to be exhaustive of all use cases, and
> not intended to be definitively a good idea: a user could want opened
> tar files with their file listing view to have a trailing slash, even
> though they aren't actually directories.

But users don't call create-file-buffer, do they?  So this is not
user-level option, at least not directly so.

> And with my approach that is possibly just by running
> file-name-as-directory over the name before passing it to
> create-file-buffer.

If you worry about users, they can be told to append a slash by hand,
when they mean a directory and that directory does not yet exist.  We
do this elsewhere in Emacs.