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 14:34:20 +0200 Message-ID: <868qsiv3xv.fsf@gnu.org> References: <86a5cyv6vt.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="25412"; 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 13:35:33 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 1tMRMp-0006R5-O2 for ged-emacs-devel@m.gmane-mx.org; Sat, 14 Dec 2024 13:35:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMRLy-0004as-4W; Sat, 14 Dec 2024 07:34:38 -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 1tMRLv-0004ae-2w for emacs-devel@gnu.org; Sat, 14 Dec 2024 07:34:35 -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 1tMRLs-0006uh-Fe; Sat, 14 Dec 2024 07:34:33 -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=jjdkD7pHXZm37zI4UARQigZJq8vUGlyP6ceWzc/B4Us=; b=LlnEAdX/uX/5jZ35Ug5j 6jd8bgGOs1MEP79Mi3p+Lxen80JUSLGDuKWh7JVX8hEJ3BMZ59KtAOQqyJvDIkAV0QXFFP3uH+BPb Dgd08lx/N2LP0DSGuOlX3oekXMHUhnUdprlT0KcqsA0M4J1tlEgs50GKYOBgrzWV3vs1tmgyXeNqC 104kaaw9DlHbouDL5kolSqOTKV9M9J8hhILcIbg1vsfHLXXtw2tuxF95ttm9yWsl+Y4DtOi9zAPag RkG+mvmkM5nDyyHQSD0DyDRVdslj9MljVtw2W2QXsIH9+ka16Fo7pLJ1W2PWm88N5H0Avb7rcoqJx Maxcd2fACVgiHA==; In-Reply-To: (message from Nicolas =?utf-8?Q?Despr=C3=A8s?= on Sat, 14 Dec 2024 12:45:26 +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:326484 Archived-At: > From: Nicolas Desprès > Date: Sat, 14 Dec 2024 12:45:26 +0100 > Cc: martin rudalics , emacs-devel@gnu.org > > On Sat, Dec 14, 2024 at 12:30 PM Eli Zaretskii wrote: > > > From: Nicolas Desprès > > Date: Sat, 14 Dec 2024 11:05:30 +0100 > > > > Currently, `split-window-sensibly' prefers to split vertically, > > disregarding the shape of the frame. This is a good default when > > Emacs is taller than wider. However, when Emacs is in fullscreen > > (landscape screen layout), splitting vertically is generally not the > > thing to do because there is plenty of space on the right. > > > > Typical scenario: Emacs is in fullscreen; one buffer is open in a window > > covering the entire frame. Another buffer is opened in a second > > window (C-x 4 f). In this case, the split should generally be horizontal. > > The attached patch changes `split-window-sensibly' to just try > > spliting the longest edge first. It works well when implemented in my init.el > > and installed by setting `split-window-preferred-function'. > > Why don't the user options split-height-threshold and > split-width-threshold we already have are not enough to allow to have > this without any code changes? > > 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?