Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: Dmitry Gutov , sbaugh@catern.com, 62621@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. OK, how about this?