emacs-devel
[Top][All Lists]
Advanced

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

Re: feature/icomplete-vertical


From: João Távora
Subject: Re: feature/icomplete-vertical
Date: Mon, 05 Oct 2020 11:52:59 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: João Távora <joaotavora@gmail.com>
>> Date: Mon, 5 Oct 2020 10:57:35 +0100
>> Cc: Gregory Heytings <ghe@sdf.org>, Ergus <spacibba@aol.com>, Juri Linkov 
>> <juri@linkov.net>, 
>>      Yuan Fu <casouri@gmail.com>, emacs-devel <emacs-devel@gnu.org>
>> 
>> > Or a lot of completion candidates.
>> 
>> That's odd, I've been C-x C-f'ing to directories with "a lot" of files
>> and I don't notice any problems.  What size of "lot" did you have in
>> mind?
>
> More than can be displayed, one candidate on each line, by the frame's
> dimensions, I guess.

I've certainly got more than that, and the problem doesn't happen.

>> Though maybe the responsible for the truncation can provide a 
>> way (a hook, a variable, a function?) for the user of the minibuffer to 
>> select 
>> the appropriate hint.  My point here is that this variable/function 
>> shouldn't 
>> be called icomplete-truncation-hint, but rather mini-window-truncation-hint.
>
> The code which displays the min-window is more-or-less the generic
> Emacs window-display code, it doesn't care that not all of the stuff
> fits in the window.

That's the code that honours max-mini-window-height, right?  Though that
doesn't seem to be what's kicking in here, I believe it should be.

Anyway, I think it's reasonable to suggest I think, that whoever is
truncating the display has someway of notifying the client (whoever
requested the display), that truncation happened, or is about to happen.

> If an application wants to fit the buffer in the window, or display
> some hint about truncation, it's the application's business to do
> these things.

I guess you can argue that, but this implies there are ways to predict
truncation (since being notified of it seems to be what you're opposed
to).

So how is the application to know if its n lines, of lengths L = {l1,
..., li, ..., ln}, it wants to display (not necessarily by buffer
insertion) in the mini-window need truncation and starting in which
line?  Does it need to perform calculations with max-mini-window-height?
If so, is there a "canonical" way to perform these calculations that
accounts for fontsizes, frame widths, etc?  To be clear, I find this
information useful for other domais, notably designing the way the Eldoc
should show information in the echo area.

João



reply via email to

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