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: Eric Abrahamsen
Subject: Re: Suggesting `frame-split-biggest-window' Re: customize location and shape of a new window in a frame
Date: Thu, 13 Sep 2018 09:33:06 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

martin rudalics <address@hidden> writes:

>> If there was a function (frame-split-biggest-window FRAME SIZE SIDE
>> PIXELWISE) to split the "biggest" [*] window in the frame, then
>> neither BBDB nor any other Elisp code would need to keep reinventing
>> this wheel.
>>
>> (The other two functions, more for interactive use, would be
>> `frame-split-biggest-window-below' and
>> `frame-split-biggest-window-right'.)
>>
>> [*] To find the "biggest" window when splitting below, find the
>> tallest window or windows and split the widest of them; when
>> splitting right, find the widest window or windows and split the
>> tallest of them.
>
> 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'.
>
> One functionality Emacs is sadly lacking is that of orderly setting up
> and saving compositions of windows in form of a rectangle.  Eclipse
> calls these "perspectives", in Emacs the concept of "window state"
> comes most closely.  Currently, you have to set up such a state by
> using a sequence of 'split-window' calls which requires to know the
> intrinsics of window splitting, the relationship of parent and child
> windows, window combinations and the like.  Using 'display-buffer' for
> setting up states will hardly produce good results.
>
> It would be nice to have some sort of basic, prefabricated layouts
> like the ones you sketched and choose from them (though a four window
> layout with a different window in each corner of them frame would
> still require to know whether the root window is a vertical or
> horizontal combination).  But I have no good idea yet which layout
> types are really needed and how to provide a suitable interface for
> accessing them.  IIRC the "Emacs IDE" had provisions for them but I
> have not heard from its developers for years.

I thought this is what side windows are for? Maybe it would be tricky to
save and restore whole-frame window configurations (though there are
other tools for that), but side windows, combined perhaps with atomic
windows, seem like the right tool for making rectangular compositions.
The docs even say something about making Emacs look like a traditional
IDE, etc...



reply via email to

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