On Mon, Dec 16, 2024 at 6:14 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Nicolas Desprès <nicolas.despres@gmail.com>
> Date: Mon, 16 Dec 2024 12:56:47 +0100
> Cc: emacs-devel@gnu.org
>
> I wrote a new patch that always fallback on vertical split, and I got rid of the weird (width > 80) condition since
> split-width-threshold already does it.
>
> The result is a simpler patch that works perfectly.
>
> It basically does that:
>
> if width > height:
>    try to split horizontally, then try to split vertically
> else
>    try to split vertically, then try to split horizontally
> fallback to vertical split

AFAIU, this is an incompatible change in behavior, with no way for
users who want the old behavior to get it back.

If so, please augment the change by a user option which controls
whether windows are split as they were before or according to the new
algorithm.  We can then discuss whether the default will be the old
behavior or the new one.

In any case, such a change needs a NEW entry, and probably also an
update for the manuals.

I have attached a new patch that should address all your remarks.

I added a new option `preferred-split-edge' and updated the NEWS file and the manual.
 

Last, but not least: for a contribution this size we'll need you to
assign copyright for your code to the FSF.  If you agree, I will send
you the form to fill and the instructions to start the paperwork of
assigning the copyright.


I agree.
-Nico