From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83fs50y06w.fsf@gnu.org> References: <87o7jrgq5n.fsf@localhost> <83pm470xuv.fsf@gnu.org> <87edkmq523.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14165"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64986@debbugs.gnu.org To: Ihor Radchenko , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 03 10:56:11 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qRU7v-0003RK-3i for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Aug 2023 10:56:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qRU7n-0007W4-DL; Thu, 03 Aug 2023 04:56:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRU7m-0007Vh-Bt for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2023 04:56:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qRU7m-0005Zj-4F for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2023 04:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qRU7m-0003KC-16 for bug-gnu-emacs@gnu.org; Thu, 03 Aug 2023 04:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Aug 2023 08:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64986 X-GNU-PR-Package: emacs Original-Received: via spool by 64986-submit@debbugs.gnu.org id=B64986.169105293412738 (code B ref 64986); Thu, 03 Aug 2023 08:56:01 +0000 Original-Received: (at 64986) by debbugs.gnu.org; 3 Aug 2023 08:55:34 +0000 Original-Received: from localhost ([127.0.0.1]:50852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRU7J-0003JN-TL for submit@debbugs.gnu.org; Thu, 03 Aug 2023 04:55:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRU7I-0003JA-1g for 64986@debbugs.gnu.org; Thu, 03 Aug 2023 04:55:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRU7B-0005QO-Io; Thu, 03 Aug 2023 04:55:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=SS1tFpmEBJZCnEd/laXyZzTGl1BrHeQrRASBaYhjkco=; b=PO5TI0mwJ939 740SeJTXPAjGwhddoWtOh6nHjA2zeWHAU1VRGaok7Zw0f68FN3tWqn52krct2rKiMTFckcuZI+Itv ZfJ/7jPJgK4m+i1dSPtADKs2kmUEerwvyjATIPRSOg3oSR2lu9CbM7043GFl2hgINQXoh2NQKtnHC 7nRcoycvSp/9zOyQW7pDJNuwj1mvaoV4exZiAXp9fEdbu48GPf1nBGG4OkjXkFWCXSSL/m9IFhxuz Rqwug+mgXX/EYC3hRvIoBJgX5J7LIl2a6sLOg/82pP9porBArPOVLGsDDXsF8Lf3RjZdd6orohUkm WzUAs9JslCNj/LLBuM4KPw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRU7B-0002GA-23; Thu, 03 Aug 2023 04:55:25 -0400 In-Reply-To: <87edkmq523.fsf@localhost> (message from Ihor Radchenko on Tue, 01 Aug 2023 13:13:08 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266570 Archived-At: > From: Ihor Radchenko > Cc: 64986@debbugs.gnu.org > Date: Tue, 01 Aug 2023 13:13:08 +0000 > > Eli Zaretskii 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.