GNU bug report logs -
#62621
29.0.60; uniquify can't make buffers unique based on things other than filename
Previous Next
Reported by: Spencer Baugh <sbaugh <at> janestreet.com>
Date: Sun, 2 Apr 2023 17:38:02 UTC
Severity: normal
Found in version 29.0.60
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #107 received at 62621 <at> debbugs.gnu.org (full text, mbox):
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Cc: dmitry <at> gutov.dev, 62621 <at> debbugs.gnu.org, sbaugh <at> catern.com
> Date: Fri, 21 Jul 2023 09:34:28 -0400
>
> > Thanks, but it still falls short of what Dmitry described above: the
> > doc string doesn't "mention several functions that can be used".
> >
> >> +(defcustom uniquify-dirname-transform #'identity
> >> + "Function to transform buffer's directory for uniquifying its name.
> >> +
> >> +It takes a single argument: the directory of the buffer. It
> >> +should return a string filename (which does not need to actually
> >> +exist in the filesystem) to use for uniquifying the buffer name."
> >
> > Please read this carefully and try to put yourself in the shoes of a
> > user who needs to make sense out of this description. The immediate
> > question I had is what does "transforming a buffer's directory" have
> > to do with "uniquifying the buffer name"? Uniquifying a buffer's name
> > is not about its directory, at least not in general. IOW, the
> > starting point of this description is too "inside" the implementation.
>
> OK, how about this?
The explanation of what project-uniquify-dirname-transform does should
in its doc string, not in the doc string of uniquify-dirname-transform
(which should refer to the former, and that is enough).
The doc string of uniquify-dirname-transform should mention at least
'identity' as the default (what you wrote does that, but without
mentioning the function's name), otherwise this still falls short of
what Dmitry described.
And the last two paragraphs of the doc string of
uniquify-dirname-transform should be more-or-less reversed: first
describe the default, and that using some function other than
'identity' can affect the result, then describe
project-uniquify-dirname-transform as one such non-default transform.
This bug report was last modified 2 years and 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.