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#20189: 25.0.50; Feature request: Alternative split-window-sensibly functions Date: Wed, 25 Mar 2015 09:23:55 +0100 Message-ID: <5512709B.9080003@gmx.at> References: <87iodqbvoz.fsf@gnu.org> <83384uqqao.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1427271936 18369 80.91.229.3 (25 Mar 2015 08:25:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Mar 2015 08:25:36 +0000 (UTC) Cc: 20189@debbugs.gnu.org To: Eli Zaretskii , Tassilo Horn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 25 09:25:26 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 1Yagct-0004mg-IS for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Mar 2015 09:25:23 +0100 Original-Received: from localhost ([::1]:36761 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yagcn-0004JD-Qi for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Mar 2015 04:25:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yagch-0004C6-Lv for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2015 04:25:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YagcZ-0001Ny-PS for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2015 04:25:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YagcZ-0001Nj-M3 for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2015 04:25:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YagcZ-0005SX-Gp for bug-gnu-emacs@gnu.org; Wed, 25 Mar 2015 04:25:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Mar 2015 08:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20189 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20189-submit@debbugs.gnu.org id=B20189.142727184920876 (code B ref 20189); Wed, 25 Mar 2015 08:25:03 +0000 Original-Received: (at 20189) by debbugs.gnu.org; 25 Mar 2015 08:24:09 +0000 Original-Received: from localhost ([127.0.0.1]:35585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yagbh-0005Qe-AC for submit@debbugs.gnu.org; Wed, 25 Mar 2015 04:24:09 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:56117) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yagbe-0005Py-Os for 20189@debbugs.gnu.org; Wed, 25 Mar 2015 04:24:08 -0400 Original-Received: from [178.189.204.62] ([178.189.204.62]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0Lip2P-1ZDbr03vNl-00czBy; Wed, 25 Mar 2015 09:24:00 +0100 In-Reply-To: <83384uqqao.fsf@gnu.org> X-Provags-ID: V03:K0:fEYEPC0QToDKzsPKUOBNCWzQcT1ghK5zqDc7Z8mUavn1E08MoZQ o1i/zEswd5+DZWARBMcE6MY4rPVplHZHt+OuY8rfrVseLxbDTkVQDJkz4dnEtzd6wEeHIF7 atDH9qNyeRaDAOPEc+TrON/k7C5B3eIVTQe2GFY74gw3q8ZrMQ0jQiPNou/JB5vp5Fi4Nu0 FNJTO+GJgWweo2S2sYtCQ== X-UI-Out-Filterresults: notjunk:1; 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:100916 Archived-At: > My understanding of the current logic is that 'display-buffer' is > generally used for short-lived windows that are intended to be deleted > a short time after the split. `display-buffer' is, for example, used in `find-file-other-window' so it's also used for making long-lived windows. >> (1) That version would prefer horizontal splits as above. >> >> (2) I want either horizontal or vertical splitting but not both, i.e., >> the layout should always be Nx1 or 1xN windows. >> >> (3) A window may get split horizontally not if it's wider/taller than >> `split-width-threshold'/`split-height-threshold' but instead when >> its width/height *after* the split followed by `balance-windows' >> is larger than or equal to (/ split-{width,height}-threshold 2). >> >> (4) The single-window exception of `split-height-threshold' still >> holds, so in frames with just one window a vertical split is >> performed even though that window is actually too small according >> to the rules above. > > Maybe I misunderstand, but doesn't (2) contradict (1)? I don't think so. Tassilo just prefers side-by-side windows, if the frame dimensions permit them. > And why is (1) a good idea anyway? Why not have a more optimal split, > whereby (for example) the larger dimension is preferred? `display-buffer' proposes to split the largest window first. This choice cannot be influenced by `split-window-preferred-function'. Although the latter may deliberately try to split another window instead. > It is also possible that in some cases the caller of > split-window-sensibly could provide the requested dimensions in > advance. The `window-width' and `window-height' alist members of `display-buffer' can be used to provide them. martin