From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#21100: 25.0.50; quit-restore-window should also retore width, not just height Date: Tue, 21 Jul 2015 19:04:08 +0200 Message-ID: <55AE7B88.2070402@gmx.at> References: <55AE27E7.6030505@gmx.at> <55AE3F51.7030204@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1437498331 29320 80.91.229.3 (21 Jul 2015 17:05:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Jul 2015 17:05:31 +0000 (UTC) Cc: 21100@debbugs.gnu.org To: bruce.connor.am@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 21 19:05:19 2015 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 1ZHayl-000401-Gw for geb-bug-gnu-emacs@m.gmane.org; Tue, 21 Jul 2015 19:05:19 +0200 Original-Received: from localhost ([::1]:60362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHayk-0004eE-Ln for geb-bug-gnu-emacs@m.gmane.org; Tue, 21 Jul 2015 13:05:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHaya-0004UT-KP for bug-gnu-emacs@gnu.org; Tue, 21 Jul 2015 13:05:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHayU-0004Hm-F2 for bug-gnu-emacs@gnu.org; Tue, 21 Jul 2015 13:05:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHayU-0004G2-AB for bug-gnu-emacs@gnu.org; Tue, 21 Jul 2015 13:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZHayT-0008HV-Nj for bug-gnu-emacs@gnu.org; Tue, 21 Jul 2015 13:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Jul 2015 17:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21100 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21100-submit@debbugs.gnu.org id=B21100.143749826131782 (code B ref 21100); Tue, 21 Jul 2015 17:05:01 +0000 Original-Received: (at 21100) by debbugs.gnu.org; 21 Jul 2015 17:04:21 +0000 Original-Received: from localhost ([127.0.0.1]:55625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZHaxp-0008GX-6C for submit@debbugs.gnu.org; Tue, 21 Jul 2015 13:04:21 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:55577) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZHaxm-0008GK-VK for 21100@debbugs.gnu.org; Tue, 21 Jul 2015 13:04:19 -0400 Original-Received: from [62.46.215.113] ([62.46.215.113]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LbyUS-1YYbZg2irk-00jHuu; Tue, 21 Jul 2015 19:04:12 +0200 In-Reply-To: X-Provags-ID: V03:K0:Jf4rHL3olJW225DegMb9Mcavek3vdY5itsPtOHaX7C5SvMSTR5J NOyiRzhwcxo+RnIIgglwIZhPfpskUahSrgU8CFfbuANWHLmLYi4zs9wBeZRW0ul+cjsK5g6 bgU96aYAjqE+phOguN4oCzDwA1/F1Tz4L2P1gT8nrWXXF/NwRWQBuXf+Bevu51anhMeMbsn cY8LNRkmZMhch+E+q/SyA== X-UI-Out-Filterresults: notjunk:1;V01:K0:l9lkIIu26aI=:nFV5p1pqDiJwHAM3inrqOY pjdp6DBxCz6KUz30ORWRd8X7fkiMy5bwMVsJ12kMFZyI7EfzySj92QpqHwepbknjKj/00Tm/0 jjgcQvVlIiqA7vUDvFtotx2y+aDLFOgfkium+zcJIwpiHPsR+KOfPpr432IcgwLxtvatz+wQO sQKT7pQlNKq4b/f4Jr8Pt3oWkipOFGNH+Y+ZmEBMrb8Osepzr0tEa4Dhu8Fqw87PKeBRyeH1Y 71A/deY2/yWmI96B7o68GbAGQ4ARkPdRmFaKmIzu14fyEMd7tA7m/B8qrM40+C0MNchbnqe3D Qzh0ypiE/Y+SGs6+Y00IPrLAzFh8nrzpZQA1W8IBxzxTdX1/JuASPN199VVsUh87H1jQ5kkOZ oGpzRYOgvS/HY+qZwyok0zCfLLn/lXIsGoMjZ5FvS7TVFAJQy3Yw3nvaN4DDkSp8yLsqlaims ZRpag6ZTHpLve0A5oBF6mI8E8dky8BTK6/5sxYDi8jM73/PWitVLp8ubg0BVH0xNwEwvbwz6s ZJ5IFehgF97UUSgd6ike7A8ZDIu8Pq8tqhVMJG3zPHd71R5hBA8H56GmJiJfLIyizoCtD0oWk KhieGkTHntu8UpvjDu1RJEbIruwy+o/Vlrzzu8A3Ihd8f9w2RcNYtZUozGADS55xYetLh74KP 4bGt0Rexmh23OMIQgHJ8qOzVn6ZhBfLBUWCv6MwpZReeOZtKYl1xeojfK/CXfnC9JypA= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:105057 Archived-At: > This was from emacs -Q. On my machine (running Ubuntu), with a > maximized frame, emacs -Q doesn't start in a maximized frame. > increasing the font-size doesn't make the frame > larger. Maybe it's a difference in the OS (I think on Windows if you > increase font-size the frame does get enlarged). Not if it's maximized. I spent some time on the code handling that. > The point is that the combination of font-size and frame-size has to > be such that two windows do not fit side-by-side. In this situation, > Emacs usually creates temp windows below the current window (instead > of to the right). I have no problem resizing my frame so it makes either a new window on the bottom or on the right. The problem is that you are talking about _reusing_ a window on the bottom or the right. > Here's a new recipe to verify what I'm explaining > now. > > 0. Start emacs -Q > 1. Resize the frame so that it is less than 30 columns wide, and at > least 30 lines tall. > 2. Type `C-h f point RET'. > 3. The temp window is created below. > > Now here is an updated recipe for the original behavior I was > describing (the fact that windows are vertically expanded to fit the > help buffer). > > 0. Start emacs -Q > 1. Resize the frame so that it is less than 30 columns wide, and at > least 30 lines tall. > 2. Type `C-- C-5 C-x C-2', to create a tiny window below. > 2. Type `C-h f point RET'. > 3. The temp buffer is displayed in the window you had created, and the > windows size is increased to half the frame. Now I understand. This resizing is due to `even-window-heights' being non-nil by default. If you set that to nil, no resizing is done. Also, with more than two windows, you get no resizing either. This is a very old option, introduced some time before automatic side-by-side splitting was introduced. > 4. If you hit q on that help window, it will return to the original > height of 5 lines. Funny. I never even tested that. >> It's just that I don't know _why_ a reused window would be expanded. >> Can you point me to where in the code this expansion takes place? > > Some edebugging shows me it is done by > `display-buffer-use-some-window', and indeed I see a `window-resize' > in there. The re-resizing should occur in `quit-restore-window' on this line: (window-resize window (- (nth 3 quad) (window-total-height window))) Please check. So what you probably want is a new option `even-window-widths' (or maybe `even-window-sizes') which, if non-nil, does for side-by-side splits the same thing `even-window-heights' does for a below split. And, obviously, `quit-restore-window' should be able to size it back (I have written this part already). Suggestions welcome. martin