Subject: Re: bug#69305: outline-minor-mode for tabulated-list-mode

From: Eli Zaretskii <[email-masked]>
Date: Wed, 21 Feb 2024 21:12:46 +0200

> From: Juri Linkov <[email-masked]>
> Date: Wed, 21 Feb 2024 19:34:17 +0200
> 
> >> +(defcustom Buffer-menu-group-by nil
> >> +  "If non-nil, buffers are grouped by function."
> >> +  :type 'function
> >> +  :group 'Buffer-menu
> >> +  :version "30.1")
> >
> > Please consider letting users choose a symbol, not a function.  Each
> > symbol can be mapped to a function, but having a user option whose
> > values are functions makes it harder for users to customize the
> > option.
> 
> Ok, now the type is changed to 'symbol'.  Here is the complete patch:

Thanks, but I wonder if we can be a tad more user-friendly?  The user
option exists, and it can accept simple enough data structures for
customizations, but the default is nil, and there's no example or
pre-cooked list of ready-to-use values anywhere in sight, not even in
the doc string.  Users will have to work hard to produce a grouping of
their liking.  E.g., suppose I want to group buffers by mode -- how
would I go about it?  Or what about grouping buffers by their leading
directories -- how can that be done?  Etc. etc. -- this could be a
very powerful feature, but we should make its use easier.  And, after
reading the documentation of tabulated-list-groups and that of
tabulated-list-entries several times, I have no idea how to specify
simple groupings such as those described above.  Which makes examples
or pre-cooked values even more important, IMO.

What I had in mind when I said "choose a symbol" was that a symbol
will stand for a pre-cooked grouping.  For example, 'mode would cause
buffers grouped by major-mode, 'directory will group by leading
directories, 'alphabet will group by the first letter of the name,
etc.  What this patch provides is quite a far cry from that.