emacs-devel
[Top][All Lists]
Advanced

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

Re: feature/icomplete-vertical


From: Eli Zaretskii
Subject: Re: feature/icomplete-vertical
Date: Mon, 05 Oct 2020 15:05:13 +0300

> From: João Távora <joaotavora@gmail.com>
> Date: Mon, 05 Oct 2020 12:54:52 +0100
> Cc: ghe@sdf.org, spacibba@aol.com, emacs-devel@gnu.org, casouri@gmail.com,
>  juri@linkov.net
> 
> > We could write a similar function to do what you want, but please note
> > that such a function will not understand the semantics of the text, so
> > it could suggest truncating it at some place which makes no sense.
> > If the caller would like a smarter 'service", we will have to come up
> > with some method of telling the function where it makes sense to
> > truncate the text.
> 
> Right. My idea is that a "dumb" service gives us a text position and the
> application, which does know the semantics of the things being
> displayed, decides based on that.
> 
> For example, icomplete would remove the candidate where the truncation
> happened and replace it with an elipsis, whereas eldoc would remove the
> piece of documentation entirely and maybe replace it with a hint to
> visit the *eldoc* buffer.

In use cases that are not the most trivial ones, knowing what to
remove could not be easy.  For example, what if the part that exceeds
the window dimensions comes from display or overlay string?  Also,
does the application tolerate partially-visible lines?  So some
additional information will need to be made available to the function,
I think.

Patches welcome.



reply via email to

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