[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
complexity in minibuffer (was: (icomplete-vertical-mode): Add support fo
From: |
Stefan Monnier |
Subject: |
complexity in minibuffer (was: (icomplete-vertical-mode): Add support for affixations and, annotations) |
Date: |
Wed, 02 Jun 2021 10:19:01 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> Another pain point in minibuffer is the representation of candidates.
> Sometimes they are strings, sometimes they are lists of strings with
> prefixes and suffixes, lots of silly "if consp".
I must say I'm not sure what you're referring to here.
So I went searching for `consp` in minibuffer.el, and IIUC you're
talking about the code which takes a set of completions and displays it
in *Completions*. E.g. the code in `completion--insert-*`.
Is that right?
[ If so, it explains why I wasn't sure what you referred to, since it's
not part of the code with which I'm familiar ;-) ]
Indeed, I wonder why we have that.
I know `display-completion-list` is documented to work with lists of
various things (strings, symbols, and lists of strings, IIRC), but
that's an old "feature" of `display-completion-list` that's not used by
the current completion code, AFAIK (and potentially not used by any code
at all).
So we could have a quick loop through the completion candidates at the
entry of `display-completion-list` which converts each candidate to
a plain string and then calls a streamlined `completion--insert-strings`
where we don't need those `consp` any more.
[ And in most cases we could call `completion--insert-strings` directly
rather than go through the old `display-completion-list`. ]
WDYT? Am I missing something?
Stefan
- Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations, (continued)
- Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations, Stefan Monnier, 2021/06/02
- Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations, Dmitry Gutov, 2021/06/01
- Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations, João Távora, 2021/06/01
- Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations, João Távora, 2021/06/01
- Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations, Dmitry Gutov, 2021/06/01
- Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations, João Távora, 2021/06/01
- Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations, Dmitry Gutov, 2021/06/02
- Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations, João Távora, 2021/06/02
- Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations, Dmitry Gutov, 2021/06/02
- Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations, João Távora, 2021/06/02
- complexity in minibuffer (was: (icomplete-vertical-mode): Add support for affixations and, annotations),
Stefan Monnier <=
- Re: complexity in minibuffer (was: (icomplete-vertical-mode): Add support for affixations and, annotations), João Távora, 2021/06/02
- Re: complexity in minibuffer, Stefan Monnier, 2021/06/02
- Re: complexity in minibuffer, João Távora, 2021/06/02
- Re: complexity in minibuffer, Dmitry Gutov, 2021/06/02
- Re: complexity in minibuffer, João Távora, 2021/06/02
- Re: complexity in minibuffer, Dmitry Gutov, 2021/06/02
- Re: complexity in minibuffer, João Távora, 2021/06/02
- Re: complexity in minibuffer, Stefan Monnier, 2021/06/02
- Re: complexity in minibuffer, João Távora, 2021/06/02
- Re: complexity in minibuffer, Daniel Mendler, 2021/06/02