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


View this message in rfc822 format

From: Paul Rankin <hello <at> paulwrankin.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24193 <at> debbugs.gnu.org, rudalics <at> gmx.at
Subject: bug#24193: 25.1; `window-min-size' fails for horizontal width when margins >= body text
Date: Wed, 10 Aug 2016 01:18:32 +1000
Eli Zaretskii <eliz <at> gnu.org> on Tue, 09 Aug 2016 17:56 +0300:
> 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.

On the one hand, splitting an 80 column wide window naturally halves the
window width, and as such the minimum margin width should also be
halved, so window-min-size is not calculating a logical minimum size.

On the other hand, I kinda just wanna say whatever 24.5 was, because it
worked perfectly there and now it's broken. It's hard to see that as
anything but a regression.

> 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?

No this is nuts. To go from perfectly working behaviour in Emacs 24.5 to
a refusal to function and an ambiguous error message is not what any
user should expect.

"Window #<window 1 on *scratch*> too small for splitting (2)" implies
that the window is 2 columns wide, which is confusing, but the 2 is
actually just the code author's numbering of error messages. Again, not
what the user expects.

Eli Zaretskii <eliz <at> gnu.org> on Tue, 09 Aug 2016 17:57 +0300:
> If you have ideas for how to solve this, please tell.

The gfycat.com link shows the behaviour in 24.5, which works perfectly.
I'd urge a rollback to the relevant 24.5 code here to prevent this bug
going into the 25.1 release.

I understand Emacs is very code-centric, but many people use it also for
prose writing, and there are several prose packages that set the window
margins in this same way... olivetti, writeroom-mode, darkroom- mode,
visual-fill-column... I haven't tested these all but predict a few
related bugs...




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.