[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64986: 30.0.50; window-text-pixel-size sometimes returns 0 width whe
From: |
Eli Zaretskii |
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@posteo.net>
> Cc: 64986@debbugs.gnu.org
> Date: Tue, 01 Aug 2023 13:13:08 +0000
>
> Eli Zaretskii <eliz@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.