[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: split-window-right doesn't work with wide margins

From: martin rudalics
Subject: Re: split-window-right doesn't work with wide margins
Date: Fri, 22 Jan 2016 12:05:07 +0100

> May I ask what the rationale for this change of behaviour was? (I
> scanned the thread discussing your patch but I didn't see any mention of
> it.)

Emacs emulates a tiling window manager.  One major complication results
from the fact that frames can get resized continuously.  Traditional
tiling window managers don't have to cope with the problem that a screen
gets resized or its resolution being changed frequently.

The window code lacked a coherent mechanism to determine whether to
refuse a change of any of a window's size or that of its components.
Earlier Emacsen were allowed to delete windows when shrinking the frame
or enlarging other windows.  Later versions did not restore the original
size of windows when shrinking a frame and restoring its previous size
afterwards.  And there were versions that allowed to shrink a window's
margins when shrinking its frame and not restoring them when enlarging
the frame again.

A main motivation of the later changes was to allow users to smoothly
switch from a maximized/fullscreen frame to a normal one and back to the
maximized/fullscreen frame such that the size and layout of windows in
the respective maximized/fullscreen frames do not differ.  I hope I
succeeded removing most associated problems by now.  Some of them might
still be present though.

>>   This will, however, affect user-set margins that are
>> _not_ continuously refreshed via a hook.
> Does that happen? Users setting window margins, I mean?

To my experience the first margins continuously refreshed by a hook were
introduced by ‘line-number-mode’.  Till then, margins were usually
specified once per buffer and kept their original size until the buffer
was killed.  But my memory might fail.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]