GNU logs - #80050, boring messages


Message sent to spwhitton@HIDDEN, juri@HIDDEN, bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#80050: 30.1.90; split-window-sensibly fallback ignores split-window-preferred-direction
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: spwhitton@HIDDEN, juri@HIDDEN, bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 21 Dec 2025 21:22:01 +0000
Resent-Message-ID: <handler.80050.B.176635208517676 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 80050
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 80050 <at> debbugs.gnu.org
Cc: Sean Whitton <spwhitton@HIDDEN>, Juri Linkov <juri@HIDDEN>
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
X-Debbugs-Original-Xcc: Sean Whitton <spwhitton@HIDDEN>, Juri Linkov <juri@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.176635208517676
          (code B ref -1); Sun, 21 Dec 2025 21:22:01 +0000
Received: (at submit) by debbugs.gnu.org; 21 Dec 2025 21:21:25 +0000
Received: from localhost ([127.0.0.1]:39999 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vXQrl-0004az-59
	for submit <at> debbugs.gnu.org; Sun, 21 Dec 2025 16:21:25 -0500
Received: from lists.gnu.org ([2001:470:142::17]:55902)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1vXQri-0004ak-CG
 for submit <at> debbugs.gnu.org; Sun, 21 Dec 2025 16:21:23 -0500
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 <sbaugh@HIDDEN>)
 id 1vXQra-0005zt-1x
 for bug-gnu-emacs@HIDDEN; Sun, 21 Dec 2025 16:21:14 -0500
Received: from mxout5.mail.janestreet.com ([64.215.233.18])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <sbaugh@HIDDEN>)
 id 1vXQrW-0000zc-Nz
 for bug-gnu-emacs@HIDDEN; Sun, 21 Dec 2025 16:21:13 -0500
From: Spencer Baugh <sbaugh@HIDDEN>
Date: Sun, 21 Dec 2025 16:21:09 -0500
Message-ID: <ierbjjr1qgq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1766352069;
 bh=UKF5oVCfF3yHqUlBYS6F0XsIHuZw5SJ05NSkouiQK3g=;
 h=From:To:Subject:Date;
 b=j1h7WKpEIUB3YvsOHa6JwJrmgywktT7BLw9ovS7VXmA5s9zqslhl49Aa3wFBDu3bt
 A6/0OQsZFuoFDqCwm5kjTPDyR3kA8NNw2GXe1o6cWqVKrpqaHM4ZuKenhug0ssrZwb
 aShQ2Gngrv3FxXjan9kbsjJ267JFSRf/ZVyeLpjhvqEAoyIKWDSi/0aZNV2WGevKG2
 PoJtfAmRVQ1GpPtObqSoAVTOWcOfXL1ZgZqsND+Mhpzdgwvevz9nMUFN86qEWcXgaV
 Xf96uWK2eDEd9V00m2HkXJR02dc1kIQHoZ3pb1dkRWJVFPhyB+hRuMj0eymEODX16U
 CmccWvVYd1RZw==
Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@HIDDEN;
 helo=mxout5.mail.janestreet.com
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 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,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)


If split-window-sensibly is unable to split a window while obeying
split-height-threshold and split-width-threshold, and there's only one
window on the frame, it will fall back to forcibly splitting that window
vertically (with split-window-below) even if that makes a window which
is "too small".

This matches up with the old non-fallback behavior before
split-window-preferred-direction was added: the function used to always
prefer to split vertically, so the fallback was correct in always
splitting vertically.

But now that we have split-window-preferred-direction, the user can
express a preference, and that preference should affect the fallback:
when split-window-preferred-direction is 'horizontal, the fallback
should be a horizontal (split-window-right) split, and when it's
'longest, the fallback split based on whichever dimension is longest.


In GNU Emacs 30.1.90 (build 90, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.15.12, Xaw scroll bars) of 2025-12-04 built on
 igm-qws-u22796a
Repository revision: 88878f209ee0f1699952b1ba5fb829c502f5959f
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Rocky Linux 8.10 (Green Obsidian)

Configured using:
 'configure --with-x-toolkit=lucid --without-gpm --without-gconf
 --without-selinux --without-imagemagick --with-modules --with-gif=no
 --with-cairo --with-rsvg --without-compress-install --with-tree-sitter
 --with-native-compilation=aot
 PKG_CONFIG_PATH=/usr/local/home/garnish/libtree-sitter/0.22.6-1/lib/pkgconfig/'

Configured features:
CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSYSTEMD
LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM
XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Spencer Baugh <sbaugh@HIDDEN>
Subject: bug#80050: Acknowledgement (30.1.90; split-window-sensibly
 fallback ignores split-window-preferred-direction)
Message-ID: <handler.80050.B.176635208517676.ack <at> debbugs.gnu.org>
References: <ierbjjr1qgq.fsf@HIDDEN>
X-Gnu-PR-Message: ack 80050
X-Gnu-PR-Package: emacs
Reply-To: 80050 <at> debbugs.gnu.org
Date: Sun, 21 Dec 2025 21:22:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

As you requested using X-Debbugs-CC, your message was also forwarded to
  Sean Whitton <spwhitton@HIDDEN>, Juri Linkov <juri@HIDDEN>
(after having been given a bug report number, if it did not have one).

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 80050 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
80050: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D80050
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#80050: 30.1.90; split-window-sensibly fallback ignores split-window-preferred-direction
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 22 Dec 2025 13:14:02 +0000
Resent-Message-ID: <handler.80050.B80050.176640920726488 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 80050
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>, martin rudalics <rudalics@HIDDEN>
Cc: 80050 <at> debbugs.gnu.org, juri@HIDDEN, spwhitton@HIDDEN
Received: via spool by 80050-submit <at> debbugs.gnu.org id=B80050.176640920726488
          (code B ref 80050); Mon, 22 Dec 2025 13:14:02 +0000
Received: (at 80050) by debbugs.gnu.org; 22 Dec 2025 13:13:27 +0000
Received: from localhost ([127.0.0.1]:46646 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vXfj5-0006t9-5J
	for submit <at> debbugs.gnu.org; Mon, 22 Dec 2025 08:13:27 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:48820)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vXfj2-0006sX-1l
 for 80050 <at> debbugs.gnu.org; Mon, 22 Dec 2025 08:13:25 -0500
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 <eliz@HIDDEN>)
 id 1vXfiv-0004DA-Ho; Mon, 22 Dec 2025 08:13:17 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=iG/9/RfVZdqDU3w6upGCfRRHv1JptlP8NWbTpUPYSLI=; b=jEaHKA91rAuy
 Cn1mJp+CSwRXk+eux95V+qQVJ3cvitn4KctOrGbLn/mwOueTvAsqu6gHY1oZ+s9AGdJbnzduxp4Vs
 H4rT/jrzrdZwD7G6L/dTajKro3d7MmHoei88deBru85r5u4RLqcx0NLe3xT0eL5PdjHr9koZfQ0PG
 MZQ293tlZ0dpjLqp3LoUD5hl+HbaGEqRT9qR+g8KyMOUu9Zgdv0BCezSIQ6m1TLPIfmPDQQizh60q
 EfxAurSdC2m1ZO/EMOcM8vUQ5Ffolz6MTT1YVhLyLTLGysEWV7IWA+gD+X/VQXhDkVjyTfGIbuzeG
 cRhZtGGFsiz0SmJDXqYTBw==;
