bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#39901: Emacs needs to update window-width when the user updates the


From: Eli Zaretskii
Subject: bug#39901: Emacs needs to update window-width when the user updates the text size
Date: Wed, 05 Aug 2020 17:39:30 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Wed, 05 Aug 2020 14:04:59 +0200
> Cc: 953033@bugs.debian.org, Katsumi Yamaoka <yamaoka@jpl.org>,
>  39901@debbugs.gnu.org
> 
> 積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
> 
> > Emacs needs to update window-width when the user updates the text size.
> 
> I think that makes sense.
> 
> Anybody got an opinion here?

I do: there's no bug here -- window-width is documented to return a
value in terms of the frame's canonical character width (i.e. it uses
the dimensions of the frame's default font).  And that doesn't change
when you change the font only for a single buffer.

However, window-width can be asked to return the value in pixels, if
someone wants that, and then one can compute the width in units of any
other, larger or smaller, font.

IOW, if some applications produce unexpected or unpleasant effects
when the buffer text is resized, those applications need to be
sensitive to such resizing.  But changing the semantics of a veteran
API like suggested here is a non-starter, as it would definitely break
gobs of existing code.





reply via email to

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