[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] `completing-read`: Add `group-function` support to completio

From: Eli Zaretskii
Subject: Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH VERSION 2)
Date: Tue, 11 May 2021 22:22:43 +0300

> Cc: gregory@heytings.org, dgutov@yandex.ru, monnier@iro.umontreal.ca,
>  emacs-devel@gnu.org
> From: Daniel Mendler <mail@daniel-mendler.de>
> Date: Tue, 11 May 2021 20:58:33 +0200
> On 5/11/21 8:44 PM, Eli Zaretskii wrote:
> > And this is supposed to be progress? to force users to customize
> > sorting by providing their own functions?  IMO, it is a step backward,
> > not forward: we are making Emacs harder to use for everyone who isn't
> > a Lisp programmer.
> What about providing a group sort function which sorts alphabetically as
> Juri already proposed? Alphabetical sorting can be offered as choice for
> in the defcustom.

That's slightly better, but only slightly: you still expect users to
manipulate functions, something that they don't necessarily understand
well enough.

Why not provide a defcustom that can accept both simple value, for the
most popular sort methods, and also allow function values for advanced

> (defcustom completions-group-sort-function #'identity
>   "Sorting function for the groups.
> The function takes and returns an alist of groups, where the each
> element is a pair of a group title string and the candidate strings
> belonging to the group."

Thanks.  Now try putting yourself into the shoes of a newbie and try
imagining what can he/she make out of this doc string.  "Function
taking and returning an alist"? really?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]