Date: Mon, 22 Dec 2025 15:12:54 +0200
Message-Id: <86wm2ewtgp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <ierbjjr1qgq.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
References: <ierbjjr1qgq.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Sean Whitton <spwhitton@HIDDEN>, Juri Linkov <juri@HIDDEN>
> Date: Sun, 21 Dec 2025 16:21:09 -0500
> From:  Spencer Baugh via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> 
> If split-window-sensibly is unable to split a window while obeying
> split-height-threshold and split-width-threshold, and there's only one
> window on the frame, it will fall back to forcibly splitting that window
> vertically (with split-window-below) even if that makes a window which
> is "too small".
> 
> This matches up with the old non-fallback behavior before
> split-window-preferred-direction was added: the function used to always
> prefer to split vertically, so the fallback was correct in always
> splitting vertically.
> 
> But now that we have split-window-preferred-direction, the user can
> express a preference, and that preference should affect the fallback:
> when split-window-preferred-direction is 'horizontal, the fallback
> should be a horizontal (split-window-right) split, and when it's
> 'longest, the fallback split based on whichever dimension is longest.

Using split-window-preferred-direction in this case would be
overloading its current meaning.  Not sure this is a good idea.

Adding Martin to the discussion.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#80050: 30.1.90; split-window-sensibly fallback ignores split-window-preferred-direction
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 22 Dec 2025 14:00:03 +0000
Resent-Message-ID: <handler.80050.B80050.17664119518566 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 80050
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>, Spencer Baugh <sbaugh@HIDDEN>, martin rudalics <rudalics@HIDDEN>,  80050 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 80050-submit <at> debbugs.gnu.org id=B80050.17664119518566
          (code B ref 80050); Mon, 22 Dec 2025 14:00:03 +0000
