From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Prefer to split along the longest edge Date: Sat, 14 Dec 2024 16:55:21 +0200 Message-ID: <86msgytiue.fsf@gnu.org> References: <86a5cyv6vt.fsf@gnu.org> <868qsiv3xv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12210"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at, emacs-devel@gnu.org To: Nicolas =?utf-8?Q?Despr=C3=A8s?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 14 15:56:25 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 1tMTZB-00030F-1r for ged-emacs-devel@m.gmane-mx.org; Sat, 14 Dec 2024 15:56:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMTYI-00009P-16; Sat, 14 Dec 2024 09:55:30 -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 1tMTYG-00009A-3e for emacs-devel@gnu.org; Sat, 14 Dec 2024 09:55:28 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tMTYF-0004ls-N6; Sat, 14 Dec 2024 09:55:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=j5P//dhZ4NGo8WbHmGOeqm3LC+bmcJ2tiq5IyBvqZaM=; b=PR5m6vbup2Y0v5dohKbr bJrJGgu4MMscsBMivmo/qGdowWiYXT8v4U0uHo49nmCazqrRYEofWYYcra64ddBnx9j5E9llcCNh/ WUd3ny1q6Rqwu4jUdtvw7DYcptIrhiGZ/s0nqHV+bGutdQ8VsUKEU1SjxW5Wji/RwKxG/QkDUH3Wk g8G6xb57Ej5zCYU/VfeBrCKiQ2vrRUkLI6+1cgDponcGoJkEGapSzlckWLrxmVZbMGy0v8avdWU1C X6VfsnAswQUWgM0nHR8OpAPSvtqduOHgIQoIDPTTXD+ddB7lfzvyOyYjuMLO7PG/Ov1hQi+xjsePP R+xZKN8lF7MIFA==; In-Reply-To: (message from Nicolas =?utf-8?Q?Despr=C3=A8s?= on Sat, 14 Dec 2024 15:06:40 +0100) 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:326491 Archived-At: > From: Nicolas Desprès > Date: Sat, 14 Dec 2024 15:06:40 +0100 > Cc: rudalics@gmx.at, emacs-devel@gnu.org > > > Because these variables define the minimum size to allow splitting, not the order by which split > orientations > > are tried. > > Sorry, I don't understand: does it mean you are unable to change the > value of split-height-threshold to cause the function to split > horizontally? If so, can you show a recipe? > > I can by setting split-height-threshold to nil, but then it will never split vertically. You can also set it to a large enough value, no? > The current implementation first tries to split vertically. If it fails, it tries to split horizontally then it > falls back to vertical splitting. > > So to split horizontally, it must first fail to split vertically. Yes. > The default threshold values are fine. I just want the default behavior to try the longest edge first. > This way when both splitting would have succeeded (according to their respective threshold value) it will > split first where there is more room. But N columns are not equivalent to N lines. IOW, if you have a window that is (N+1)xN, splitting horizontally is not necessarily TRT.