emacs-devel
[Top][All Lists]
Advanced

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

Re: Window splitting issues with margins


From: martin rudalics
Subject: Re: Window splitting issues with margins
Date: Fri, 13 Nov 2015 15:53:54 +0100

> I'm sorry, how does display-buffer come into this picture?

In another other mail you said

>> let's instead try to solve that on the
>> window-splittable-p level

and that function is used only in the context of ‘display-buffer’.

> I thought
> the original problem was with splitting a wide window in which the
> margins were set to a large size in order to keep the body text at a
> smaller width.  I'm asking whether we could pass this information to
> the code which splits the window, so that its decisions would take
> that information into consideration.

This would have to be done in ‘split-window’ then.  More precisely it
would have to be done in the function ‘window--sanitize-window-sizes’
which tries to make sure that all windows have reasonable sizes
according to the sizes of their margins, fringes, ...

Note one aspect though: When you shrink margins while splitting or
shrinking windows you usually won't get back their old size after
deleting the other or enlarging this window.  That's why I think that
it's much easier when packages manage their preferred size of margins in
‘window-size-change-functions’ and ‘window-configuration-change-hook’.

martin




reply via email to

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