Received: (at 80050) by debbugs.gnu.org; 22 Dec 2025 13:59:11 +0000
Received: from localhost ([127.0.0.1]:47051 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vXgRL-0002E6-9B
	for submit <at> debbugs.gnu.org; Mon, 22 Dec 2025 08:59:11 -0500
Received: from sendmail.purelymail.com ([34.202.193.197]:55240)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1vXgRH-0002DA-Pz
 for 80050 <at> debbugs.gnu.org; Mon, 22 Dec 2025 08:59:08 -0500
DKIM-Signature: a=rsa-sha256;
 b=HxCXZEO0l4gLx5/b+Qs2oJPzk4ephmeGiBJj5RC88d6NOqYoJHa2yhf5SWfF2KnVXFEYGpHHAKwKa6TSRT89BpwPTFtTU//pbS6gu+J4x91cPjzDOop5bipTnvM/5PWR2FwuigGjbfkEL6n4U4lWma1L4gHXXJ4grwTxACtKUUkxrUXeIihHVF1WlyFgVdattQhAy4YXsVtmGSLEmh29WAmodgikG9SgzBXldk3mi0/HrdzVl+j+/7UV0lbIvT7UNj3WwARMDwl8g8pc5JyCvrkFw2KjBfbFRRc7dPPCZtpJOZ0NX7Ps8epcvtiTJMMbGGWxC4LnGq0JfAaaIxX+TQ==;
 s=purelymail2; d=spwhitton.name; v=1;
 bh=C+sccY9qbWJ1liZo9lHtHmkmWqgFnJtHWCt784U0p40=;
 h=Received:Received:From:To:Subject:Date; 
DKIM-Signature: a=rsa-sha256;
 b=by4SQVLtclOgRdTVS331m0G3Knw3fSlmh8EUSTSgPIw+1GOfJrnYTfJDz05VKKMqVxigRrl55HazELsxkAEwQjwLN3/OuhXA5rP2oVuKhEXKh4qnu7SZciGthzcaPLEHUf5KYm4Ukg5Nql5GpuDWc7CPchp6OqiFub3EsURsOSngYj1H2Pr1vWrSptIKg6ccbjb/CkvLDLbPsVxerQtT7w2VJSvtPDdtn28GZ7PE27KViuy5fAXJIZpzp8JoVdxoB/5Le+6Mu1NN/usTN9NDq1E2CWgwtJ6ympt+Qb/62nas2Olf+LSDWFA/2bZ1Wh1Bqcg87zAbQUl+tOKzzRLmhg==;
 s=purelymail2; d=purelymail.com; v=1;
 bh=C+sccY9qbWJ1liZo9lHtHmkmWqgFnJtHWCt784U0p40=;
 h=Feedback-ID:Received:Received:From:To:Subject:Date; 
Feedback-ID: 20115:3760:null:purelymail
X-Pm-Original-To: 80050 <at> debbugs.gnu.org
Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1690361940; 
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
 Mon, 22 Dec 2025 13:59:01 +0000 (UTC)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id 71663940424; Mon, 22 Dec 2025 13:59:00 +0000 (GMT)
From: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <86wm2ewtgp.fsf@HIDDEN>
References: <ierbjjr1qgq.fsf@HIDDEN> <86wm2ewtgp.fsf@HIDDEN>
Date: Mon, 22 Dec 2025 13:59:00 +0000
Message-ID: <87tsxihb2z.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

On Mon 22 Dec 2025 at 03:12pm +02, Eli Zaretskii wrote:

>> Cc: Sean Whitton <spwhitton@HIDDEN>, Juri Linkov <juri@HIDDEN>
>> Date: Sun, 21 Dec 2025 16:21:09 -0500
>> From:  Spencer Baugh via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>>
>>
>> If split-window-sensibly is unable to split a window while obeying
>> split-height-threshold and split-width-threshold, and there's only one
>> window on the frame, it will fall back to forcibly splitting that window
>> vertically (with split-window-below) even if that makes a window which
>> is "too small".
>>
>> This matches up with the old non-fallback behavior before
>> split-window-preferred-direction was added: the function used to always
>> prefer to split vertically, so the fallback was correct in always
>> splitting vertically.
>>
>> But now that we have split-window-preferred-direction, the user can
>> express a preference, and that preference should affect the fallback:
>> when split-window-preferred-direction is 'horizontal, the fallback
>> should be a horizontal (split-window-right) split, and when it's
>> 'longest, the fallback split based on whichever dimension is longest.
>
> Using split-window-preferred-direction in this case would be
> overloading its current meaning.  Not sure this is a good idea.
>
> Adding Martin to the discussion.

I think this should perhaps be a separate variable,
split-window-preferred-fallback-direction.

If neither split-width-threshold nor split-height-threshold are
satisfiable, we're in tricky territory where we don't have much space,
so we want to split in a way that is least likely to make buffer
contents appear in a visually confusing way.

Defaulting to splitting the window vertically seems like a safe bet for
most users, but it also makes sense that others would have a different
preference.  For example, it might depend on whether you have folding of
long lines on or off: if there's no folding, a small horizontal split
might be more palatable.

-- 
Sean Whitton




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#80050: 30.1.90; split-window-sensibly fallback ignores split-window-preferred-direction
Resent-From: martin rudalics <rudalics@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 22 Dec 2025 15:53:02 +0000
Resent-Message-ID: <handler.80050.B80050.176641873219164 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 80050
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>, Spencer Baugh <sbaugh@HIDDEN>
Cc: 80050 <at> debbugs.gnu.org, juri@HIDDEN, spwhitton@HIDDEN
Received: via spool by 80050-submit <at> debbugs.gnu.org id=B80050.176641873219164
          (code B ref 80050); Mon, 22 Dec 2025 15:53:02 +0000
Received: (at 80050) by debbugs.gnu.org; 22 Dec 2025 15:52:12 +0000
Received: from localhost ([127.0.0.1]:48564 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vXiCh-0004z2-Uy
	for submit <at> debbugs.gnu.org; Mon, 22 Dec 2025 10:52:12 -0500
Received: from mout.gmx.net ([212.227.15.15]:40199)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rudalics@HIDDEN>) id 1vXiCe-0004yf-An
 for 80050 <at> debbugs.gnu.org; Mon, 22 Dec 2025 10:52:09 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at;
 s=s31663417; t=1766418716; x=1767023516; i=rudalics@HIDDEN;
 bh=+ddcbBlBcqwpd62Sqqksm7m4VjUKCAp+MmAb1DqIFSA=;
 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=BlY3DkJ7xA0Tt45vdgPo90O15C3IFQYXZVcRa4cBbr2pTswaNCkYgma0OFxCPf4+
 T6fP7/FVPu2eQFw2LO+KVbtczUJ5P8JRnAAT+rjNwMfDJlVnEXdZXdW9LDCix+Hq8
 A6bnpfTmUV86G368IQuFmFqWGhqXQNb+6zLAB9Vtrmcm54ch4UuwJTZOBSnpgo5D2
 +Emtr2woiwPVtuyZ5wrvhzaHPcGxAFHLOj/txKH5AnkSMM9Qsw5tk4kZWMqs6JCCa
 AkyvrF0HCP7w4GWxcw/1iFwfkmQ2QM6uXYnmVUesc+lc3kqU+uuKAORy27K6DIeYV
 zh4IaUeSfKlaZPzhLQ==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.31.113] ([46.124.139.136]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MdNY2-1w731A2IYC-00fa0o; Mon, 22
 Dec 2025 16:51:56 +0100
Message-ID: <abe4d1c1-a1dc-489b-9fa9-f127ac1e474e@HIDDEN>
Date: Mon, 22 Dec 2025 16:51:54 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <ierbjjr1qgq.fsf@HIDDEN> <86wm2ewtgp.fsf@HIDDEN>
Content-Language: en-US
From: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <86wm2ewtgp.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
X-Provags-ID: V03:K1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dH3MGZ14QOhu+sAd
 yGFtp7tfXK6AObDzy++EJEX3iE4WHrx1cfI45RAGDkWaBx12EdGDQ1AYd70SGMGyLgWqgVOBQ
 oScXa/F4GZKgEUHpn2D1z4mbLI1NnaNL2PhtvUTnYhx+SV9KUGX7kxL/wu3n+C91b++Ept6Ok
 cBrlWilFOYzwaboYtsH66BkoXQtE2kSoC5CDWAzoR3mDwkTQBAV5spqLTZ5SDF6fAsqi84FZp
 TNwDM01yoG/GCar4sZoSFUjlyHBpC0WhjoOtMMOOmINB5uB20PsY7ep3hpN524NqiDzBVOTJ+
 66XPWIZQ=
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

ID4+IEJ1dCBub3cgdGhhdCB3ZSBoYXZlIHNwbGl0LXdpbmRvdy1wcmVmZXJyZWQtZGlyZWN0
aW9uLCB0aGUgdXNlciBjYW4NCiA+PiBleHByZXNzIGEgcHJlZmVyZW5jZSwgYW5kIHRoYXQg
cHJlZmVyZW5jZSBzaG91bGQgYWZmZWN0IHRoZSBmYWxsYmFjazoNCiA+PiB3aGVuIHNwbGl0
LXdpbmRvdy1wcmVmZXJyZWQtZGlyZWN0aW9uIGlzICdob3Jpem9udGFsLCB0aGUgZmFsbGJh
Y2sNCiA+PiBzaG91bGQgYmUgYSBob3Jpem9udGFsIChzcGxpdC13aW5kb3ctcmlnaHQpIHNw
bGl0LCBhbmQgd2hlbiBpdCdzDQogPj4gJ2xvbmdlc3QsIHRoZSBmYWxsYmFjayBzcGxpdCBi
YXNlZCBvbiB3aGljaGV2ZXIgZGltZW5zaW9uIGlzIGxvbmdlc3QuDQogPg0KID4gVXNpbmcg
c3BsaXQtd2luZG93LXByZWZlcnJlZC1kaXJlY3Rpb24gaW4gdGhpcyBjYXNlIHdvdWxkIGJl
DQogPiBvdmVybG9hZGluZyBpdHMgY3VycmVudCBtZWFuaW5nLiAgTm90IHN1cmUgdGhpcyBp
cyBhIGdvb2QgaWRlYS4NCiA+DQogPiBBZGRpbmcgTWFydGluIHRvIHRoZSBkaXNjdXNzaW9u
Lg0KDQpJIGRvdWJ0IGl0J3MgYSBnb29kIGlkZWEgd2hlbiBhIHVzZXIgaGFzIHNldCAnc3Bs
aXQtd2lkdGgtdGhyZXNob2xkJyB0bw0KbmlsLCB0aHVzIGV4cGxpY2l0bHkgc3RhdGluZw0K
DQogICBJZiB0aGlzIGlzIG5pbCwg4oCYc3BsaXQtd2luZG93LXNlbnNpYmx54oCZIGlzIG5v
dCBhbGxvd2VkIHRvIHNwbGl0IGEgd2luZG93DQogICBob3Jpem9udGFsbHkuDQoNCm1hcnRp
bg0K




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#80050: 30.1.90; split-window-sensibly fallback ignores split-window-preferred-direction
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 22 Dec 2025 16:19:01 +0000
Resent-Message-ID: <handler.80050.B80050.176642032426240 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 80050
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Sean Whitton <spwhitton@HIDDEN>
Cc: 80050 <at> debbugs.gnu.org, martin rudalics <rudalics@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, juri@HIDDEN
Received: via spool by 80050-submit <at> debbugs.gnu.org id=B80050.176642032426240
          (code B ref 80050); Mon, 22 Dec 2025 16:19:01 +0000
Received: (at 80050) by debbugs.gnu.org; 22 Dec 2025 16:18:44 +0000
Received: from localhost ([127.0.0.1]:48795 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vXicO-0006p9-1A
	for submit <at> debbugs.gnu.org; Mon, 22 Dec 2025 11:18:44 -0500
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:60139)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1vXicL-0006or-NT
 for 80050 <at> debbugs.gnu.org; Mon, 22 Dec 2025 11:18:42 -0500
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <87tsxihb2z.fsf@HIDDEN> (Sean Whitton's message
 of "Mon, 22 Dec 2025 13:59:00 +0000")
References: <ierbjjr1qgq.fsf@HIDDEN> <86wm2ewtgp.fsf@HIDDEN>
 <87tsxihb2z.fsf@HIDDEN>
Date: Mon, 22 Dec 2025 11:18:36 -0500
Message-ID: <ier5x9y1odf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1766420316;
 bh=gk7ppfWMYeYsosZQRnSwCrnv9R6TCimzovKvnpwypxw=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=XARFOghnkMM7lLr/WZOWGe3DGkZkwyBQzlIQ0z5NE7bA4Mb+jWYONa1y12X3zG30v
 e939uvZeo80+WKAmDq7NAkMhl3JpcnSMNhoIvFWQXnxocIjoLavLDpNnuq9BzGA31U
 z2S7BE8I2PMJZodz7VIotruOlEu0XGZMmbsSVrWXD4XwxSxhtV2SQuF9zVJJ4rn2/G
 54/U5CG5NeXecoVHjnwE8Qy5Mozq4LJCP9VeUYtMGl73c0v+fqaT/SANbwOC8z30ZV
 GJAOLubHJUDnukcVq/OveTgC4wIij0A0Jau9nFMF1jFRSd1vs6eHXE5GnpoBctGImP
 Qk+k495HGqL6w==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Sean Whitton <spwhitton@HIDDEN> writes:

> Hello,
>
> On Mon 22 Dec 2025 at 03:12pm +02, Eli Zaretskii wrote:
>
>>> Cc: Sean Whitton <spwhitton@HIDDEN>, Juri Linkov <juri@HIDDEN>
>>> Date: Sun, 21 Dec 2025 16:21:09 -0500
>>> From:  Spencer Baugh via "Bug reports for GNU Emacs,
>>>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>>>
>>>
>>> If split-window-sensibly is unable to split a window while obeying
>>> split-height-threshold and split-width-threshold, and there's only one
>>> window on the frame, it will fall back to forcibly splitting that window
>>> vertically (with split-window-below) even if that makes a window which
>>> is "too small".
>>>
>>> This matches up with the old non-fallback behavior before
>>> split-window-preferred-direction was added: the function used to always
>>> prefer to split vertically, so the fallback was correct in always
>>> splitting vertically.
>>>
>>> But now that we have split-window-preferred-direction, the user can
>>> express a preference, and that preference should affect the fallback:
>>> when split-window-preferred-direction is 'horizontal, the fallback
>>> should be a horizontal (split-window-right) split, and when it's
>>> 'longest, the fallback split based on whichever dimension is longest.
>>
>> Using split-window-preferred-direction in this case would be
>> overloading its current meaning.  Not sure this is a good idea.
>>
>> Adding Martin to the discussion.
>
> I think this should perhaps be a separate variable,
> split-window-preferred-fallback-direction.
>
> If neither split-width-threshold nor split-height-threshold are
> satisfiable, we're in tricky territory where we don't have much space,
> so we want to split in a way that is least likely to make buffer
> contents appear in a visually confusing way.
>
> Defaulting to splitting the window vertically seems like a safe bet for
> most users, but it also makes sense that others would have a different
> preference.  For example, it might depend on whether you have folding of
> long lines on or off: if there's no folding, a small horizontal split
> might be more palatable.

Hmm, perhaps you're right.

In the specific case which prompted this bug, I had a frame-width of 158
and a frame-height of 47.  split-window-sensibly did a vertical split,
even though there was lots of horizontal space.  This seemed wrong to
me: two windows with 79 columns each would have been nicer.

But if the frame had been smaller, e.g. width=100 and height=30, then
you're right that I would want a vertical split, because a horizontal
split would be unusable.

Maybe what I want is more intelligent fallback behavior.  If frame-width
is pretty high and frame-height is pretty low, and we're in this
fallback, split-right seems preferable to split-below.

Also, in extreme situations where the frame is very small, maybe we
shouldn't even be splitting even in this fallback case?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#80050: 30.1.90; split-window-sensibly fallback ignores split-window-preferred-direction
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 22 Dec 2025 16:54:01 +0000
Resent-Message-ID: <handler.80050.B80050.17664224072461 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 80050
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: 80050 <at> debbugs.gnu.org, rudalics@HIDDEN, juri@HIDDEN, spwhitton@HIDDEN
Received: via spool by 80050-submit <at> debbugs.gnu.org id=B80050.17664224072461
          (code B ref 80050); Mon, 22 Dec 2025 16:54:01 +0000
Received: (at 80050) by debbugs.gnu.org; 22 Dec 2025 16:53:27 +0000
Received: from localhost ([127.0.0.1]:49103 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vXj9y-0000dc-OG
	for submit <at> debbugs.gnu.org; Mon, 22 Dec 2025 11:53:27 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:43868)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vXj9t-0000bl-TX
 for 80050 <at> debbugs.gnu.org; Mon, 22 Dec 2025 11:53:25 -0500
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 <eliz@HIDDEN>)
 id 1vXj9m-0003er-0V; Mon, 22 Dec 2025 11:53:14 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=WBWfMC1Kskn2RanrV0d/gEmRGk6D0G97sElqvhO33HE=; b=kgLgRZpzIIEg
 Ffkn52NcGhK9Yh/g6ISzVHsmt27+HiHt8xocxFLMUgxA8qemsGvf+9XHh0mrKrXhCXal9eOteuCXJ
 nC4wKM3xPKbHQPhlZKWeDn+MVSJ751e2uPiK8ZheL54Ij3CkWZ/sZ831kvB4G8fExUdFPypdkvvDd
 v+lbYhCEexy39752z91f9twRXtTa7BfKWh2WuZbClCNdq85v6c8BGXRYlZ5nyGazQXTV3iEhE3UMy
 ylxZ+E/UFXX5kTZO2ZOXezAMx0c0y+W4F3dwPrDyyJyCOMt4/Ss0LICQZTB8XTrMBYZ7T9s6dWxIL
 7ODURjTDsMAPH06xVB6znA==;
