From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs Subject: bug#54862: 28.1; window-text-pixel-size sometimes fails to report accurate pixel-width Date: Mon, 11 Apr 2022 20:48:03 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1279"; mail-complaints-to="usenet@ciao.gmane.io" To: 54862@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 11 20:47:24 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 1ndz4O-000AdL-A1 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Apr 2022 20:47:24 +0200 Original-Received: from localhost ([::1]:35742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndz4N-000846-1Z for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Apr 2022 14:47:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndz43-0007hW-4c for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2022 14:47:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51811) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ndz42-0005Oq-Ru for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2022 14:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ndz42-0007gf-IV for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2022 14:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Apr 2022 18:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54862 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.164970277629470 (code B ref -1); Mon, 11 Apr 2022 18:47:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Apr 2022 18:46:16 +0000 Original-Received: from localhost ([127.0.0.1]:45703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndz3H-0007fG-S1 for submit@debbugs.gnu.org; Mon, 11 Apr 2022 14:46:16 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:50500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndz3G-0007f9-4L for submit@debbugs.gnu.org; Mon, 11 Apr 2022 14:46:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndz3F-0007Lt-Cw for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2022 14:46:13 -0400 Original-Received: from [78.47.144.35] (port=39378 helo=metalevel.at) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndz3D-0005FJ-RT for bug-gnu-emacs@gnu.org; Mon, 11 Apr 2022 14:46:13 -0400 Original-Received: from mts-Mac-mini.localdomain (localhost [127.0.0.1]) by metalevel.at (Postfix) with ESMTP id 481F69C74C for ; Mon, 11 Apr 2022 20:46:09 +0200 (CEST) Original-Received: by mts-Mac-mini.localdomain (Postfix, from userid 501) id CCB331CFAD7E; Mon, 11 Apr 2022 20:48:03 +0200 (CEST) X-Host-Lookup-Failed: Reverse DNS lookup failed for 78.47.144.35 (failed) Received-SPF: none client-ip=78.47.144.35; envelope-from=triska@metalevel.at; helo=metalevel.at X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action 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:229736 Archived-At: 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. If possible, could you please restore the previous behaviour? Thank you and all the best, Markus In GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars) of 2022-04-11 built on debian Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Debian Configured using: 'configure --with-gif=ifavailable --with-tiff=ifavailable --with-gnutls=ifavailable' Configured features: CAIRO FREETYPE GLIB GMP GSETTINGS JPEG LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM LUCID ZLIB