GNU bug report logs - #33254
26.1.50; Fixed-size windows break 'balance-windows'

Previous Next

Package: emacs;

Reported by: martin rudalics <rudalics <at> gmx.at>

Date: Sun, 4 Nov 2018 10:26:01 UTC

Severity: normal

Found in version 26.1.50

Fixed in version 27.1

Done: npostavs <at> gmail.com

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33254 in the body.
You can then email your comments to 33254 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#33254; Package emacs. (Sun, 04 Nov 2018 10:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 04 Nov 2018 10:26:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Bug-Gnu-Emacs <bug-gnu-emacs <at> gnu.org>
Subject: 26.1.50; Fixed-size windows break 'balance-windows'
Date: Sun, 04 Nov 2018 11:18:02 +0100
[Message part 1 (text/plain, inline)]
I have been informed about the existence of this bug by Akio Burns.
Unfortunately, he has not reacted so far to my request to file a bug
report so I'm sloppily doing this here instead:

With emacs -Q type C-x 2 C-x 2 C-x b RET

This should put you in the *Messages* buffer.  Now do

M-: (setq window-size-fixed t)

followed by

M-: (balance-windows)

Window sizes remain unchanged.  The attached patch should fix that.  I
would like to apply it to the release branch.  Objections?

Thanks, martin
[balance-windows.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33254; Package emacs. (Sun, 04 Nov 2018 13:03:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 33254 <at> debbugs.gnu.org
Subject: Re: bug#33254: 26.1.50; Fixed-size windows break 'balance-windows'
Date: Sun, 04 Nov 2018 15:02:41 +0200
> Date: Sun, 04 Nov 2018 11:18:02 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> 
> With emacs -Q type C-x 2 C-x 2 C-x b RET
> 
> This should put you in the *Messages* buffer.  Now do
> 
> M-: (setq window-size-fixed t)
> 
> followed by
> 
> M-: (balance-windows)
> 
> Window sizes remain unchanged.  The attached patch should fix that.  I
> would like to apply it to the release branch.  Objections?

Rationale?  Isn't this behavior in Emacs since about forever?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33254; Package emacs. (Sun, 04 Nov 2018 13:33:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 33254 <at> debbugs.gnu.org
Subject: Re: bug#33254: 26.1.50; Fixed-size windows break 'balance-windows'
Date: Sun, 04 Nov 2018 14:32:23 +0100
>> With emacs -Q type C-x 2 C-x 2 C-x b RET
>>
>> This should put you in the *Messages* buffer.  Now do
>>
>> M-: (setq window-size-fixed t)
>>
>> followed by
>>
>> M-: (balance-windows)
>>
>> Window sizes remain unchanged.  The attached patch should fix that.  I
>> would like to apply it to the release branch.  Objections?
>
> Rationale?  Isn't this behavior in Emacs since about forever?

No.  It works with Emacs 23.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33254; Package emacs. (Sun, 04 Nov 2018 14:53:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 33254 <at> debbugs.gnu.org
Subject: Re: bug#33254: 26.1.50; Fixed-size windows break 'balance-windows'
Date: Sun, 04 Nov 2018 16:52:24 +0200
> Date: Sun, 04 Nov 2018 14:32:23 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> CC: 33254 <at> debbugs.gnu.org
> 
>  >> With emacs -Q type C-x 2 C-x 2 C-x b RET
>  >>
>  >> This should put you in the *Messages* buffer.  Now do
>  >>
>  >> M-: (setq window-size-fixed t)
>  >>
>  >> followed by
>  >>
>  >> M-: (balance-windows)
>  >>
>  >> Window sizes remain unchanged.  The attached patch should fix that.  I
>  >> would like to apply it to the release branch.  Objections?
>  >
>  > Rationale?  Isn't this behavior in Emacs since about forever?
> 
> No.  It works with Emacs 23.

Still, that's a very long time.  Why is it urgent to fix this in 26.2?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33254; Package emacs. (Sun, 04 Nov 2018 15:47:01 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 33254 <at> debbugs.gnu.org
Subject: Re: bug#33254: 26.1.50; Fixed-size windows break 'balance-windows'
Date: Sun, 04 Nov 2018 16:46:31 +0100
>> No.  It works with Emacs 23.
>
> Still, that's a very long time.  Why is it urgent to fix this in 26.2?

It's not the visible behavior that's disquieting me.  It's rather the
fact that 'balance-windows-1' goes on calculating all sorts of things
and finally 'balance-windows' sumbits a wrongly calculated structure
to 'window-resize-apply' which only gets caught by window_resize_check
at a very, very late stage.  Ideally, window_resize_check would emit a
warning in such a case, but I never got around to write it.

I think the bug happens to users of 'balance-windows' all the time but
they hardly notice because for that it needs at least three windows,
one of them of fixed size.  With my example it's barely noticeable at
all.  Also it's a plain thinko and probably not that urgent so I can
make the change on Emacs 27 only as well.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33254; Package emacs. (Sun, 04 Nov 2018 17:16:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 33254 <at> debbugs.gnu.org
Subject: Re: bug#33254: 26.1.50; Fixed-size windows break 'balance-windows'
Date: Sun, 04 Nov 2018 19:15:22 +0200
> Date: Sun, 04 Nov 2018 16:46:31 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> CC: 33254 <at> debbugs.gnu.org
> 
>  >> No.  It works with Emacs 23.
>  >
>  > Still, that's a very long time.  Why is it urgent to fix this in 26.2?
> 
> It's not the visible behavior that's disquieting me.  It's rather the
> fact that 'balance-windows-1' goes on calculating all sorts of things
> and finally 'balance-windows' sumbits a wrongly calculated structure
> to 'window-resize-apply' which only gets caught by window_resize_check
> at a very, very late stage.  Ideally, window_resize_check would emit a
> warning in such a case, but I never got around to write it.
> 
> I think the bug happens to users of 'balance-windows' all the time but
> they hardly notice because for that it needs at least three windows,
> one of them of fixed size.  With my example it's barely noticeable at
> all.  Also it's a plain thinko and probably not that urgent so I can
> make the change on Emacs 27 only as well.

OK, let's have it one emacs-26.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33254; Package emacs. (Mon, 05 Nov 2018 09:34:01 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 33254 <at> debbugs.gnu.org
Subject: Re: bug#33254: 26.1.50; Fixed-size windows break 'balance-windows'
Date: Mon, 05 Nov 2018 10:33:30 +0100
> OK, let's have it one emacs-26.

Thinking about it twice ...

This bug was hiding another one which is already mentioned in a
comment as

    ;; How can we be sure that `number-of-children' is NOT zero here ?

and in fact making all windows fixed-size would make 'balance-windows'
fail with an arithmetic error.  So the fix is slightly more involved
and I'd rather save that one for master.

Thanks, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33254; Package emacs. (Mon, 05 Nov 2018 15:54:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 33254 <at> debbugs.gnu.org
Subject: Re: bug#33254: 26.1.50; Fixed-size windows break 'balance-windows'
Date: Mon, 05 Nov 2018 17:53:09 +0200
> Date: Mon, 05 Nov 2018 10:33:30 +0100
> From: martin rudalics <rudalics <at> gmx.at>
> CC: 33254 <at> debbugs.gnu.org
> 
> This bug was hiding another one which is already mentioned in a
> comment as
> 
>      ;; How can we be sure that `number-of-children' is NOT zero here ?
> 
> and in fact making all windows fixed-size would make 'balance-windows'
> fail with an arithmetic error.  So the fix is slightly more involved
> and I'd rather save that one for master.

I obviously agree.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33254; Package emacs. (Sat, 08 Dec 2018 08:45:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 33254 <at> debbugs.gnu.org
Subject: Re: bug#33254: 26.1.50; Fixed-size windows break 'balance-windows'
Date: Sat, 08 Dec 2018 09:43:58 +0100
;; fixed 33254 27.1
;; quit

> So the fix is slightly more involved
> and I'd rather save that one for master.

Installed on master.  Bug closed.

martin




bug Marked as fixed in versions 27.1. Request was from martin rudalics <rudalics <at> gmx.at> to control <at> debbugs.gnu.org. (Sat, 08 Dec 2018 08:50:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 33254 <at> debbugs.gnu.org and martin rudalics <rudalics <at> gmx.at> Request was from npostavs <at> gmail.com to control <at> debbugs.gnu.org. (Mon, 27 May 2019 18:47:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 25 Jun 2019 11:24:06 GMT) Full text and rfc822 format available.

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

Previous Next


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