|
From: | Stefan Monnier |
Subject: | Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH) |
Date: | Thu, 29 Apr 2021 13:07:04 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> OTOH, it highlighted the shortcomings of amalgamating both > grouping and transforming in the same function: > mule--ucs-names-group doesn't need to provide transformation, > because the same affixation-function is used for both > grouping and non-grouping completions. The purpose of the `group-function` when called with a non-nil `transform` arg is not to *add* text but on the contrary to make the entries shorter (presumably by removing text shared by all elements of the group and made redundant by the group name being printed as a "section title"). So the purpose of `affixation/annotation-function` and `group-function` seem orthogonal (tho we should be careful to make them work together: the affixation/annotation function will usually need the "full name" in order to decide what to add, but that the thing should be added to the text as shortened by `group-function`). Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |