[Top][All Lists]

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

Re: Adding olivetti to GNU ELPA

From: martin rudalics
Subject: Re: Adding olivetti to GNU ELPA
Date: Mon, 20 May 2019 10:24:53 +0200

> The problem I ran into was with Emacs 25 the window splitting code
> changed such that windows with large margins would calculate as
> being too small to split and result in an error. So I needed to make
> olivetti first cycle through all "olivetti-ized windows" and reset
> all the margins to 0, then allow the desired window splitting to
> occur, then cycle through and set up the margins again.

Always resetting the margins is bad.  I'd suggest you devise a special
'olivetti-split-window' function and set the 'split-window' parameter
of every window displaying a buffer in olivetti mode to that function.

'olivetti-split-window' would reset the margins iff the window shall
be split side-by-side, set the window's 'split-window' parameter
temporarily to nil, call 'split-window' and assign the 'split-window'
parameter again for all windows in question.


reply via email to

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