GNU bug report logs -
#62732
29.0.60; uniquify-trailing-separator-p affects any buffer whose name matches a dir in CWD
Previous Next
Reported by: sbaugh <at> catern.com
Date: Sun, 9 Apr 2023 01:38:02 UTC
Severity: normal
Found in version 29.0.60
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: sbaugh <at> catern.com, 62732 <at> debbugs.gnu.org
> Date: Mon, 10 Jul 2023 12:53:00 -0400
>
> > Callers shouldn't know to much about the internals of the callee.
>
> Indeed: currently `create-file-buffer` doesn't pay attention to the file
> system at all, it just creates a buffer with a name based on the
> FILENAME that's passed. Spencer's patch just offers more control to the
> callers by making `create-file-buffer` respect the choice of the callers
> (whether they used a file name or a dire name, which is an important
> distinction in Emacs's file name APIs, not just here).
>
> There's no need for the callers to know about the internals of
> the callee. If they call `create-file-buffer` with /foo/bar/baz the
> buffer will be called "baz" and if they call it with /foo/bar/baz/ the
> buffer will be called "baz/" (depending on
> `uniquify-trailing-separator-p`, of course).
> It's the most natural/obvious semantics.
Wasn't the fact that the trailing slash was absent part of the reason
for the bug this tries to fix? If so, then this is not just "if you
want it, use it", is it?
This bug report was last modified 1 year and 312 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.