GNU bug report logs - #64986
30.0.50; window-text-pixel-size sometimes returns 0 width when called from temporary buffer

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Tue, 1 Aug 2023 07:48:01 UTC

Severity: normal

Tags: confirmed

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 64986 <at> debbugs.gnu.org
Subject: bug#64986: 30.0.50; window-text-pixel-size sometimes returns 0 width when called from temporary buffer
Date: Thu, 03 Aug 2023 11:55:35 +0300
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Cc: 64986 <at> debbugs.gnu.org
> Date: Tue, 01 Aug 2023 13:13:08 +0000
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > This tricky part is why we now have buffer-text-pixel-size: it takes
> > care of making the buffer "temporarily shown" in the window.  So I
> > believe you should use that function instead.
> 
> Indeed. We previously used `set-window-buffer' as in shr.el, but that
> felt like an awkward workaround because it can sometimes err when
> selected-window is dedicated.
> 
> I am wondering if `shr-pixel-buffer-width' and `shr-pixel-column' should
> also use `buffer-text-pixel-size'. The `(set-window-dedicated-p nil
> nil)` is not nice as it could override user customization.

Probably.  Patches to that effect are welcome.




This bug report was last modified 1 year and 289 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.