[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51995: 29.0.50; `string-pixel-width' depends on the current window w
From: |
Eli Zaretskii |
Subject: |
bug#51995: 29.0.50; `string-pixel-width' depends on the current window width |
Date: |
Sat, 20 Nov 2021 09:20:51 +0200 |
> From: Brahimi Saifullah <brahimi.saifullah@gmail.com>
> Date: Sat, 20 Nov 2021 02:04:14 -0300
>
>
> emacs -Q
> (string-pixel-width "foo")
> => 24
> (string-pixel-width
> "foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo")
> => 744
> C-x 3 (or reduce the size of the current window some other way)
> (string-pixel-width
> "foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo")
> => 481
> C-x 3
> (string-pixel-width
> "foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo")
> => 225
> And so on. The exact values might vary per system.
>
> The problem is that, when the string's width is larger than the windows'
> width,
> the windows' width is returned, and not the string's.
Why is it useful to measure width of a string that is wider than the
window? Isn't it enough to know that the string is wider than the
window in that case? (This part is not currently documented, but
documenting it is easy.) What is the actual real-life situation where
this is needed?
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width, Brahimi Saifullah, 2021/11/20
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width,
Eli Zaretskii <=
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width, martin rudalics, 2021/11/20
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width, Brahimi Saifullah, 2021/11/20
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width, Brahimi Saifullah, 2021/11/20
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width, Brahimi Saifullah, 2021/11/21
- bug#51995: 29.0.50; `string-pixel-width' depends on the current window width, Brahimi Saifullah, 2021/11/21