[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) |
Date: |
Thu, 29 Apr 2021 18:52:38 +0200 |
On 4/29/21 6:20 PM, Juri Linkov wrote:
>> You can try the patch with the following settings and execute
>> `xref-find-references` for example (M-?).
>
> I tried to use your patch to implement grouping for read-char-by-name.
> It helped to greatly reduce the size of mule--ucs-names-group
> from 30 lines to just 3 lines that is a big win.
That's a nice advantage!
> 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. So for such cases
> handling an additional arg `transform` is an extra burden:
True, but the burden is fairly minor (2 lines). If we go with a separate
`group-transform-function`, the complexity of the code of the completion
UIs will be increased and it will take a tiny bit more code for the
completion tables which provide a transformation. I don't see a
convincing advantage in splitting the single feature into two functions
`group-sort/transform-function`. As I argued we cannot combine a
separate `group-function` and a generic `transform/format-function`,
since the group-specific transformation should only be applied when
grouping is used. Otherwise the transformation may remove/hide
information from the candidate which is supposed to be displayed in the
title.
Daniel
Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH), Daniel Mendler, 2021/04/25
- Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH), Juri Linkov, 2021/04/25
- Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH), Juri Linkov, 2021/04/29
- Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH),
Daniel Mendler <=
- Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH), Stefan Monnier, 2021/04/29
- Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH), Daniel Mendler, 2021/04/29
- Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH), Juri Linkov, 2021/04/29
- Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH VERSION 2), Daniel Mendler, 2021/04/29
- Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH VERSION 2), Daniel Mendler, 2021/04/30
- Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH VERSION 2), Juri Linkov, 2021/04/30
- Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH VERSION 2), Daniel Mendler, 2021/04/30
- Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH VERSION 2), Daniel Mendler, 2021/04/30
Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH VERSION 2), Juri Linkov, 2021/04/30
Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata (REVISED PATCH VERSION 2), Daniel Mendler, 2021/04/30