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: martin rudalics <rudalics <at> gmx.at>
To: Joost Kremers <joostkremers <at> fastmail.fm>
Cc: 19972 <at> debbugs.gnu.org
Subject: bug#19972: 24.4; Font size change doesn't update (window-total-width)
Date: Mon, 02 Mar 2015 18:09:40 +0100
[Message part 1 (text/plain, inline)]
> Here are the results from the calls to `window--dump-frame` (done on
> Emacs 25.0.50.1):

Thanks.  Presumably with a maximized frame.

> ========== one ==============================
> right before `face-spec-recalc'
>
> frame pixel: 1920 x 971   cols/lines: 240 x 57   units: 8 x 17
> frame text pixel: 1888 x 971   cols/lines: 236 x 57
> tool: 0  scroll: 16/0  fringe: 16  border: 0  right: 0  bottom: 0
>
> #<window 3 on *ielm*>   parent: nil
> pixel left: 0   top: 0   size: 1920 x 954   new: 0
> char left: 0   top: 0   size: 240 x 56   new: 0

240 is the "old" total width of your window.

> normal: 1.0 x 1.0   new: 0
> body pixel: 1888 x 937   char: 236 x 55
> width left fringe: 8  left margin: 0  right margin: 0
> width right fringe: 8  scroll-bar: 16  divider: 0
> height header-line: 0  mode-line: 17  divider: 0
>
> #<window 4 on  *Minibuf-0*>   parent: nil
> pixel left: 0   top: 954   size: 1920 x 17   new: 0
> char left: 0   top: 56   size: 1920 x 1   new: 0
> normal: 1.0 x 1.0   new: 0
> body pixel: 1888 x 17   char: 236 x 1
> width left fringe: 8  left margin: 0  right margin: 0
> width right fringe: 8  scroll-bar: 16  divider: 0
> height header-line: 0  mode-line: 0  divider: 0
>
> =============================================
>
> ========== two ==============================
> right after `face-spec-recalc`
>
> frame pixel: 1920 x 971   cols/lines: 192 x 46   units: 10 x 21
> frame text pixel: 1888 x 971   cols/lines: 188 x 46

Here we see the new default font set to 10 x 21, the various frame sizes
remain unaltered as you observed.

> tool: 0  scroll: 16/0  fringe: 16  border: 0  right: 0  bottom: 0
>
> #<window 3 on *ielm*>   parent: nil
> pixel left: 0   top: 0   size: 1920 x 950   new: 950
> char left: 0   top: 0   size: 240 x 45   new: 56

The total width of your window remained unaltered at 240.  Clearly the
bug you observed.

> normal: 1.0 x 1.0   new: ignore
> body pixel: 1888 x 929   char: 188 x 44
> width left fringe: 8  left margin: 0  right margin: 0
> width right fringe: 8  scroll-bar: 16  divider: 0
> height header-line: 0  mode-line: 21  divider: 0
>
> #<window 4 on  *Minibuf-0*>   parent: nil
> pixel left: 0   top: 950   size: 1920 x 21   new: 0
> char left: 0   top: 45   size: 1920 x 1   new: 0
> normal: 1.0 x 1.0   new: 0
> body pixel: 1888 x 21   char: 188 x 1
> width left fringe: 8  left margin: 0  right margin: 0
> width right fringe: 8  scroll-bar: 16  divider: 0
> height header-line: 0  mode-line: 0  divider: 0
>
> =============================================
>
> ========== three ============================
> after doing `C-x 3` + `C-x 1`
>
> frame pixel: 1920 x 971   cols/lines: 192 x 46   units: 10 x 21
> frame text pixel: 1888 x 971   cols/lines: 188 x 46
> tool: 0  scroll: 16/0  fringe: 16  border: 0  right: 0  bottom: 0
>
> #<window 3 on *ielm*>   parent: nil
> pixel left: 0   top: 0   size: 1920 x 950   new: 960
> char left: 0   top: 0   size: 192 x 45   new: 96

The total width got updated now to 192 as you observed.

> normal: 1.0 x 1.0   new: 0.5
> body pixel: 1888 x 929   char: 188 x 44
> width left fringe: 8  left margin: 0  right margin: 0
> width right fringe: 8  scroll-bar: 16  divider: 0
> height header-line: 0  mode-line: 21  divider: 0
>
> #<window 4 on  *Minibuf-0*>   parent: nil
> pixel left: 0   top: 950   size: 1920 x 21   new: 0
> char left: 0   top: 45   size: 192 x 1   new: 192
> normal: 1.0 x 1.0   new: 0
> body pixel: 1888 x 21   char: 188 x 1
> width left fringe: 8  left margin: 0  right margin: 0
> width right fringe: 8  scroll-bar: 16  divider: 0
> height header-line: 0  mode-line: 0  divider: 0
>
> =============================================

OK.  The fix for Emacs 25 is attached.  Please try it.

I'm not yet sure whether to fix this for Emacs 24.5 as well.  Basically,
the fix "should" be harmless and resolve a problem not present in Emacs
24.3.  However, wrong values for `window-total-width' or
`window-left-column' should not really harm if they occur _only_ after
setting the default font on a system whose window manager refuses to
resize the Emacs frame as requested.

Thanks, martin
[frame.c.diff (text/plain, attachment)]

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

Previous Next


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