* bug#16351: 24.3.50; `balance-windows' has no effect after (menu-bar-mode -1)
@ 2014-01-05 13:39 Eduard Wiebe
2014-01-05 16:48 ` martin rudalics
2014-01-07 5:21 ` bug#16351: balance-windows Aaron Ecay
0 siblings, 2 replies; 10+ messages in thread
From: Eduard Wiebe @ 2014-01-05 13:39 UTC (permalink / raw)
To: 16351
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#16351: 24.3.50; `balance-windows' has no effect after (menu-bar-mode -1)
2014-01-05 13:39 bug#16351: 24.3.50; `balance-windows' has no effect after (menu-bar-mode -1) Eduard Wiebe
@ 2014-01-05 16:48 ` martin rudalics
2014-01-05 22:51 ` Eduard Wiebe
2014-01-07 5:21 ` bug#16351: balance-windows Aaron Ecay
1 sibling, 1 reply; 10+ messages in thread
From: martin rudalics @ 2014-01-05 16:48 UTC (permalink / raw)
To: Eduard Wiebe; +Cc: 16351
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#16351: 24.3.50; `balance-windows' has no effect after (menu-bar-mode -1)
2014-01-05 16:48 ` martin rudalics
@ 2014-01-05 22:51 ` Eduard Wiebe
2014-01-06 17:46 ` martin rudalics
0 siblings, 1 reply; 10+ messages in thread
From: Eduard Wiebe @ 2014-01-05 22:51 UTC (permalink / raw)
To: martin rudalics; +Cc: 16351
martin rudalics <rudalics@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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#16351: 24.3.50; `balance-windows' has no effect after (menu-bar-mode -1)
2014-01-05 22:51 ` Eduard Wiebe
@ 2014-01-06 17:46 ` martin rudalics
0 siblings, 0 replies; 10+ messages in thread
From: martin rudalics @ 2014-01-06 17:46 UTC (permalink / raw)
To: Eduard Wiebe; +Cc: 16351
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#16351: balance-windows
2014-01-05 13:39 bug#16351: 24.3.50; `balance-windows' has no effect after (menu-bar-mode -1) Eduard Wiebe
2014-01-05 16:48 ` martin rudalics
@ 2014-01-07 5:21 ` Aaron Ecay
2014-01-07 11:51 ` martin rudalics
1 sibling, 1 reply; 10+ messages in thread
From: Aaron Ecay @ 2014-01-07 5:21 UTC (permalink / raw)
To: rudalics, usenet, 16351
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#16351: balance-windows
2014-01-07 5:21 ` bug#16351: balance-windows Aaron Ecay
@ 2014-01-07 11:51 ` martin rudalics
2014-01-07 17:31 ` martin rudalics
0 siblings, 1 reply; 10+ messages in thread
From: martin rudalics @ 2014-01-07 11:51 UTC (permalink / raw)
To: Aaron Ecay; +Cc: usenet, 16351
> 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)))
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-01-11 10:24 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-05 13:39 bug#16351: 24.3.50; `balance-windows' has no effect after (menu-bar-mode -1) Eduard Wiebe
2014-01-05 16:48 ` martin rudalics
2014-01-05 22:51 ` Eduard Wiebe
2014-01-06 17:46 ` martin rudalics
2014-01-07 5:21 ` bug#16351: balance-windows Aaron Ecay
2014-01-07 11:51 ` martin rudalics
2014-01-07 17:31 ` martin rudalics
2014-01-07 20:04 ` Eduard Wiebe
2014-01-08 7:06 ` Aaron Ecay
2014-01-11 10:24 ` martin rudalics
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.