[Top][All Lists]

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

Re: [PATCH] Add function window-line-width

From: Eli Zaretskii
Subject: Re: [PATCH] Add function window-line-width
Date: Thu, 14 Nov 2019 11:11:25 +0200

> From: Sébastien Chapuis <address@hidden>
> Date: Sun, 10 Nov 2019 06:09:56 +0800
> Cc: Eli Zaretskii <address@hidden>, address@hidden

> After thinking about it, I am wondering if the current behavior of 
> 'window-lines-pixel-dimensions' is correct ?
> As user of the function I do not expect the function to count glyphs that are 
> inserted by redisplay only "for its
> own purpose",
> glyphs that are invisible and non-existent for the end user.

There are valid use cases where those glyphs do matter, see the use of
this function in Emacs's own code.

> I see that 'window-largest-empty-rectangle' uses this function, the widths of 
> the rectangles it returns are
> smaller than they really are.

How do you mean "smaller"?  Can you show an example where the result
is incorrect in your opinion?

> I think it makes sense to change this behavior and make 
> 'window-lines-pixel-dimensions' not counting these
> "redisplay only" glyphs.

I don't see the need, sorry.  If what that function does doesn't fit
your bill, it's probably because you should use another function

> `(time (test1))` returns 0.000004869
> `(time (test2))` returns 0.00376

So we are talking about 3 msec additional time?  Is that really
significant in your application?

reply via email to

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