GNU bug report logs - #65899
30.0.50; window-text-pixel-size sometimes fails to report accurate pixel-width

Previous Next

Package: emacs;

Reported by: Markus Triska <triska <at> metalevel.at>

Date: Tue, 12 Sep 2023 22:03:01 UTC

Severity: normal

Found in version 30.0.50

Fixed in version 29.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 65899 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Markus Triska <triska <at> metalevel.at>
Cc: 65899 <at> debbugs.gnu.org
Subject: Re: 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
> From: Markus Triska <triska <at> 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.




This bug report was last modified 1 year and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.