bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: martin rudalics
Subject: bug#8862: compilation-window-height no good anymore
Date: Wed, 15 Jun 2011 16:51:34 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]