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: Daniel Mendler
Subject: Re: [PATCH] `completing-read`: Add `group-function` support to completion metadata
Date: Mon, 26 Apr 2021 00:58:32 +0200

On 4/26/21 12:40 AM, Dmitry Gutov wrote:
So it's better if at least icomplete-mode is enabled, preferably with an option which shows the completions right away with no input. And the vertical style should be even better.

I agree that Icomplete/Vertico/Ivy works better if you are selecting instead of completing. However if an extension like `group-function` is made to the completion metadata it should also be available by the default completion UI.

Helm and Consult use it mostly for sources which return some sort of "matches" from a Grep-like program, right? Lots of matches, none of them knowable in advance? Stock Emacs usually uses a buffer for that use case (like M-x rgrep).

No, Consult also offers commands, where you can know the matches in advance. For example I have these commands, which should satisfy your criterion:

* consult-org-agenda: Select headline (Grouped by file name)
* consult-imenu: Select imenu item (Grouped by type, function, variable etc)
* consult-buffer: Switch to recent files, buffers, bookmarks
* consult-mode-command: Invoke command associated with the current mode (Grouped in local/global minor-mode and major-mode) * consult-minor-mode-menu: Toggle minor modes by name (Grouped by on/off local/global)

There are more commands which may fall more into the search category where you don't know exactly what you are looking for.

Note that there are also users who implemented small extensions for the default completion UI, e.g., such that the *Completions* buffers appears after a delay and a few characters of input. I believe Protesilaos Stavrou is doing that. For such UIs the *Completions* buffer is as fully capable as one of the aforementioned vertical minibuffer UIs.

Daniel



reply via email to

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