From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Suggesting `frame-split-biggest-window' Re: customize location and shape of a new window in a frame Date: Fri, 14 Sep 2018 10:31:37 +0200 Message-ID: <5B9B71E9.7050602@gmx.at> References: <9755.9843.306611.23448@gargle.gargle.HOWL> <87y3c7pw4w.fsf@ericabrahamsen.net> <87h8iuik3g.fsf@moondust.localdomain> <87o9d2eaql.fsf@ericabrahamsen.net> <875zzawbd6.fsf_-_@moondust.localdomain> <5B9A1599.2060800@gmx.at> <87r2hxv93k.fsf@moondust.localdomain> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1536913812 11680 195.159.176.226 (14 Sep 2018 08:30:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Sep 2018 08:30:12 +0000 (UTC) Cc: Eric Abrahamsen , emacs-devel@gnu.org, Roland Winkler , Stefan Monnier To: "N. Jackson" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 14 10:30:08 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g0jUN-0002wC-V1 for ged-emacs-devel@m.gmane.org; Fri, 14 Sep 2018 10:30:08 +0200 Original-Received: from localhost ([::1]:50544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0jWU-0000JW-BV for ged-emacs-devel@m.gmane.org; Fri, 14 Sep 2018 04:32:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0jWM-0000JP-Og for emacs-devel@gnu.org; Fri, 14 Sep 2018 04:32:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0jWH-0002cl-KS for emacs-devel@gnu.org; Fri, 14 Sep 2018 04:32:10 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:57639) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g0jWH-0002PN-4c; Fri, 14 Sep 2018 04:32:05 -0400 Original-Received: from [192.168.1.101] ([46.125.249.30]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LsCAp-1fq3Y33e1f-013y2H; Fri, 14 Sep 2018 10:31:48 +0200 In-Reply-To: <87r2hxv93k.fsf@moondust.localdomain> X-Provags-ID: V03:K1:pCU+L/1V9spqpdktHUXdje8gCTo49xUccR+Wp14HvtwbkFjJzuu vPA0BQneTckY53gWPuoEbHf3j3EJisrRtEVTAMwVhaKv/XdH5uIE9MoK/kT18fq798X99aG P7Rt+KvMlPMKzhYDSddMMKkbquYIEd0G0cnvH4OeDjmZerUg2tqP3yk62Ie7eNLprxBYPJL yBXfb76fUUmUCa54vQ2Sg== X-UI-Out-Filterresults: notjunk:1;V01:K0:fX4Sar7UXhE=:n22D+yirVMoHcwHHWm4hj0 TbV0dDlRXkS6M/cQHBt0kqlO3o2m6s3qnPGDwIeBY5z6s3MhpTLzZjB2+nFvNa0nDlY3jZyzc KdWTTAo/up88ikCMv7knXEwJ6bsFp9Eq7lXHrLHQSAPMfGBtE+kGpqZSwwtJnxuk0rN8K0lDK 8ydXdXXpzoLZHWdP4Su5fABJg/tC6b6u7I1xTuJ013r1iTe1iKadRIYecD6obd2HLDpl22oeL up7+uC1ytV/q8Ts6X2/ope5eVgIsFYd2+Rw0d7XnO9DbZf2ve5rCKkNgfM6LphsSE0WyCoqJJ 4TCdUmt1rPXCqwa96bLfXqGCFi034Jr8oQvQtVRb1WoL1kMJtPajqQxYe9bwLQzymaudUwmc2 MucihRbhgM/p19mmc4NIVporIiBeGWk36/MjRXJMROo5Baly18wCk1/FhNGz7QSqrQmw5VjvR CgTnovUvYvyylf7H7A+/euTqoG07IIP9UuKrRUXJar4xGWPk7Qb4TDewwZ6yhpdluR05Fb0x9 k8aKr8kmbUoCeYj0KipOGcvULOcS2dzy972A+4RSlN0GliF76U1qWu++vnmjOl1EdUD8nZP8i w9jWwt6ZBayj9IoXRl4PZcFXO0Mf54PQmrnDyzw79XN/HATJNJkaR3NSIpGMTH78SgYq4jOuV jzP6nSnOTEPjpOBF3SqJgOBsDE6bwa7w6iXuPocFVRlNLnI2RbyelBclSOEWdJRP9spHPLEWE vedhQ8VdEAoUg4TY+Q+yFbmQkNa/L45euAsDDj5wkIWhpZjJ+Em3KCvXc36fmC74thOIwedR X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:229768 Archived-At: >> We have a number of options for that. One of them is the option >> 'split-window-preferred-function' (a misnomer) which is by default set >> to 'split-window-sensibly'. Consult their definitions first. The >> latter's behavior is guided by the options 'split-height-threshold' >> and 'split-width-threshold' (two more misnomers) . Together, these >> should provide a boilerplate for writing your own function which you >> can then put into 'display-buffer-alist'. > > What's missing with these functions is that they start from a given > window. What's needed is functionality that looks at all the windows > on (in?) the frame and chooses which one to split. Specifying such heuristics is non-trivial - 'display-buffer' tries to first split the largest and then the least recently used window. Maybe we should refine 'get-largest-window' in the spirit of 'split-window-sensibly'. But when the latter was introduced, there were a number of complaints because the behavior of 'display-buffer' changed in an unexpected way - people were surprised to suddenly see a window split horizontally. So any changes should be done carefully. Also, some buffer display action functions roughly try to split the window as one at the top or bottom of the frame or the selected one in order to show the buffer there. And you can put a window on any side of a frame by using side windows. All these try to reconcile window splitting and reusing to achieve the intended effect. martin