GNU bug report logs - #19972
24.4; Font size change doesn't update (window-total-width)

Previous Next

Package: emacs;

Reported by: Joost Kremers <joostkremers <at> fastmail.fm>

Date: Sun, 1 Mar 2015 02:32:02 UTC

Severity: normal

Found in version 24.4

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: joostkremers <at> fastmail.fm, 19972 <at> debbugs.gnu.org
Subject: bug#19972: 24.4; Font size change doesn't update (window-total-width)
Date: Sun, 01 Mar 2015 17:28:49 +0200
> Date: Sun, 01 Mar 2015 16:14:38 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> 
>  > ELISP> (face-spec-recalc 'default (selected-frame))
>  > nil
>  > ELISP> (window-total-width)
>  > 240 (#o360, #xf0, ?ð)
>  >
>  > ;; now press `C-x 3` followed by `C-x 1'
>  >
>  > ELISP> (window-total-width)
>  > 192 (#o300, #xc0, ?À)
>  > ELISP>
>  >
>  > The second call to `window-total-width` returns 240, but it should have
>  > returned 192.
> 
> I must admit that I don't have the faintest idea what `face-spec-recalc'
> is supposed to do.

For the purposes of this discussion, I think the only thing that
matters is that it applies the change in the default face's font.

> Anyway.  Why do you think that `window-total-width' should return 192 in
> the first call?  In principle, face/font changes are supposed to keep
> the number of columns/lines unchanged so returning 240 seems reasonable
> to me.

Indeed.  It does for me.  Could this be something specific to GTK or
the window manager?

Also, I don't understand why the initial value is 240 in the first
place.  By default, "emacs -Q" creates a 80-column window, so I'd
expect window-total-width to return a value slightly larger than 80 (I
get 84 here).

So it sounds like some additional factors are at work here.




This bug report was last modified 7 years and 236 days ago.

Previous Next


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