GNU bug report logs -
#16351
24.3.50; `balance-windows' has no effect after (menu-bar-mode -1)
Previous Next
Reported by: Eduard Wiebe <usenet <at> pusto.de>
Date: Sun, 5 Jan 2014 13:42:02 UTC
Severity: normal
Found in version 24.3.50
Done: martin rudalics <rudalics <at> gmx.at>
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 16351 in the body.
You can then email your comments to 16351 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16351
; Package
emacs
.
(Sun, 05 Jan 2014 13:42:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Eduard Wiebe <usenet <at> pusto.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 05 Jan 2014 13:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Try this:
emacs -Q
M-x menu-bar-mode
C-u 10 C-x 2
C-x +
Last command (`balance-windows') has no effect to window layout.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16351
; Package
emacs
.
(Sun, 05 Jan 2014 16:50:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 16351 <at> debbugs.gnu.org (full text, mbox):
> emacs -Q
> M-x menu-bar-mode
> C-u 10 C-x 2
> C-x +
>
> Last command (`balance-windows') has no effect to window layout.
I couldn't reproduce that here. But the following simpler scenario was
indeed broken:
emacs -Q
C-u 10 C-x 3
C-x +
Hopefully, the fix covers both. Please try again.
Thanks, martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16351
; Package
emacs
.
(Sun, 05 Jan 2014 22:53:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 16351 <at> debbugs.gnu.org (full text, mbox):
martin rudalics <rudalics <at> gmx.at> writes:
>> emacs -Q
>> M-x menu-bar-mode
>> C-u 10 C-x 2
>> C-x +
>>
>> Last command (`balance-windows') has no effect to window layout.
>
> I couldn't reproduce that here.
Hmm, it seems that this is a issue of my current window manager.
With good old twm i can't reproduce that, too.
> But the following simpler scenario was
> indeed broken:
>
> emacs -Q
> C-u 10 C-x 3
> C-x +
>
> Hopefully, the fix covers both. Please try again.
Indeed, this problem (your recipe) is gone. :-)
Thank you Martin.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16351
; Package
emacs
.
(Mon, 06 Jan 2014 17:47:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 16351 <at> debbugs.gnu.org (full text, mbox):
> Hmm, it seems that this is a issue of my current window manager.
> With good old twm i can't reproduce that, too.
This shouldn't be an issue of the window manager. Otherwise, we would
have a very nasty bug.
So if you still can reproduce the bug please proceed as follows:
`balance-windows' has this code
;; Balance vertically.
(window--resize-reset (window-frame window))
(balance-windows-1 window)
(when (window--resize-apply-p frame)
(window-resize-apply frame)
(window--pixel-to-total frame)
(run-window-configuration-change-hook frame))
First change this code to
;; Balance vertically.
(window--resize-reset (window-frame window))
(balance-windows-1 window)
(when (window--resize-apply-p frame)
(unless (window-resize-apply frame)
(ding))
(window--pixel-to-total frame)
(run-window-configuration-change-hook frame))
If Emacs now "dings" we know that the values written by
`balance-windows-1' are wrong. In this case replace the code by
;; Balance vertically.
(window--resize-reset (window-frame window))
(balance-windows-1 window)
(when (window--resize-apply-p frame)
(unless (window-resize-apply frame)
(message
"%s"
(list (cons (window-pixel-height) (window-new-pixel))
(cons (window-pixel-height (window-in-direction 'below))
(window-new-pixel (window-in-direction 'below)))
(cons (window-pixel-height (window-parent))
(window-new-pixel (window-parent))))))
(window--pixel-to-total frame)
(run-window-configuration-change-hook frame))
invoke C-x + from the _upper_ window and post the value written by
`message' here (just copy it from the buffer *Messages*).
Thanks, martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16351
; Package
emacs
.
(Tue, 07 Jan 2014 05:22:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 16351 <at> debbugs.gnu.org (full text, mbox):
Hi Martin and Eduard,
I observe a similar problem with three windows , even including the fix
in Martin’s commit from Sun Jan 5 17:29:44 2014 +0100 ("In
balance-windows add mising t to fix Bug#16351.")
A minimal recipe is:
emacs -Q
C-x 2 C-x 2
C-x +
(no effect).
I’ve run Martin’s diagnostic code from his message of Mon, 06 Jan 2014
18:46:31 +0100; this is the output I get:
((232 . 345) (253 . 322) (968 . 968))
Thanks,
Aaron
PS it seems to work fine if there are only two windows.
--
Aaron Ecay
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16351
; Package
emacs
.
(Tue, 07 Jan 2014 11:52:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 16351 <at> debbugs.gnu.org (full text, mbox):
> A minimal recipe is:
>
> emacs -Q
> C-x 2 C-x 2
> C-x +
> (no effect).
Arrrgh. I'll check in a fix later today. If you want to try it
now, do the below. Eduard: This should fix your problem as well.
Thanks, martin
=== modified file 'lisp/window.el'
--- lisp/window.el 2014-01-05 16:29:44 +0000
+++ lisp/window.el 2014-01-07 11:41:17 +0000
@@ -4541,7 +4541,7 @@
(setq sub first)
(while (and sub (> rest 0))
(unless (window--resize-child-windows-skip-p window)
- (set-window-new-pixel sub char-size t)
+ (set-window-new-pixel sub (min rest char-size) t)
(setq rest (- rest char-size)))
(setq sub (window-right sub)))
@@ -4550,7 +4550,7 @@
(setq sub first)
(while (and sub (> rest 0))
(unless (eq (window-new-normal sub) 'ignore)
- (set-window-new-pixel sub char-size t)
+ (set-window-new-pixel sub (min rest char-size) t)
(setq rest (- rest char-size)))
(setq sub (window-right sub)))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16351
; Package
emacs
.
(Tue, 07 Jan 2014 17:32:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 16351 <at> debbugs.gnu.org (full text, mbox):
> Arrrgh. I'll check in a fix later today. If you want to try it
> now, do the below. Eduard: This should fix your problem as well.
Should be fixed now with revision 115912.
Thanks again, martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16351
; Package
emacs
.
(Tue, 07 Jan 2014 20:06:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 16351 <at> debbugs.gnu.org (full text, mbox):
Hello Martin and Aaron,
and sorry for delay.
>> Arrrgh. I'll check in a fix later today. If you want to try it
>> now, do the below. Eduard: This should fix your problem as well.
>
> Should be fixed now with revision 115912.
Yeh! The issue is solved.
Thank you both.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16351
; Package
emacs
.
(Wed, 08 Jan 2014 07:07:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 16351 <at> debbugs.gnu.org (full text, mbox):
Hello,
2014ko urtarrilak 7an, Eduard Wiebe-ek idatzi zuen:
>
> Yeh! The issue is solved.
>
> Thank you both.
Fixed here as well. Thanks for the quick patch.
--
Aaron Ecay
Reply sent
to
martin rudalics <rudalics <at> gmx.at>
:
You have taken responsibility.
(Sat, 11 Jan 2014 10:25:04 GMT)
Full text and
rfc822 format available.
Notification sent
to
Eduard Wiebe <usenet <at> pusto.de>
:
bug acknowledged by developer.
(Sat, 11 Jan 2014 10:25:05 GMT)
Full text and
rfc822 format available.
Message #34 received at 16351-done <at> debbugs.gnu.org (full text, mbox):
> Fixed here as well. Thanks for the quick patch.
OK, closing.
Thanks for the report, martin
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 08 Feb 2014 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 137 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.