Date: Mon, 22 Dec 2025 18:53:11 +0200
Message-Id: <86o6nqwj9k.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <ier5x9y1odf.fsf@HIDDEN> (message from Spencer Baugh on
 Mon, 22 Dec 2025 11:18:36 -0500)
References: <ierbjjr1qgq.fsf@HIDDEN> <86wm2ewtgp.fsf@HIDDEN>
 <87tsxihb2z.fsf@HIDDEN> <ier5x9y1odf.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  martin rudalics <rudalics@HIDDEN>,
>    80050 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Mon, 22 Dec 2025 11:18:36 -0500
> 
> Sean Whitton <spwhitton@HIDDEN> writes:
> 
> > Hello,
> >
> > On Mon 22 Dec 2025 at 03:12pm +02, Eli Zaretskii wrote:
> >
> >>> Cc: Sean Whitton <spwhitton@HIDDEN>, Juri Linkov <juri@HIDDEN>
> >>> Date: Sun, 21 Dec 2025 16:21:09 -0500
> >>> From:  Spencer Baugh via "Bug reports for GNU Emacs,
> >>>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> >>>
> >>>
> >>> If split-window-sensibly is unable to split a window while obeying
> >>> split-height-threshold and split-width-threshold, and there's only one
> >>> window on the frame, it will fall back to forcibly splitting that window
> >>> vertically (with split-window-below) even if that makes a window which
> >>> is "too small".
> >>>
> >>> This matches up with the old non-fallback behavior before
> >>> split-window-preferred-direction was added: the function used to always
> >>> prefer to split vertically, so the fallback was correct in always
> >>> splitting vertically.
> >>>
> >>> But now that we have split-window-preferred-direction, the user can
> >>> express a preference, and that preference should affect the fallback:
> >>> when split-window-preferred-direction is 'horizontal, the fallback
> >>> should be a horizontal (split-window-right) split, and when it's
> >>> 'longest, the fallback split based on whichever dimension is longest.
> >>
> >> Using split-window-preferred-direction in this case would be
> >> overloading its current meaning.  Not sure this is a good idea.
> >>
> >> Adding Martin to the discussion.
> >
> > I think this should perhaps be a separate variable,
> > split-window-preferred-fallback-direction.
> >
> > If neither split-width-threshold nor split-height-threshold are
> > satisfiable, we're in tricky territory where we don't have much space,
> > so we want to split in a way that is least likely to make buffer
> > contents appear in a visually confusing way.
> >
> > Defaulting to splitting the window vertically seems like a safe bet for
> > most users, but it also makes sense that others would have a different
> > preference.  For example, it might depend on whether you have folding of
> > long lines on or off: if there's no folding, a small horizontal split
> > might be more palatable.
> 
> Hmm, perhaps you're right.
> 
> In the specific case which prompted this bug, I had a frame-width of 158
> and a frame-height of 47.  split-window-sensibly did a vertical split,
> even though there was lots of horizontal space.  This seemed wrong to
> me: two windows with 79 columns each would have been nicer.
> 
> But if the frame had been smaller, e.g. width=100 and height=30, then
> you're right that I would want a vertical split, because a horizontal
> split would be unusable.
> 
> Maybe what I want is more intelligent fallback behavior.  If frame-width
> is pretty high and frame-height is pretty low, and we're in this
> fallback, split-right seems preferable to split-below.
> 
> Also, in extreme situations where the frame is very small, maybe we
> shouldn't even be splitting even in this fallback case?

