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#54862: 28.1; window-text-pixel-size sometimes fails to report accurate pixel-width Date: Tue, 12 Apr 2022 17:21:32 +0300 Message-ID: <83tuay4c2b.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34497"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54862@debbugs.gnu.org To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 12 16:22:28 2022 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 1neHPX-0008q3-Ny for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Apr 2022 16:22:27 +0200 Original-Received: from localhost ([::1]:34948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1neHPW-0004ka-GI for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Apr 2022 10:22:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neHP8-0004kC-7H for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2022 10:22:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55290) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1neHP7-00027m-UZ for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2022 10:22:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1neHP7-0002uc-KW for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2022 10:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Apr 2022 14:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54862 X-GNU-PR-Package: emacs Original-Received: via spool by 54862-submit@debbugs.gnu.org id=B54862.164977329711154 (code B ref 54862); Tue, 12 Apr 2022 14:22:01 +0000 Original-Received: (at 54862) by debbugs.gnu.org; 12 Apr 2022 14:21:37 +0000 Original-Received: from localhost ([127.0.0.1]:49187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neHOi-0002tq-PI for submit@debbugs.gnu.org; Tue, 12 Apr 2022 10:21:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neHOg-0002tY-Ir for 54862@debbugs.gnu.org; Tue, 12 Apr 2022 10:21:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38606) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neHOa-00025E-Mm; Tue, 12 Apr 2022 10:21:28 -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=/2S/LLBR1bkkCD0I4V6m1s2HTvjonTcsnHA+wDw8neU=; b=QNFX6fF1LV9i UsNpYnawWZxNuz1DdHVxiRl9RmXMBFmirDglrEOvZGPCoUZ+SXS9ZMcGPYAdAQiVPeezRKtSo7kRR dNn5GYYmz16bZb/yfDj2t2suQlVUdTDlwAgFm/XzZbAtHYT5SSRrzcF6sXlEHtjaw5vnftSNhllub i00ycN8RXPxaTKAQoPBb+712uRaDR4j6rnRmRIUZFmmJcTB5odWA69gk747YeqQzlKHDt9minaW24 x9cyB/Q/tlhH/Ur2ZLF42k8M3LD69C5iH91vzv6Kx0dp7aUPG4vbve0H7ey98CYhTOVqArvhi8KrF eFz35hGuYiYOEZOmpG0WAQ==; Original-Received: from [87.69.77.57] (port=2816 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 1neHOa-0005sb-4v; Tue, 12 Apr 2022 10:21:28 -0400 In-Reply-To: (message from Markus Triska on Mon, 11 Apr 2022 20:48:03 +0200) 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" Xref: news.gmane.io gmane.emacs.bugs:229764 Archived-At: > From: Markus Triska > Date: Mon, 11 Apr 2022 20:48:03 +0200 > > > To reproduce this regression, please invoke Emacs with: > > $ emacs -Q > > and then evaluate the following form: > > (let ((width 20)) > (= width (let* ((height (line-pixel-height)) > (data (with-temp-buffer > (insert (format "P1\n%s %s\n" width height)) > (dotimes (_ height) > (insert (make-string width ?1) "\n")) > (buffer-string)))) > (insert " ") > (let ((from (point))) > (insert-image `(image :type pbm :data ,data :ascent center) "t") > (car (window-text-pixel-size nil from (point))))))) > > The expected result, obtained for example in Emacs 26.1 and 27.1, is: t. > > Whereas with Emacs 28.1, evaluating the form unexpectedly yields: nil. Thanks, should be fixed now on the release branch and on master.