GNU bug report logs - #24193
25.1; `window-min-size' fails for horizontal width when margins >= body text

Previous Next

Package: emacs;

Reported by: Paul Rankin <hello <at> paulwrankin.com>

Date: Tue, 9 Aug 2016 09:15:01 UTC

Severity: normal

Found in version 25.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 24193 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Rankin <hello <at> paulwrankin.com>
Cc: 24193 <at> debbugs.gnu.org
Subject: Re: bug#24193: 25.1;
 `window-min-size' fails for horizontal width when margins >= body text
Date: Tue, 09 Aug 2016 17:56:42 +0300
> From: Paul Rankin <hello <at> paulwrankin.com>
> Date: Tue, 09 Aug 2016 19:14:27 +1000
> 
> There appears to be a change to `window-min-size' that gives an erroneously large minimum horizontal window size when the combined size of window margins exceed that of the body text, e.g. in a frame 80 columns wide, with left margin 20 columns and right margin 20 columns, would return a minimum horizontal size of 42, when body text would be 40. This causes `split-window-right' to fail.
> 
> To reproduce:
> 
> 1. emacs -Q
> 2. in a frame 80 columns wide...
> 3. M-: (set-window-margins nil 20 20)
> 4. C-x 3
>     => "Window #<window 1 on *scratch*> too small for splitting (2)"
> 5. M-: (window-min-size nil t)
>     => 42
> 
> Expected results:
> 
> Window should split horizontally. Minimum window width should not be dictated by margin width.
> 
> Actual results:
> 
> Margin width dictates minimum window width and prevents window splitting.

I don't think I understand what exactly you expected to happen.  In
"emacs -Q" with no margins, "C-x 3" produces 2 windows: one that is
38-column wide, the other 37-column wide.  Since you requested 2
20-column margins, they alone need 40 columns.  How can Emacs produce
a window with such margins out of 38 columns it has at its disposal?
That isn't enough even for the margins, let alone the text area.

In such a situation, I think refusing to split is a reasonable
response: the user asked for something that is not doable.  What
alternative behavior did you expect?

Thanks.




This bug report was last modified 4 years and 317 days ago.

Previous Next


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