emacs-devel
[Top][All Lists]
Advanced

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

Re: Suggesting `frame-split-biggest-window' Re: customize location and s


From: martin rudalics
Subject: Re: Suggesting `frame-split-biggest-window' Re: customize location and shape of a new window in a frame
Date: Fri, 14 Sep 2018 10:31:37 +0200

>> We have a number of options for that.  One of them is the option
>> 'split-window-preferred-function' (a misnomer) which is by default set
>> to 'split-window-sensibly'.  Consult their definitions first.  The
>> latter's behavior is guided by the options 'split-height-threshold'
>> and 'split-width-threshold' (two more misnomers) .  Together, these
>> should provide a boilerplate for writing your own function which you
>> can then put into 'display-buffer-alist'.
>
> What's missing with these functions is that they start from a given
> window. What's needed is functionality that looks at all the windows
> on (in?) the frame and chooses which one to split.

Specifying such heuristics is non-trivial - 'display-buffer' tries to
first split the largest and then the least recently used window.
Maybe we should refine 'get-largest-window' in the spirit of
'split-window-sensibly'.  But when the latter was introduced, there
were a number of complaints because the behavior of 'display-buffer'
changed in an unexpected way - people were surprised to suddenly see a
window split horizontally.  So any changes should be done carefully.

Also, some buffer display action functions roughly try to split the
window as one at the top or bottom of the frame or the selected one in
order to show the buffer there.  And you can put a window on any side
of a frame by using side windows.  All these try to reconcile window
splitting and reusing to achieve the intended effect.

martin



reply via email to

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