all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* even-window-heights
@ 2011-09-23  2:20 Chong Yidong
  2011-09-23  8:26 ` even-window-heights martin rudalics
  0 siblings, 1 reply; 8+ messages in thread
From: Chong Yidong @ 2011-09-23  2:20 UTC (permalink / raw)
  To: Martin Rudalics; +Cc: emacs-devel

This variable's docstring says:

  If non-nil `display-buffer' will try to even window heights.
  Otherwise `display-buffer' will leave the window configuration alone.
  Heights are evened only when `display-buffer' chooses a window that
  appears above or below the selected window.

And the manual says something similar.  But in fact the windows are
evened only if the new window is shorter than the selected window.

This has been the case since

  revno: 88578
  committer: Martin Rudalics <rudalics@gmx.at>
  timestamp: Sat 2008-06-14 08:58:07 +0000
  message:
    (window--even-window-heights): Even window heights
    only if the selected window is higher than WINDOW.

which has no ChangeLog or further explanation.

Martin, do you remember why you made this change?



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: even-window-heights
  2011-09-23  2:20 even-window-heights Chong Yidong
@ 2011-09-23  8:26 ` martin rudalics
  2011-09-23 22:54   ` even-window-heights Chong Yidong
  0 siblings, 1 reply; 8+ messages in thread
From: martin rudalics @ 2011-09-23  8:26 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

 > This variable's docstring says:
 >
 >   If non-nil `display-buffer' will try to even window heights.
 >   Otherwise `display-buffer' will leave the window configuration alone.
 >   Heights are evened only when `display-buffer' chooses a window that
 >   appears above or below the selected window.
 >
 > And the manual says something similar.  But in fact the windows are
 > evened only if the new window is shorter than the selected window.

Indeed.  Do you think it needs an explanation?

 > This has been the case since
 >
 >   revno: 88578
 >   committer: Martin Rudalics <rudalics@gmx.at>
 >   timestamp: Sat 2008-06-14 08:58:07 +0000
 >   message:
 >     (window--even-window-heights): Even window heights
 >     only if the selected window is higher than WINDOW.
 >
 > which has no ChangeLog or further explanation.
 >
 > Martin, do you remember why you made this change?

Bug#410 constituting a regression from the original C behavior.  See

http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-06/msg00166.html

I added a bug reference to the ChangeLog entry (which BTW _did_ exist).

martin



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: even-window-heights
  2011-09-23  8:26 ` even-window-heights martin rudalics
@ 2011-09-23 22:54   ` Chong Yidong
  2011-09-24  8:22     ` even-window-heights martin rudalics
  0 siblings, 1 reply; 8+ messages in thread
From: Chong Yidong @ 2011-09-23 22:54 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

martin rudalics <rudalics@gmx.at> writes:

>> And the manual says something similar.  But in fact the windows are
>> evened only if the new window is shorter than the selected window.
>
> Indeed.  Do you think it needs an explanation?

The problem is that variable name contradicts the behavior, so I'm not
sure a docstring change is enough.

I think this should be like `resize-mini-windows': make a new value
`grow-only' (the default) which means the current behavior, and any
other non-nil value would be the behavior you originally implemented,
i.e. both growing and shrinking allowed.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: even-window-heights
  2011-09-23 22:54   ` even-window-heights Chong Yidong
@ 2011-09-24  8:22     ` martin rudalics
  2011-09-24 11:23       ` even-window-heights Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: martin rudalics @ 2011-09-24  8:22 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

 > The problem is that variable name contradicts the behavior, so I'm not
 > sure a docstring change is enough.

I profoundly dislike this option.  In particular, I don't understand why
a window should be resized only if it's adjacent to the selected one.
Moreover, the adjacency test is inherently wrong for slightly more
complex window layouts.  And, if there are other windows in the same
combination, some of these might shrink or grow instead of the selected
one.

 > I think this should be like `resize-mini-windows': make a new value
 > `grow-only' (the default) which means the current behavior, and any
 > other non-nil value would be the behavior you originally implemented,
 > i.e. both growing and shrinking allowed.

I'd rather make this variable obsolete instead.  It's a relict from a
time when a frame used to contain at most two windows ...

martin



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: even-window-heights
  2011-09-24  8:22     ` even-window-heights martin rudalics
