emacs-devel
[Top][All Lists]
Advanced

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

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


From: Protesilaos Stavrou
Subject: Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata
Date: Wed, 28 Apr 2021 09:18:43 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On 2021-04-27, 19:53 +0300, Juri Linkov <juri@linkov.net> wrote:

>> In outline:
>>
>> + The Completions' buffer is (setq completions-format 'one-column).
>> [...]
>>
>> The overall experience is good to the point where I do not miss other
>> interactive UIs.  And I feel that it could be improved further though I
>> am not there yet skills-wise.
>
> Thanks for sharing your settings.  Such UI using the default Completions 
> buffer
> is long awaited.  Recently we tried to do something similar with a new mode
> zcomplete-mode.  But it would be better to implement most enhancements
> in minibuffer.el where additional features could be enabled with new options.
> Then zcomplete-mode could just enable these options, like e.g. recently added
> icomplete-vertical-mode tweaks icomplete options to build new UI.

I think those issues are best decided by you and/or the other
maintainers.

To facilitate this exchange, I attach a shortened version of my
extensions without requiring any external libraries (what I wrote before
stands---you are welcome to improve upon it if you want, as I still have
a lot to learn).

Put those in the scratch buffer of emacs -Q, 'M-x eval-buffer' and then
try 'C-h v RET mini' to get an idea of how it works (I implement a
minimum input threshold).

I also attach the original file, prot-minibuffer.el, and here is the
section with my configurations for it:
<https://protesilaos.com/dotemacs/#h:c110e399-3f43-4555-8427-b1afe44c0779>.

If something is unclear, please let me know.

[ I just noticed a bug in my code when (setq completions-detailed t)
  where prot-minibuffer-previous-completion-or-mini does not do what it is
  supposed to---will fix it later. ]

>> I attach a screenshot, though I understand this does not say that much.
>
> Looks nice.  One thing is unclear: the format of buffers is like
> in the output of 'C-x C-b' (list-buffers) that uses tabulated-list
> to print buffer information.  Are these buffers in the Completions buffer
> formatted with tabulated-list as well?

That is done by the Marginalia library, which I think is a nice extra:
<https://github.com/minad/marginalia/>.  No, the mode does not change to
tabulated-list.  Daniel Mendler (in cc) is one of its maintainers and
can elaborate on the technicalities.

-- 
Protesilaos Stavrou
https://protesilaos.com

Attachment: 2021-04-28-emacs-Q-prot-minibuffer-excerpt.el
Description: Text document

Attachment: prot-minibuffer.el
Description: Text document


reply via email to

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