unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: triska@metalevel.at
Cc: 54862-done@debbugs.gnu.org
Subject: bug#54862: 28.1; window-text-pixel-size sometimes fails to report accurate pixel-width
Date: Tue, 26 Apr 2022 15:04:35 +0300	[thread overview]
Message-ID: <831qxkm4oc.fsf@gnu.org> (raw)
In-Reply-To: <83tuay4c2b.fsf@gnu.org> (message from Eli Zaretskii on Tue, 12 Apr 2022 17:21:32 +0300)

> Date: Tue, 12 Apr 2022 17:21:32 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 54862@debbugs.gnu.org
> 
> > From: Markus Triska <triska@metalevel.at>
> > 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.

No further comments for 2 weeks, so I'm boldly marking this bug done.





      reply	other threads:[~2022-04-26 12:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 18:48 bug#54862: 28.1; window-text-pixel-size sometimes fails to report accurate pixel-width Markus Triska
2022-04-12 10:35 ` Lars Ingebrigtsen
2022-04-12 14:21 ` Eli Zaretskii
2022-04-26 12:04   ` Eli Zaretskii [this message]

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=831qxkm4oc.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=54862-done@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).