emacs-devel
[Top][All Lists]
Advanced

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

RE: on helm substantial differences


From: Drew Adams
Subject: RE: on helm substantial differences
Date: Sun, 15 Nov 2020 14:41:41 -0800 (PST)

> > It would be nice if in addition to already existing 'annotation-
> > function' 'completing-read' also supported 'format-function' or
> > 'display-function', i.e. a function that would return a completion
> > candidate to display in the *Completions* buffer.
> 
> Agreed: the `annotation-function` is much too limited.
> I don't think "in addition" is right tho: the new functionality should
> aim to replace the current `annotation-function`.

I'm not sure I agree.  Candidate display can be open to
all kinds of programmatic control (in Icicles, at least).

And there's the question of the relation between a "display
candidate" (what you see) and the "real" candidate that you
can _act_ on.  For example, a relative file name is shown
but you act on an absolute file name (or the file).

And there can be a difference between what is displayed and
what you _match_ against.  For example, your input is not
matched against a candidate annotation - that's just extra.

All of these possibilities are available.  Sometimes you
want matching to go against all parts of a display candidate,
sometimes you don't.  Sometimes you want to be able to match
also against some candidate parts that are not displayed
(the display is kept simple, or matching those unshown parts
is optional).

There are lots of possibilities.  (Icicles handles these in
its version of `completing-read', while keep that function's
argument list the same as vanilla.)



reply via email to

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