@ 2011-09-24 11:23       ` Eli Zaretskii
  2011-09-24 12:30         ` even-window-heights martin rudalics
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2011-09-24 11:23 UTC (permalink / raw)
  To: martin rudalics; +Cc: cyd, emacs-devel

> Date: Sat, 24 Sep 2011 10:22:20 +0200
> From: martin rudalics <rudalics@gmx.at>
> Cc: emacs-devel@gnu.org
> 
> I'd rather make this variable obsolete instead.  It's a relict from a
> time when a frame used to contain at most two windows ...

If it goes obsolete, what are the replacements available for
requesting the same behavior?

My use case is a frame with 2 windows, one below the other.  The upper
one is larger and shows the source file I'm editing, while the lower
one is used to compose ChangeLog entries, run compilation and Grep,
show *Help*, etc.  I want this lower window to keep its height when I
switch to another buffer there, or when Emacs pops a different buffer
there.

TIA



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: even-window-heights
  2011-09-24 11:23       ` even-window-heights Eli Zaretskii
@ 2011-09-24 12:30         ` martin rudalics
  2011-09-24 13:51           ` even-window-heights Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: martin rudalics @ 2011-09-24 12:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: cyd, emacs-devel

 > My use case is a frame with 2 windows, one below the other.  The upper
 > one is larger and shows the source file I'm editing, while the lower
 > one is used to compose ChangeLog entries, run compilation and Grep,
 > show *Help*, etc.  I want this lower window to keep its height when I
 > switch to another buffer there, or when Emacs pops a different buffer
 > there.

Yours would be the default behavior.  Any behavior changing window
sizes would be requested explicitly via an argument or an option.

martin



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: even-window-heights
  2011-09-24 12:30         ` even-window-heights martin rudalics
@ 2011-09-24 13:51           ` Eli Zaretskii
  2011-09-24 18:49             ` even-window-heights martin rudalics
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2011-09-24 13:51 UTC (permalink / raw)
  To: martin rudalics; +Cc: cyd, emacs-devel

> Date: Sat, 24 Sep 2011 14:30:37 +0200
> From: martin rudalics <rudalics@gmx.at>
> CC: cyd@stupidchicken.com, emacs-devel@gnu.org
> 
>  > My use case is a frame with 2 windows, one below the other.  The upper
>  > one is larger and shows the source file I'm editing, while the lower
>  > one is used to compose ChangeLog entries, run compilation and Grep,
>  > show *Help*, etc.  I want this lower window to keep its height when I
>  > switch to another buffer there, or when Emacs pops a different buffer
>  > there.
> 
> Yours would be the default behavior.  Any behavior changing window
> sizes would be requested explicitly via an argument or an option.

Thanks, I'm happy now.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: even-window-heights
  2011-09-24 13:51           ` even-window-heights Eli Zaretskii
@ 2011-09-24 18:49             ` martin rudalics
  0 siblings, 0 replies; 8+ messages in thread
From: martin rudalics @ 2011-09-24 18:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: cyd, emacs-devel

 > Thanks, I'm happy now.

No fear.  Such a change won't happen soon.  I only wanted to express my
doubts whether we should invest work in refining this option.

martin



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-09-24 18:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-23  2:20 even-window-heights Chong Yidong
2011-09-23  8:26 ` even-window-heights martin rudalics
2011-09-23 22:54   ` even-window-heights Chong Yidong
2011-09-24  8:22     ` even-window-heights martin rudalics
2011-09-24 11:23       ` even-window-heights Eli Zaretskii
2011-09-24 12:30         ` even-window-heights martin rudalics
2011-09-24 13:51           ` even-window-heights Eli Zaretskii
2011-09-24 18:49             ` even-window-heights 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.