GNU bug report logs -
#19194
24.4.50; `window-body-width' is not dynamic relative to font size changes
Previous Next
Reported by: Joe Corneli <holtzermann17 <at> gmail.com>
Date: Wed, 26 Nov 2014 13:48:01 UTC
Severity: normal
Tags: notabug
Merged with 20022
Found in versions 24.4.50, 24.4.90
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Adjusting the font size, I would expect that the window's "body width"
> would change -- more characters can be fit into the same amount of
> screen space. Current behaviour does not match this expectation.
>
> M-: (window-body-width) RET [Note result.]
> C-x C--
> M-: (window-body-width) RET [Result is the same.]
>
> The function is described:
>
> "This function returns the width, in columns, of the body of window
> window."
>
> If for some reason the "nominal" number of columns needs to calculated
> with reference to the default font, then there should be another
> function to return the "actual" number of columns.
The doc-string of `text-scale-adjust' is slightly misleading.
(defun text-scale-adjust (inc)
"Adjust the height of the default face by INC.
AFAICT this does not change the height of the default face - it affects
how the display engine calculates the height of text when displaying a
buffer current at the time `text-scale-adjust' was called.
I'm not sure whether we want to define the size of a window in terms of
the buffer displayed in that window. One consequence of such a change
would be that the sum of the total height of two windows might no more
equal the total height of their parent window.
If we did, we'd need a way to conveniently specify a buffer's default
character width/height. Then we should probably redefine a number of
functions like `shrink-window' or `split-window' to work in terms of
that value. And maybe specify a mode to control that behavior.
> ( I note one practical implication of the underlying issue here:
> https://github.com/kiwanami/emacs-calfw/issues/45 )
If you told me how you get the "adjusted font size", I could tell you
how to scale the value returned by `window-body-width' accordingly.
martin
This bug report was last modified 3 years and 105 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.