If you know that you want to split window horizontally, why not invoke
the command which does precisely that?  The dwim-ish commands are only
there to cover the cases where the user doesn't care too much about
how the window is split.  Its heuristics therefore don't have to be
perfect, or even try to be.

IOW, it is IMO wrong to expect such heuristics to always DTRT.  We
already have half a dozen options to guide this simple action, and if
they still don't do their job in some cases, let the user tell Emacs
explicitly what she wants.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#80050: 30.1.90; split-window-sensibly fallback ignores split-window-preferred-direction
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 22 Dec 2025 22:02:02 +0000
Resent-Message-ID: <handler.80050.B80050.17664408791493 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 80050
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 80050 <at> debbugs.gnu.org, rudalics@HIDDEN, spwhitton@HIDDEN, juri@HIDDEN
Received: via spool by 80050-submit <at> debbugs.gnu.org id=B80050.17664408791493
          (code B ref 80050); Mon, 22 Dec 2025 22:02:02 +0000
Received: (at 80050) by debbugs.gnu.org; 22 Dec 2025 22:01:19 +0000
Received: from localhost ([127.0.0.1]:50648 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vXnxu-0000Ny-IW
	for submit <at> debbugs.gnu.org; Mon, 22 Dec 2025 17:01:19 -0500
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:53177)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1vXnxr-0000Nd-4G
 for 80050 <at> debbugs.gnu.org; Mon, 22 Dec 2025 17:01:16 -0500
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <86o6nqwj9k.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 22 Dec
 2025 18:53:11 +0200")
References: <ierbjjr1qgq.fsf@HIDDEN> <86wm2ewtgp.fsf@HIDDEN>
 <87tsxihb2z.fsf@HIDDEN>
 <ier5x9y1odf.fsf@HIDDEN> <86o6nqwj9k.fsf@HIDDEN>
Date: Mon, 22 Dec 2025 17:01:09 -0500
Message-ID: <ierwm2eyy56.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1766440869;
 bh=UFY77bZPjb60WxAA2f9fenxYy/wbc16qkxIBiXDObEk=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=OYrBp/Xq7/jc+Sp9q26mF0C+dxA00ng+sQT5Ppq0JGnrIgg1DHN8gyCZUqEXBmt8B
 cBrq9XgQh6HTVR/lnX/98DT4XnuBT+7TcfT8NiYG7hhVJGQH5Jef4m0lqHu5QGQ5Fy
 KVTN7BLQAcwGqdvw1eL69tg2qaWlu560dIyYmbR7Ih+tZCo+lsrtyJstpA87Ay3nTD
 vMLMLrKDRBCsDajYT3av8UmJ3pduk3v8EbcduSrWhuLFuFxOfrCnnV9yl119QtIBRS
 u3mXPSMom6rmlo786fd/TC1KNbf+A5rVnFOZlIVLmv2QKj/Vn5KvkN6KqsmZQ/Japb
 9m93223jOmalA==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Spencer Baugh <sbaugh@HIDDEN>
