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 #101 received at 62621 <at> debbugs.gnu.org (full text, mbox):
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Cc: Dmitry Gutov <dmitry <at> gutov.dev>, sbaugh <at> catern.com, 62621 <at> debbugs.gnu.org
> Date: Wed, 19 Jul 2023 08:31:00 -0400
>
> >> >>> Repeat after me: Use options whose values are functions
> >> >>> are hard on our users, because they require them to be Lisp
> >> >>> programmers.
> >> >> That doesn't have to be the case. If the defcustom's docstring mentions
> >> >> several functions that can be used, and the :type widget includes them
> >> >> as well, the user can decide to switch to any of them without writing
> >> >> any Lisp (or having to understand the implementations).
> >> > But that was not so in this particular case.
> >>
> >> That's easy to fix, as long as you don't have additional objections to
> >> that approach.
> >
> > I'd need to see the fix first, because I don't think I have a clear
> > idea of what you have in mind.
> >
> > (My objections, btw, where very minor and of pure usability nature.
> > Frankly, I'm surprised such a simple and more-or-less agreed-upon
> > comment got such a long thread of discussing various loosely-related
> > issues.)
>
> Like this:
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.
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.