From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Nicolas_Despr=C3=A8s?= Newsgroups: gmane.emacs.devel Subject: Re: Prefer to split along the longest edge Date: Sat, 14 Dec 2024 12:45:26 +0100 Message-ID: References: <86a5cyv6vt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f4f67d0629397daf" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13788"; mail-complaints-to="usenet@ciao.gmane.io" Cc: martin rudalics , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 14 12:47:03 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 1tMQbv-0003RC-8C for ged-emacs-devel@m.gmane-mx.org; Sat, 14 Dec 2024 12:47:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMQb7-0003Xg-Dd; Sat, 14 Dec 2024 06:46:13 -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 1tMQb2-0003XJ-Ke for emacs-devel@gnu.org; Sat, 14 Dec 2024 06:46:11 -0500 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tMQb0-0007IY-Sn; Sat, 14 Dec 2024 06:46:08 -0500 Original-Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3863c36a731so1784920f8f.1; Sat, 14 Dec 2024 03:46:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734176763; x=1734781563; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rzdQBYp0o5mxgrEFahBnsnUnqgIbPfS2rconzetR8cg=; b=li4aCmrI0MbZnvryAwrnT9Wc8KgjlEGZpTjuegrFHqM/1lcnEmyeZmPbnFHkplTbfH FVCOVx1qfTaZHS2sWBj8lgQktySNXWAOQ95hgZT93bGjchjDnOeLIM2PazyOcQzEBImG 70PYI0PExKq4O7WWmU15hdF1eZwRGzIKBeWzjejD44y886IinJ6I3EV/VYiEZeIRcKsN GbjyclBq5NI8EqRvj8xrKEo9dXC03oHVr9Sm1tOGWGi+NMEQ0ReAEiVKZ31/H1iffECI EWliQnd+6JCXG3aAgfPqfxkSDFCDgDh1XCcswSUY7rAFbr1FGSX4eqUPZcolJn79/NDz sUTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734176763; x=1734781563; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rzdQBYp0o5mxgrEFahBnsnUnqgIbPfS2rconzetR8cg=; b=tgK9NjTMgx39W2BWAmAhjjZE99Kx4gwVIzQY4rLhouYoo/YNEW/QbqAnn76Kzoh4D8 K8iHqLN/vvJS5uSaaIPMnlEwgE/NJ92SmxHdi0F7pRtuvVWGNrstBJs3Czl1rimFuvPo /b5Zx4YUph+NQOQhowuJjCxbVEP5kxW2rrHyjSCFah7OgpUYpJLLTp47zf6KF69UhyO5 ATD0/+sYmI6uCiWExv0MQQAhLTmYbYxSRRgxNu37vF8Gs1AI8SnbmeIbXREcXM7896ML 84NrN4k8SLxVQGiiljn1aiLBCD3k1iSrB5pHdZpPPnn246lF72NZisMyKtk5sIXD2Uwe 6WwA== X-Forwarded-Encrypted: i=1; AJvYcCWvcbdgdAmZl9Qzu/5ek3ZxBfBn7sInE1wJ1B99WKs0TuSxE728Zr0xkn6qCBaZRBQBtdTLoaMWczrZ/w==@gnu.org X-Gm-Message-State: AOJu0YwTmDWAXnSUTF0RcaDSs4aYKbTBMKu8L9ZDHkGeVKnI3LmCJFbf Q+FhBK6kGP7qEFgiNTSNuTj7xWCSIaV+YkV7gC2KHhtqg8lSXXqncUBAI6mxqw4rmyH3Cp8JBlE h034XqkZH4poTgLrW4xDXn1fkh4/EVw== X-Gm-Gg: ASbGnctJ0g0ARnzcqIPKm+7k8m9n7LlvlC+u2UH2j3fF3mIqg3M4JWyXnImwpjznJFM XHwGL+yhF/tTV0sK92ooSUx/42UTjfaNEo4KGrCA= X-Google-Smtp-Source: AGHT+IFoyeRdYz587g3CWXPbF09m61ZX3FcZzp+wSEhxwYzeo5PJSV6DZqm5YcTgs1nY1I4ZezQAIEAWhCN1xpz+qMw= X-Received: by 2002:a05:6000:70a:b0:386:3356:f3ac with SMTP id ffacd0b85a97d-38880ada94fmr5378962f8f.26.1734176763342; Sat, 14 Dec 2024 03:46:03 -0800 (PST) In-Reply-To: <86a5cyv6vt.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=nicolas.despres@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:326481 Archived-At: --000000000000f4f67d0629397daf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Dec 14, 2024 at 12:30=E2=80=AFPM Eli Zaretskii wrote= : > > From: Nicolas Despr=C3=A8s > > 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 windo= w > > covering the entire frame. Another buffer is opened in a second > > window (C-x 4 f). In this case, the split should generally be horizonta= l. > > 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? > > I add martin to this discussion, since I expect him to have a lot of > insight on these matters. > > Because these variables define the minimum size to allow splitting, not the order by which split orientations are tried. Thanks for replying :) -Nico --000000000000f4f67d0629397daf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, Dec 14, 2024 at 12:30= =E2=80=AFPM Eli Zaretskii <eliz@gnu.org<= /a>> wrote:
&= gt; From: Nicolas Despr=C3=A8s <nicolas.despres@gmail.com>
> Date: Sat, 14 Dec 2024 11:05:30 +0100
>
> Currently, `split-window-sensibly' prefers to split vertically, > disregarding the shape of the frame.=C2=A0 This is a good default when=
> Emacs is taller than wider.=C2=A0 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 wind= ow
> covering the entire frame.=C2=A0 Another buffer is opened in a second<= br> > window (C-x 4 f). In this case, the split should generally be horizont= al.
> 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?

I add martin to this discussion, since I expect him to have a lot of
insight on these matters.


Because these variables define the minimum size to allow= splitting, not the order by which split orientations are tried.
<= br>
Thanks for = replying :)
-Ni= co

--000000000000f4f67d0629397daf--