>> Cc: Eli Zaretskii <eliz@HIDDEN>,  martin rudalics <rudalics@HIDDEN>,
>>    80050 <at> debbugs.gnu.org,  juri@HIDDEN
>> Date: Mon, 22 Dec 2025 11:18:36 -0500
>> 
>> Sean Whitton <spwhitton@HIDDEN> writes:
>> 
>> > Hello,
>> >
>> > On Mon 22 Dec 2025 at 03:12pm +02, Eli Zaretskii wrote:
>> >
>> >>> Cc: Sean Whitton <spwhitton@HIDDEN>, Juri Linkov <juri@HIDDEN>
>> >>> Date: Sun, 21 Dec 2025 16:21:09 -0500
>> >>> From:  Spencer Baugh via "Bug reports for GNU Emacs,
>> >>>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>> >>>
>> >>>
>> >>> If split-window-sensibly is unable to split a window while obeying
>> >>> split-height-threshold and split-width-threshold, and there's only one
>> >>> window on the frame, it will fall back to forcibly splitting that window
>> >>> vertically (with split-window-below) even if that makes a window which
>> >>> is "too small".
>> >>>
>> >>> This matches up with the old non-fallback behavior before
>> >>> split-window-preferred-direction was added: the function used to always
>> >>> prefer to split vertically, so the fallback was correct in always
>> >>> splitting vertically.
>> >>>
>> >>> But now that we have split-window-preferred-direction, the user can
>> >>> express a preference, and that preference should affect the fallback:
>> >>> when split-window-preferred-direction is 'horizontal, the fallback
>> >>> should be a horizontal (split-window-right) split, and when it's
>> >>> 'longest, the fallback split based on whichever dimension is longest.
>> >>
>> >> Using split-window-preferred-direction in this case would be
>> >> overloading its current meaning.  Not sure this is a good idea.
>> >>
>> >> Adding Martin to the discussion.
>> >
>> > I think this should perhaps be a separate variable,
>> > split-window-preferred-fallback-direction.
>> >
>> > If neither split-width-threshold nor split-height-threshold are
>> > satisfiable, we're in tricky territory where we don't have much space,
>> > so we want to split in a way that is least likely to make buffer
>> > contents appear in a visually confusing way.
>> >
>> > Defaulting to splitting the window vertically seems like a safe bet for
>> > most users, but it also makes sense that others would have a different
>> > preference.  For example, it might depend on whether you have folding of
>> > long lines on or off: if there's no folding, a small horizontal split
>> > might be more palatable.
>> 
>> Hmm, perhaps you're right.
>> 
>> In the specific case which prompted this bug, I had a frame-width of 158
>> and a frame-height of 47.  split-window-sensibly did a vertical split,
>> even though there was lots of horizontal space.  This seemed wrong to
>> me: two windows with 79 columns each would have been nicer.
>> 
>> But if the frame had been smaller, e.g. width=100 and height=30, then
>> you're right that I would want a vertical split, because a horizontal
>> split would be unusable.
>> 
>> Maybe what I want is more intelligent fallback behavior.  If frame-width
>> is pretty high and frame-height is pretty low, and we're in this
>> fallback, split-right seems preferable to split-below.
>> 
>> Also, in extreme situations where the frame is very small, maybe we
>> shouldn't even be splitting even in this fallback case?
>
> If you know that you want to split window horizontally, why not invoke
> the command which does precisely that?

That's a fair point.

> The dwim-ish commands are only
> there to cover the cases where the user doesn't care too much about
> how the window is split.  Its heuristics therefore don't have to be
> perfect, or even try to be.

split-window-sensibly is called implicitly by display-buffer (via
split-window-preferred-function), so its behavior affects every command
which uses display-buffer.

> IOW, it is IMO wrong to expect such heuristics to always DTRT.  We
> already have half a dozen options to guide this simple action, and if
> they still don't do their job in some cases, let the user tell Emacs
> explicitly what she wants.

Certainly.  But when a frame's root window isn't already split, there's
no way for the user to tell split-window-sensibly what they want.

A user may know they want a frame to be split in a specific way, if the
frame needs to be split.  But if the frame is not already split, they
don't have control over what split-window-sensibly will do, and it's
annoying if it consistently does something the user doesn't want.

If the user usually doesn't keep their frames split into multiple
windows, they would need to run split-window-right before running any
command which will split the frame, if they want to get their preferred
split.

I wonder... what if we remembered the way the user has previously split
the root window in the current frame, and try to use the same split in
split-window-sensibly?  That would give the user the ability to control
what split happens.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#80050: 30.1.90; split-window-sensibly fallback ignores split-window-preferred-direction
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 23 Dec 2025 12:23:02 +0000
Resent-Message-ID: <handler.80050.B80050.1766492534554 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 80050
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>,  80050 <at> debbugs.gnu.org,  martin rudalics <rudalics@HIDDEN>,  Eli Zaretskii <eliz@HIDDEN>, juri@HIDDEN
Received: via spool by 80050-submit <at> debbugs.gnu.org id=B80050.1766492534554
          (code B ref 80050); Tue, 23 Dec 2025 12:23:02 +0000
