Subject: Re: bug#8862: compilation-window-height no good anymore

From: martin rudalics <[email-masked]>
Date: Wed, 15 Jun 2011 16:51:34 +0200

> AFAIK, `enlarge-window' did not signal an error when the size was too
 > large, so I think it's best to keep being silent, for backward
 > compatibility's sake.

OK.  I'll use the maximum possible height for enlarging and
window-min-height/-width for shrinking.  The only cases where I signal
an error are when the window is either fixed-size or the root window.

 > Signalling an error is a good thing, wo while we shouldn't do it for
 > enlarge-window for compatibility reasons, we should do it for the
 > new functions like window-resize.

Good.

 > Such changes to interactive behavior are much less problematic than
 > changes in non-interactive functions, since the first might at worst
 > surprise or disappoint the user, while the second can
 > break functionality.

Agreed.  I tend to discourage using `enlarge-window' in ELisp because it
only works on the selected window leading to things like compile.el's

	 ;; Stef said that doing the saves in this order is safer:
	 (save-excursion
	   (save-selected-window
	     (select-window window)
	     (enlarge-window (- height (window-height))))))))

martin