From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: shrink-window-if-larger-than-buffer in VC-diff Date: Sun, 15 Aug 2010 23:10:07 -0400 Message-ID: <87iq3bs168.fsf@stupidchicken.com> References: <87aaoo7pmj.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1281928219 9226 80.91.229.12 (16 Aug 2010 03:10:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Aug 2010 03:10:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 16 05:10:18 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Okq5Z-00075J-3x for ged-emacs-devel@m.gmane.org; Mon, 16 Aug 2010 05:10:17 +0200 Original-Received: from localhost ([127.0.0.1]:34353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Okq5Y-0001za-HN for ged-emacs-devel@m.gmane.org; Sun, 15 Aug 2010 23:10:16 -0400 Original-Received: from [140.186.70.92] (port=37143 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Okq5S-0001zV-Li for emacs-devel@gnu.org; Sun, 15 Aug 2010 23:10:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Okq5R-0001Bm-LH for emacs-devel@gnu.org; Sun, 15 Aug 2010 23:10:10 -0400 Original-Received: from pantheon-po45.its.yale.edu ([130.132.50.79]:56650) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Okq5R-0001Bh-HI for emacs-devel@gnu.org; Sun, 15 Aug 2010 23:10:09 -0400 Original-Received: from furry (dhcp184-49-148-234.whfp.phl.wayport.net [184.49.148.234]) (authenticated bits=0) by pantheon-po45.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o7G3A7EA009659 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 15 Aug 2010 23:10:07 -0400 Original-Received: by furry (Postfix, from userid 1000) id BED3716D402; Sun, 15 Aug 2010 23:10:07 -0400 (EDT) In-Reply-To: (Juanma Barranquero's message of "Mon, 16 Aug 2010 00:44:35 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:128772 Archived-At: Juanma Barranquero writes: >> I think the shrink-window-if-larger-than-buffer call in vc-diff-finish >> shouldn't be there in the first place. =C2=A0It's well-intentioned, but = even >> in cases less extreme that the above, it can be annoying to resize the >> user's windows. =C2=A0Any objection to removing this call? > > IMHO, such cases should be made optional (perhaps a global variable > covering such uses in many/most/all modes?) instead of removed. I > usually *always* want the shrinking behavior, and rarely reuse the > window. As far as I can tell, the only really good uses of s-w-i-l-t-b occur when the window in question is electric. For permanent windows, the behavior seems poor. Here is another example of it misbehaving, in finder: 1. M-x finder-by-keyword RET 2. C-x 1 3. Go to "tex" and type RET 4. Go to "tex-mode.el" and RET =3D> The upper window, now showing *Finder-package* with an empty commentary, is 4 lines tall (due to s-w-i-l-t-b). 5. C-x o 6. Go to "reftex.el" and RET =3D> The upper window now shows *Finder-package* with a long verbose commentary. But it is still 4 lines tall, and therefore useless. I think the existing non-electric uses of s-w-i-l-t-b need to be reconsidered. Maybe we should change `pop-to-buffer' so that it accepts an option to both shrink *and* grow windows. Then people who want their windows to resize automagically can use this option, and have it work more reliably than it does now. (The default should be to avoid resizing at all.)