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 #23 received at 51995 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Brahimi Saifullah <brahimi.saifullah <at> gmail.com>
Cc: rudalics <at> gmx.at, 51995 <at> debbugs.gnu.org
Subject: Re: bug#51995: 29.0.50;
 `string-pixel-width' depends on the current window width
Date: Sun, 21 Nov 2021 08:34:34 +0200
> Date: Sat, 20 Nov 2021 18:42:01 -0300
> From: Brahimi Saifullah <brahimi.saifullah <at> gmail.com>
> Cc: 51995 <at> debbugs.gnu.org
> 
> >Since 'window-text-pixel-size' has to deal with arbitrary buffers, it is
> >not a good idea to set X-LIMIT or Y-LIMIT to very large values.  The
> >doc-string of 'window-text-pixel-size' explicitly warns about X-LIMIT
> >that
> >
> >   Since calculating the width of long lines can take some time, it's
> >   always a good idea to make this argument as small as possible; in
> >   particular, if the buffer contains long lines that shall be truncated
> >   anyway.
> 
> I saw the warnings, but I'm unsure of their validity.
> Here are some benchmarks that I did.  Each form was run on a fresh emacs -Q.
> Apologies in advance if there is something wrong about them:
> 
> ;;; X-LIMIT nil (window width is the limit)
> (benchmark-run 100000
>   (save-window-excursion
>     (with-temp-buffer
>       (set-window-buffer nil (current-buffer))
>       (insert "foo")
                 ^^^
He mean a REALLY long line.  Like thousands of characters.




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

Previous Next


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