bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#44483: 27.1.50; Window parameter `min-margins' doesn't split window


From: Eli Zaretskii
Subject: bug#44483: 27.1.50; Window parameter `min-margins' doesn't split window in half
Date: Fri, 06 Nov 2020 16:41:05 +0200

> From: Joost Kremers <joostkremers@fastmail.fm>
> Date: Fri, 06 Nov 2020 15:09:36 +0100
> 
> 
> 1. Open any text file, preferably with long lines (to better see the effect).
> 
> 2. `M-x visual-line-mode RET`
> 
> 3. `M-: (set-window-margins (selected-window) 0 150) RET`
> 
> The number 150 is arbitrary. It's appropriate for my case (with a frame width 
> of
> about 238 characters).
> 
> 4. `M-: (set-window-parameter (selected-window) 'min-margins '(0 . 0)) RET`
> 
> 5. `C-x 3`
> 
> At this point, I expect the window to be split into two equally-sized
> side-by-side windows, but the split is at about one third of the original 
> window
> width.

That expectation is incorrect by default.  To have the windows
equally-sized, you need to set window-combination-resize to t, AFAIU,
otherwise Emacs makes no promise that your expectation will be heeded.

> Note that in this recipe, the margins of the two windows aren't adjusted after
> the split, so in the left window the text is not visible at all and in the 
> right
> window, the text area is two characters wide. (In my case, YMMV.)

You expected Emacs to adjust the margins?  The min-margins parameters
is consulted only when determining whether the window can be split, it
has no effect whatsoever on the window dimensions after the split.
And the manual specifically says that it is up to the application to
adjust the margins after the split.





reply via email to

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