[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: Daniel Mendler
Subject: Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH VERSION 4)
Date: Sun, 9 May 2021 21:11:01 +0200

On 5/9/21 8:56 PM, Stefan Monnier wrote:
> I think in the case of the ucs-char-names completion-table, the group
> sorting option we propose (alphabetical) is not really specific to the
> completion table, so I don't see the point of putting the control (and
> work) in the hands of the completion-table.

Yes, and I don't think there many sensible options on how you want to
sort the groups after all. Therefore it is questionable if the
generalization of the `group-function` is needed. Either one uses the
natural candidate order to determine the group order or one sorts the
groups alphabetically.

In the case of vertical UIs like Ivy, Selectrum and Vertico I prefer to
have the candidate order determine the group order, since this ensures
that the most likely candidate occurs first.

In the case of the default completion UI it may be more reasonable to
always sort the groups alphabetically, such that the overall view is
more predictable.

However if it turns out that we need the generality in the end it may be
better to include the possibility right away as I proposed in my last patch.


reply via email to

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