From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#11810: 24.1.50; `vc-diff' shrinks pre-existing window Date: Sat, 30 Jun 2012 02:39:33 +0400 Message-ID: <4FEE2EA5.5060905@yandex.ru> References: <4FECAF0F.1080307@yandex.ru> <4FED556A.4060702@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1341009591 10753 80.91.229.3 (29 Jun 2012 22:39:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 29 Jun 2012 22:39:51 +0000 (UTC) Cc: Andreas Schwab , 11810@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 30 00:39:50 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Skjqv-0008ED-Fj for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jun 2012 00:39:49 +0200 Original-Received: from localhost ([::1]:36633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Skjqv-00019e-Eg for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Jun 2012 18:39:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Skjqr-00019X-Kh for bug-gnu-emacs@gnu.org; Fri, 29 Jun 2012 18:39:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Skjqp-0006R9-JW for bug-gnu-emacs@gnu.org; Fri, 29 Jun 2012 18:39:45 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56606) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Skjqp-0006R4-8u for bug-gnu-emacs@gnu.org; Fri, 29 Jun 2012 18:39:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Skjv0-0007HB-HY for bug-gnu-emacs@gnu.org; Fri, 29 Jun 2012 18:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Jun 2012 22:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11810 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11810-submit@debbugs.gnu.org id=B11810.134100983927951 (code B ref 11810); Fri, 29 Jun 2012 22:44:02 +0000 Original-Received: (at 11810) by debbugs.gnu.org; 29 Jun 2012 22:43:59 +0000 Original-Received: from localhost ([127.0.0.1]:37919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Skjux-0007Gm-2l for submit@debbugs.gnu.org; Fri, 29 Jun 2012 18:43:59 -0400 Original-Received: from forward5.mail.yandex.net ([77.88.46.21]:42137) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Skjus-0007Gc-OE for 11810@debbugs.gnu.org; Fri, 29 Jun 2012 18:43:57 -0400 Original-Received: from smtp1.mail.yandex.net (smtp1.mail.yandex.net [77.88.46.101]) by forward5.mail.yandex.net (Yandex) with ESMTP id 03AEF12017F6; Sat, 30 Jun 2012 02:39:32 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1341009573; bh=lSxRf0UrMEw+X5qDY8Mj6OXLcnMGGR9M4TrWB/D0wzw=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=lcBwwn2HBZu3ZexNnXym8jPeDvHX4F1kgOvtYFoLzxjq4SmuHVD/z/wiHl2ScKPim eAVr655mA9Jlv7GSSo1X/6lg/MfDQAdAz1wpYAYnRfGet/VJfb4ZzzXgna6Tw653QE EXLN2MHDrhQp7zXlw8aWzyBia9JLmuS5QIllfOxc= Original-Received: from smtp1.mail.yandex.net (localhost [127.0.0.1]) by smtp1.mail.yandex.net (Yandex) with ESMTP id C45E1AA056E; Sat, 30 Jun 2012 02:39:32 +0400 (MSK) Original-Received: from 98-87.nwlink.spb.ru (98-87.nwlink.spb.ru [178.252.98.87]) by smtp1.mail.yandex.net (nwsmtp/Yandex) with ESMTP id dWAu4lbE-dWAWS1WR; Sat, 30 Jun 2012 02:39:32 +0400 X-Yandex-Rcpt-Suid: rudalics@gmx.at X-Yandex-Rcpt-Suid: 11810@debbugs.gnu.org X-Yandex-Rcpt-Suid: schwab@linux-m68k.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1341009572; bh=lSxRf0UrMEw+X5qDY8Mj6OXLcnMGGR9M4TrWB/D0wzw=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=eJ57IYi3VaXKPIsPH32ERRUVAq7VhCKyH2jwk/ZOdCFd1ZeINcjqtz8G7sgWQxwHG zM+gs+1eVQs+Ks8PUIpDT+6QrLDf7n7Zhz1EhJ6YD7CwJ+5XiA+lXJNHrPCxI5+s+k BhzKaibQKuhnEJbQ0TKnNbAqm5KbCzpkaKblRo4c= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: <4FED556A.4060702@gmx.at> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61427 Archived-At: Hi Martin, On 29.06.2012 11:12, martin rudalics wrote: > > Commands messing up existing window configuration is one of my top > > Emacs annoyances, and AFAIK it confuses the new users, too. > > Maybe nil check for (window-prev-buffers) should be instead included in > > `shrink-window-if-larger-than-buffer', with a way to override it? > > This problem has been previously discussed here > > http://lists.gnu.org/archive/html/emacs-devel/2010-08/msg00638.html > > If people want an option here, please decide on > > - the values it should take, and > > - how to meld it with `temp-buffer-resize-mode'. I think renaming and reusing `even-window-heights' is a good thing to do. I'd even suggest changing the default value, because, as you can see, virtually nobody among users knows about this variable: http://stackoverflow.com/questions/4716855/how-can-i-prevent-emacs-resizing-my-windows (Usually folks at SO give fairly comprehensive answers). And personally, I'd have been very happy to know about it about 1-2 years ago, before `pop-to-window' behavior strongly conditioned me against manually resizing windows. I don't think I've ever used `temp-buffer-resize-mode', but if it's a minor mode that a user has to enable explicitly, it should be fine if it overrides the value of `resize-windows-for-display'. Please note that `temp-buffer-resize-mode' already does the sane thing: it only resizes the window if the window is new and not reused. To answer you question in the last message: >> ! (let ((resize-windows-for-display nil)) >> ! (pop-to-buffer (current-buffer))) > > Here you explicitly override the user option - is that intentional? It's intentional, because `vc-diff-internal' calls `pop-to-buffer' before the diff command returns its full output, so the window height adjustment happens in `vc-diff-finish' which runs after the process returns. So you might want to account for this usage. Regarding "two similar approaches", I think just having an off by default `even-window-heights` variable and `temp-buffer-resize-mode' may satisfy more or less everyone, except there'd at least need to be a way to make shrinking asynchronous, as per above. -- Dmitry