From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Prefer to split along the longest edge Date: Thu, 19 Dec 2024 09:52:53 +0100 Message-ID: <2aa16454-560c-4d3b-b3eb-e1b780d1b8d6@gmx.at> References: <87r06a3yfg.fsf@mail.linkov.net> <87zfkx2ydr.fsf@mail.linkov.net> <8734io2hac.fsf@mail.linkov.net> <86pllrpn2p.fsf@gnu.org> <86o71ao47d.fsf@gnu.org> <874j324fni.fsf@gmail.com> <86ttb0kwgt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9417"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: rpluim@gmail.com, juri@linkov.net, emacs-devel@gnu.org To: Eli Zaretskii , =?UTF-8?Q?Nicolas_Despr=C3=A8s?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 19 09:53:30 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tOCHi-0002Fj-8i for ged-emacs-devel@m.gmane-mx.org; Thu, 19 Dec 2024 09:53:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOCHF-0002Lw-Ba; Thu, 19 Dec 2024 03:53:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOCHE-0002Lh-5j for emacs-devel@gnu.org; Thu, 19 Dec 2024 03:53:00 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOCHC-0001DR-E1; Thu, 19 Dec 2024 03:52:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1734598375; x=1735203175; i=rudalics@gmx.at; bh=ey6Ddma3gegZ9/N51UureVMs4bbniZbmAlfpylnJaDs=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=jcQ6rYaPmiS/yx2ODsrak5sXP0bG3TTrnoX9mSXO7qhLsG7gaAkWZQ/ao9NcKuiJ VQhvDYlMtAmLpsIu/M/zD3Il0uTyBQsUyp9PqGyk3YZOJGZ/26Wo6vw/JDhdjfVpP 8hl4bjq6qUQ8pQBxSe6W0kJTmgTWq6jrQg0xgGcqIz8QUIUNox2Ab82XT/yJ2nvbA YsF/Hfn0do2qRRvftujyN/9838m71H2Zz4ObWtfdtlKt22/Nxlq/9qPHwHxSG++NV S8Dvz0pX2Qs5P77kSP/JC/OCcAwU7u2YeovvL7Hr+8YfuOG2b2R1fNlpAWrk1JkJu SBbcnyGWGPz/EWT0aA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([212.95.5.15]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1McpNy-1twhkK3dGU-00bJb9; Thu, 19 Dec 2024 09:52:54 +0100 Content-Language: en-US In-Reply-To: <86ttb0kwgt.fsf@gnu.org> X-Provags-ID: V03:K1:w8H/7UH7u5hDfI0hyPO3LHamMgxt+Hkfaw/UwWWQC54WYrmJ6A7 ZZNKoiJdn4NwjMETlUFhm1Ue2QmK/4VEKJZeP2Yda4oqQDDemIqQb/Dh1cn0diV88Adzd+0 24rcWDxr65RPDRP022HcY8Wr+mTp3Uqym7BVzOZLeN7SAVEv88Rse/hZuyqaP1tZqrrZchm oUlSC4AppOpvnO7ShNRQA== UI-OutboundReport: notjunk:1;M01:P0:Rj89gk+Qj3U=;9OoS8/MwiE2jPbrGQioLYeU3lhi ApZe8zp2FicMKyWaRW9oJc+mW0mFjPrhsiH+PvYTPl6fgZFrVeCjeCcKrM7mjNII51hTpVZ2Y 4jzj4SraKCcFktn6oPIjMdfyBMO0irnn8Lu5IDQJelobEWDLOaANxuNniTi3wSMz8ltIuf8Sf pnkv9OhEpQLzptheqQiw+pNmaSBnvzFpkTQpCyKaVJRirhJ9ny/smw13ylSR+jJFrAT3oRLNT kn59j55pvHb//Go3ur9fSJsSSui5tb98XJq62XjTYLwGJ1biQFiGS5sc559OQW5KgJaccumuS tFmQGnZJ7dNlg28V14uDZt181/u3CRQd0zTttY+0MegQTGyeJihbwU4M/vU4VLVJXRd2xj73m G9AIIL+mI15MVLMdurSwvMkJNjDA9prxs/9r+SzwYrSqetlJnMUHdY+DDyaeKLL6zhsU/0Kn+ QJSckbtJTOORWh47hn/IfBtenJ4gI06L/RvgzbNebCwb6p/xX8jJp5TMk1h6SJydDvAIaTknY +nGV41uaONLAvqLbmY6+Lq85QEO9j3zFVDLtnXRsrm2v7NS+BjMEs8bNSG8Nq3ZalMe9Qo35D p7oeCqXS2HEy3xN3Vv/6KXze/Hb2XDoenu5R2nPArgO1OpJ5aXPKCW7wHivgfymjztlu4B799 /9N21j1adzzuFNUAsrOPCkiHd8epZ0kDrgwr2SGnny/maHrRtr+/uoe6i1IdH4lzXPR+2o5dr 66+q/Mx4FjdSEH45JIjQ0PIrEgjOIzHIo4xy/m6IOo/g/VHkh6OX2PM1PDNcWv/lhEISVpgj Received-SPF: pass client-ip=212.227.17.20; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -38 X-Spam_score: -3.9 X-Spam_bar: --- X-Spam_report: (-3.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326707 Archived-At: > If the split-size threshold of the window dimension determined by > `split-window-preferred-direction' specifies an integer, the > corresponding dimension of WINDOW is at least that large, then first > try splitting window in two along that dimension (one below the other > if splitting vertically, side by side if splitting horizontally). > The relevant threshold is `split-height-threshold' when splitting > vertically, and `split-width-threshold' when splitting horizontally. > If splitting along the preferred dimension fails, try splitting > WINDOW along the other dimension. If that also fails, and WINDOW is > the only window on its frame, try splitting WINDOW vertically > disregarding the value of `split-height-threshold'. > > If splitting succeeds, return the lower window if splitting > vertically, the right one if splitting horizontally. If splitting > fails, return nil. > > Martin, any comments or corrections to the above doc string? It's still hard to read for me. I'd write is as follows: The variable `split-window-preferred-direction' prescribes an order of directions in which Emacs should try to split WINDOW. If that order mandates to start with a vertical split and `split-height-threshold' specifies an integer that is at least as large a WINDOW's height, split WINDOW into two windows one below the other and return the lower one. If that order mandates to start with a horizontal split and `split-width-threshold' specifies an integer that is at least as large as WINDOW's width, split WINDOW into two windows side by side and return the one on the right. In either case, if the first attempt to split WINDOW fails, try to split the window in the other direction in the same manner as described above. If that attempts fail too and WINDOW is the only window on its frame, try splitting WINDOW into two windows one below the other disregarding the value of `split-height-threshold' and return the window on the bottom. Then the doc-string of 'split-window-preferred-direction' should say that its value implies an order of operations 'split-window-sensibly' will try and that that order may depend on the orientation of the frame. While the frame orientation is processed in 'split-window-sensibly', I wouldn't mention it there to avoid describing it twice. BTW the doc-string of 'split-window-preferred-direction' should also say that it applies to 'split-window-sensibly' only and not to any other functions that split windows. martin