emacs-devel
[Top][All Lists]
Advanced

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

Re: [NonGNU ELPA] New packages: corfu-doc and corfu-doc-terminal


From: Stefan Monnier
Subject: Re: [NonGNU ELPA] New packages: corfu-doc and corfu-doc-terminal
Date: Sat, 28 May 2022 13:47:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> That's a great idea, but has a problem, Popon or popup.el don't work
> like windows and frames.  popup.el seems to be useful mainly for menus,
> though I maybe wrong.  Popon is more generalized and minimal, so it
> requires manual handling of the text.

That's the point of the design of the API: to provide an interface that
is sufficiently restricted that it can work with various implementation
choices (while still being useful enough).

> example, I asked Corfu's author if it is possible to add corfu-terminal
> to Corfu as an extension, but he said no just because of the extra Popon
> dependency, which I intentionally extracted out of corfu-terminal to let
> others use it)

But once the API is available corfu can make use of it without adding
a dependency on `popon`.

> I think the best solution will be to implement child frames in terminal.
> AFAIK, ncurses has a concept of floating window, which we can use to
> render the frame.  Doing this will solve all floating popup related
> problems.  Then all packages will use this standard (child) frame API to
> show popup.

We already have code which does this kind of thing, to draw menus in
tty frames.  IIUC the implementation currently relies on the fact that
no ELisp is run while those overlaid menus are drawn, so it may require
a fair bit of surgery, but indeed implementing something like
popup/popon at a lower level is probably the better choice in the
long run.  Nobody has taken on this challenge yet, tho.

In any case, this API that I think we should design should hopefully
make it possible to use such a C-level implementation if/when it's
available.


        Stefan




reply via email to

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