emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54862: closed (28.1; window-text-pixel-size sometimes fails to repor


From: GNU bug Tracking System
Subject: bug#54862: closed (28.1; window-text-pixel-size sometimes fails to report accurate pixel-width)
Date: Tue, 26 Apr 2022 12:05:02 +0000

Your message dated Tue, 26 Apr 2022 15:04:35 +0300
with message-id <831qxkm4oc.fsf@gnu.org>
and subject line Re: bug#54862: 28.1; window-text-pixel-size sometimes fails to 
report accurate pixel-width
has caused the debbugs.gnu.org bug report #54862,
regarding 28.1; window-text-pixel-size sometimes fails to report accurate 
pixel-width
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
54862: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54862
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 28.1; window-text-pixel-size sometimes fails to report accurate pixel-width 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.

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




--- End Message ---
--- Begin Message --- Subject: Re: bug#54862: 28.1; window-text-pixel-size sometimes fails to report accurate pixel-width Date: Tue, 26 Apr 2022 15:04:35 +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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]