GNU bug report logs - #51995
29.0.50; `string-pixel-width' depends on the current window width

Previous Next

Package: emacs;

Reported by: Brahimi Saifullah <brahimi.saifullah <at> gmail.com>

Date: Sat, 20 Nov 2021 05:05:02 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 51995 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Brahimi Saifullah <brahimi.saifullah <at> gmail.com>
Subject: Re: bug#51995: 29.0.50; `string-pixel-width' depends on the current
 window width
Date: Mon, 22 Nov 2021 12:04:35 +0100
martin rudalics <rudalics <at> gmx.at> writes:

> Yes.  This wasn't a very bright idea.  The function will now be
>
> (defun string-pixel-width (string)
>   "Return the width of STRING in pixels."
>   (with-temp-buffer
>     (insert string)
>     (car (buffer-text-pixel-size nil nil t))))
>
> as you suggested.  The xdisp.c change is attached.  Apply the
> 'string-pixel-width' change manually.

Thanks; I've now applied the patch and adjusted the function, and it
seems to work as advertised now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 178 days ago.

Previous Next


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