Received: (at 80050) by debbugs.gnu.org; 23 Dec 2025 12:22:14 +0000
Received: from localhost ([127.0.0.1]:55512 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vY1P4-00008s-B1
	for submit <at> debbugs.gnu.org; Tue, 23 Dec 2025 07:22:14 -0500
Received: from sendmail.purelymail.com ([34.202.193.197]:45802)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1vY1P1-00008d-6L
 for 80050 <at> debbugs.gnu.org; Tue, 23 Dec 2025 07:22:11 -0500
DKIM-Signature: a=rsa-sha256;
 b=BHd73+WjH2q2gdLtRpFah02Lu7C84cc1ebpTUYuT3DkZE+r5LHjw19nlT53Bn3OT7XNX8fa0jogf0rVYQTbkALvsWaxerkeXj8rk+IQwcON8Q0l+SnpnwYOohDOtxFogcdVWahZjg4CZ9/5h+CB5W63Loc6SY/Fj0OYp1BIlHDUAjiQPfoY2GOEX60721rtjgjDE3cz8irNlbX/ZzTubculHuSI2pK1AoAi9oiiqRk246lz2ArTg8rmNZkNatxnpmWqRBBbe7KADa59MaW4AftBrwB3c5gju5mP7vfGy2+4GD6XvB4nzbzT4XraZs+pAIBuzM8bLCJWsbdHtrdDZBA==;
 s=purelymail2; d=spwhitton.name; v=1;
 bh=53IoLXXP1kfWnpHOZrif5ZLt4A57fNxclpZspfYbnsA=;
 h=Received:Received:From:To:Subject:Date; 
DKIM-Signature: a=rsa-sha256;
 b=LuBIDy+C44cim6RcLSbJlGMwiJy8hoz85ov7doQ+t5HKth0VZ4RyxGoEdqdCT7bzhFE1+vV2ekJiqv5Vp83s5x2N0DxJdDx93/XzmBRp936jCQwKtv4l31+Ijo+p9WocdYAaUKZRG6UeDVPnYRkkMHgPtGXnjerVfQnNHFgUaADXuDN2SYp5joty2xpS2dJEucfRvhZcUftDyBfzlUGF+O0q1Qp101H04j6OrPdFK8jhI4N0C1AinjUGbtrcCkLh68rByQ3C5KYcys7dS/hR0xuS5ByN2jkoiX3WBVnnnou05ieMKniDCIDNwiuzXnT+JdVHNg4GWJHBwBKEk9ZWPg==;
 s=purelymail2; d=purelymail.com; v=1;
 bh=53IoLXXP1kfWnpHOZrif5ZLt4A57fNxclpZspfYbnsA=;
 h=Feedback-ID:Received:Received:From:To:Subject:Date; 
Feedback-ID: 20115:3760:null:purelymail
X-Pm-Original-To: 80050 <at> debbugs.gnu.org
Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1630048202; 
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
 Tue, 23 Dec 2025 12:22:01 +0000 (UTC)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id 05B509404C7; Tue, 23 Dec 2025 12:21:59 +0000 (GMT)
From: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <ier5x9y1odf.fsf@HIDDEN>
References: <ierbjjr1qgq.fsf@HIDDEN> <86wm2ewtgp.fsf@HIDDEN>
 <87tsxihb2z.fsf@HIDDEN>
 <ier5x9y1odf.fsf@HIDDEN>
Date: Tue, 23 Dec 2025 12:21:58 +0000
Message-ID: <875x9xfkwp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

On Mon 22 Dec 2025 at 11:18am -05, Spencer Baugh wrote:

> In the specific case which prompted this bug, I had a frame-width of 158
> and a frame-height of 47.  split-window-sensibly did a vertical split,
> even though there was lots of horizontal space.  This seemed wrong to
> me: two windows with 79 columns each would have been nicer.
>
> But if the frame had been smaller, e.g. width=100 and height=30, then
> you're right that I would want a vertical split, because a horizontal
> split would be unusable.
>
> Maybe what I want is more intelligent fallback behavior.  If frame-width
> is pretty high and frame-height is pretty low, and we're in this
> fallback, split-right seems preferable to split-below.

Perhaps the threshold variables could take a cons of two numbers to
specify hard and soft limits?  So, the first one would control the
ordinary case like it does now, and if we enter the fallback phase, the
second number would guide the fallback?  So in your case here, of
height, the second number could be set to 40 or something like that.

> Also, in extreme situations where the frame is very small, maybe we
> shouldn't even be splitting even in this fallback case?

Calling code in lots of places probably assumes that the functions do
result in the number of windows increasing by 1.  So it seems like too
much of a breaking change to do that for calls from Lisp, but possibly
top-level interactive calls to C-x 4 could work as you describe.

-- 
Sean Whitton




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#80050: 30.1.90; split-window-sensibly fallback ignores split-window-preferred-direction
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 23 Dec 2025 12:24:01 +0000
Resent-Message-ID: <handler.80050.B80050.1766492638802 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 80050
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 80050 <at> debbugs.gnu.org
Cc: sbaugh@HIDDEN, eliz@HIDDEN, juri@HIDDEN, rudalics@HIDDEN
X-Debbugs-Original-To: Spencer Baugh via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
X-Debbugs-Original-Cc: 80050 <at> debbugs.gnu.org, Spencer Baugh <sbaugh@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, juri@HIDDEN, rudalics@HIDDEN
Received: via spool by 80050-submit <at> debbugs.gnu.org id=B80050.1766492638802
          (code B ref 80050); Tue, 23 Dec 2025 12:24:01 +0000
Received: (at 80050) by debbugs.gnu.org; 23 Dec 2025 12:23:58 +0000
Received: from localhost ([127.0.0.1]:55522 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vY1Qk-0000Cs-13
	for submit <at> debbugs.gnu.org; Tue, 23 Dec 2025 07:23:58 -0500
Received: from sendmail.purelymail.com ([34.202.193.197]:48910)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1vY1Qh-0000Ca-Uj
 for 80050 <at> debbugs.gnu.org; Tue, 23 Dec 2025 07:23:56 -0500
DKIM-Signature: a=rsa-sha256;
 b=HS5zzGXXnt0nNLScizSt2rwDw/IMhDFiNmY3LqEXdoMuUHYtyhbR5KsSUwttFnPuu0ww6XKyaYdrdaDsN5cFNCSglVayV9CIK3ql5bYf1D2BmB237wMky/lnaa6WEk9Ykp6ZfP+JACehnAKo77Cn15Xrj7j+T/5mfzh63GOohLc1ROgcPu91I07zdvB9MwWxQNsUmYHjQnvqj7uEZSLO4XC5YTIp/xmgJWNWh4dmdts+Y1hrELBkwiMW/YpryMFBXnqa6GB8bw3MqKijF/KcmO9ooYNbN183j2UGQhqp7LleGS9jZtpekKJfrAHq84C0Fp1fP4nIwVU7byPTp64lLw==;
 s=purelymail2; d=spwhitton.name; v=1;
 bh=6G4IIWP7uM0R2wBmzSwdm17kWE58jAzf+lTE0BVrahc=;
 h=Received:Received:From:To:Subject:Date; 
DKIM-Signature: a=rsa-sha256;
 b=f1Jc4Exeqq4TW0JqxyJr6txRQj/Jjwqtm4mi+rP8uUzz96lQtnSwCSwUb8ywKfDqssL9Bd57flhrMLZbM4rUAVvh9uPhHKsYTlaA/N+0uXyW2X6z/f2hqkz71ePI06dxdh9BoSci3t5DJtuEm9NZGcNrTBmr9r06LHoukq6hpBnjcsrZOXt1Hksx7yyvnu5CuW7MA5wI1bucUj1WuSQV/8slF5+QiP8ujcaftNMubUbzcS5L1SHe2zNNmn2tNq2MlmmDt1BkxohbOvLtfwBKdl6MyAmzyzdG3nOU64AsJhE2OYfEGTx59XUhUhKw6C1ljDBLN94yrL5Y6sKMnGQikA==;
 s=purelymail2; d=purelymail.com; v=1;
 bh=6G4IIWP7uM0R2wBmzSwdm17kWE58jAzf+lTE0BVrahc=;
 h=Feedback-ID:Received:Received:From:To:Subject:Date; 
Feedback-ID: 20115:3760:null:purelymail
X-Pm-Original-To: 80050 <at> debbugs.gnu.org
Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 94709424;
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
 Tue, 23 Dec 2025 12:23:49 +0000 (UTC)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id A6A929404C7; Tue, 23 Dec 2025 12:23:46 +0000 (GMT)
From: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <ierwm2eyy56.fsf@HIDDEN>
References: <ierbjjr1qgq.fsf@HIDDEN> <86wm2ewtgp.fsf@HIDDEN>
 <87tsxihb2z.fsf@HIDDEN>
 <ier5x9y1odf.fsf@HIDDEN> <86o6nqwj9k.fsf@HIDDEN>
 <ierwm2eyy56.fsf@HIDDEN>
Date: Tue, 23 Dec 2025 12:23:46 +0000
Message-ID: <871pklfktp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

On Mon 22 Dec 2025 at 05:01pm -05, Spencer Baugh wrote:

> Certainly.  But when a frame's root window isn't already split, there's
> no way for the user to tell split-window-sensibly what they want.
>
> A user may know they want a frame to be split in a specific way, if the
> frame needs to be split.  But if the frame is not already split, they
> don't have control over what split-window-sensibly will do, and it's
> annoying if it consistently does something the user doesn't want.
>
> If the user usually doesn't keep their frames split into multiple
> windows, they would need to run split-window-right before running any
> command which will split the frame, if they want to get their preferred
> split.
>
> I wonder... what if we remembered the way the user has previously split
> the root window in the current frame, and try to use the same split in
> split-window-sensibly?  That would give the user the ability to control
> what split happens.

That sounds interesting, yes.

Your comments also make me think that we could have a command like C-x 4
4 which is specific to a direction, like a 'C-x 2 2' or 'C-x 3 3' (those
two we can't actually use of course).

-- 
Sean Whitton




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#80050: 30.1.90; split-window-sensibly fallback ignores split-window-preferred-direction
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 23 Dec 2025 12:25:02 +0000
Resent-Message-ID: <handler.80050.B.1766492661885 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 80050
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 80050 <at> debbugs.gnu.org
Cc: sbaugh@HIDDEN, eliz@HIDDEN, juri@HIDDEN, rudalics@HIDDEN
X-Debbugs-Original-To: Spencer Baugh via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
X-Debbugs-Original-Cc: 80050 <at> debbugs.gnu.org, Spencer Baugh <sbaugh@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, juri@HIDDEN, rudalics@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.1766492661885
          (code B ref -1); Tue, 23 Dec 2025 12:25:02 +0000
Received: (at submit) by debbugs.gnu.org; 23 Dec 2025 12:24:21 +0000
Received: from localhost ([127.0.0.1]:55529 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vY1R6-0000E6-HT
	for submit <at> debbugs.gnu.org; Tue, 23 Dec 2025 07:24:20 -0500
Received: from lists.gnu.org ([2001:470:142::17]:53794)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1vY1R4-0000Dj-Pm
 for submit <at> debbugs.gnu.org; Tue, 23 Dec 2025 07:24:19 -0500
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 <spwhitton@HIDDEN>)
 id 1vY1Qo-0001Uu-H1
 for bug-gnu-emacs@HIDDEN; Tue, 23 Dec 2025 07:24:04 -0500
Received: from sendmail.purelymail.com ([34.202.193.197])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <spwhitton@HIDDEN>)
 id 1vY1Qm-0007ih-Uy
 for bug-gnu-emacs@HIDDEN; Tue, 23 Dec 2025 07:24:02 -0500
DKIM-Signature: a=rsa-sha256;
 b=HS5zzGXXnt0nNLScizSt2rwDw/IMhDFiNmY3LqEXdoMuUHYtyhbR5KsSUwttFnPuu0ww6XKyaYdrdaDsN5cFNCSglVayV9CIK3ql5bYf1D2BmB237wMky/lnaa6WEk9Ykp6ZfP+JACehnAKo77Cn15Xrj7j+T/5mfzh63GOohLc1ROgcPu91I07zdvB9MwWxQNsUmYHjQnvqj7uEZSLO4XC5YTIp/xmgJWNWh4dmdts+Y1hrELBkwiMW/YpryMFBXnqa6GB8bw3MqKijF/KcmO9ooYNbN183j2UGQhqp7LleGS9jZtpekKJfrAHq84C0Fp1fP4nIwVU7byPTp64lLw==;
 s=purelymail2; d=spwhitton.name; v=1;
 bh=6G4IIWP7uM0R2wBmzSwdm17kWE58jAzf+lTE0BVrahc=;
 h=Received:Received:From:To:Subject:Date; 
DKIM-Signature: a=rsa-sha256;
 b=f1Jc4Exeqq4TW0JqxyJr6txRQj/Jjwqtm4mi+rP8uUzz96lQtnSwCSwUb8ywKfDqssL9Bd57flhrMLZbM4rUAVvh9uPhHKsYTlaA/N+0uXyW2X6z/f2hqkz71ePI06dxdh9BoSci3t5DJtuEm9NZGcNrTBmr9r06LHoukq6hpBnjcsrZOXt1Hksx7yyvnu5CuW7MA5wI1bucUj1WuSQV/8slF5+QiP8ujcaftNMubUbzcS5L1SHe2zNNmn2tNq2MlmmDt1BkxohbOvLtfwBKdl6MyAmzyzdG3nOU64AsJhE2OYfEGTx59XUhUhKw6C1ljDBLN94yrL5Y6sKMnGQikA==;
 s=purelymail2; d=purelymail.com; v=1;
 bh=6G4IIWP7uM0R2wBmzSwdm17kWE58jAzf+lTE0BVrahc=;
 h=Feedback-ID:Received:Received:From:To:Subject:Date; 
Feedback-ID: 20115:3760:null:purelymail
X-Pm-Original-To: bug-gnu-emacs@HIDDEN
Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 94709424;
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
 Tue, 23 Dec 2025 12:23:49 +0000 (UTC)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id A6A929404C7; Tue, 23 Dec 2025 12:23:46 +0000 (GMT)
From: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <ierwm2eyy56.fsf@HIDDEN>
References: <ierbjjr1qgq.fsf@HIDDEN> <86wm2ewtgp.fsf@HIDDEN>
 <87tsxihb2z.fsf@HIDDEN>
 <ier5x9y1odf.fsf@HIDDEN> <86o6nqwj9k.fsf@HIDDEN>
 <ierwm2eyy56.fsf@HIDDEN>
Date: Tue, 23 Dec 2025 12:23:46 +0000
Message-ID: <871pklfktp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=34.202.193.197;
 envelope-from=spwhitton@HIDDEN; helo=sendmail.purelymail.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,
 RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hello,

On Mon 22 Dec 2025 at 05:01pm -05, Spencer Baugh wrote:

> Certainly.  But when a frame's root window isn't already split, there's
> no way for the user to tell split-window-sensibly what they want.
>
> A user may know they want a frame to be split in a specific way, if the
> frame needs to be split.  But if the frame is not already split, they
> don't have control over what split-window-sensibly will do, and it's
> annoying if it consistently does something the user doesn't want.
>
> If the user usually doesn't keep their frames split into multiple
> windows, they would need to run split-window-right before running any
> command which will split the frame, if they want to get their preferred
> split.
>
> I wonder... what if we remembered the way the user has previously split
> the root window in the current frame, and try to use the same split in
> split-window-sensibly?  That would give the user the ability to control
> what split happens.

That sounds interesting, yes.

Your comments also make me think that we could have a command like C-x 4
4 which is specific to a direction, like a 'C-x 2 2' or 'C-x 3 3' (those
two we can't actually use of course).

-- 
Sean Whitton





Last modified: Tue, 23 Dec 2025 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.