From: Eli Zaretskii <eliz@gnu.org>
To: Markus Triska <triska@metalevel.at>
Cc: 65899@debbugs.gnu.org
Subject: bug#65899: 30.0.50; window-text-pixel-size sometimes fails to report accurate pixel-width
Date: Thu, 14 Sep 2023 12:53:55 +0300 [thread overview]
Message-ID: <83zg1pkrm4.fsf@gnu.org> (raw)
In-Reply-To: <m2a5tr82n4.fsf@metalevel.at> (message from Markus Triska on Wed, 13 Sep 2023 00:09:35 +0200)
> From: Markus Triska <triska@metalevel.at>
> Date: Wed, 13 Sep 2023 00:09:35 +0200
>
>
> The following slight variation of the previously filed issue #54862 also
> yields a wrong result of window-text-pixel-size.
>
> To reproduce the issue, 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 "\n")
> (insert-image `(image :type pbm
> :data ,"P1\n1 10\n1111111111"
> :ascent center) "t")
> (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, is: t.
>
> With Emacs 30.0.50, I instead unexpectedly get: nil.
Thanks, should be fixed now on the emacs-29 release branch.
next prev parent reply other threads:[~2023-09-14 9:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 22:09 bug#65899: 30.0.50; window-text-pixel-size sometimes fails to report accurate pixel-width Markus Triska
2023-09-14 9:53 ` Eli Zaretskii [this message]
2023-09-14 18:27 ` Markus Triska
2023-09-15 6:13 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83zg1pkrm4.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=65899@debbugs.gnu.org \
--cc=triska@metalevel.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).