[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#55169: Can't combine window-min-height with window-height
From: |
martin rudalics |
Subject: |
bug#55169: Can't combine window-min-height with window-height |
Date: |
Fri, 13 May 2022 09:01:46 +0200 |
> Adding an alist is a good idea, but unfortunately it's not
backwards-compatible.
That's what I'm trying to bring up ever since we started this thread.
AFAICT we'd need two new functions at least - an action function say
'display-buffer-split-window' and a 'dislay-buffer-fit-window' function
- both accepting the ALIST as (additional) argument.
>> Think of an application suggesting 'fit-window-to-buffer' with some
>> 'window-min-height' value and a user who wants to use
>> 'shrink-window-if-larger-than-buffer' instead but still use the
>> 'window-min-height' value proposed by the application. How would we do
>> that?
>
> I have no idea how to make this backwards-compatible.
It can be done with global variables but the resulting code will be
neither elegant nor comprehensible. IMO any such information must be
inevitably passed on through the ALIST argument.
> Definitively the functions that create a new window
> should take into account height constraints.
> But not sure about functions that select the existing window.
> Should they resize the existing window?
They do so already. With emacs -Q do
(pop-to-buffer (get-buffer-create "*edit string*")
'(display-buffer-below-selected
(window-height . (lambda (window)
(fit-window-to-buffer window nil 10)))))
followed by
(pop-to-buffer (get-buffer-create "*edit string*")
'(display-buffer-below-selected
(window-height . (lambda (window)
(fit-window-to-buffer window nil 20)))))
martin
- bug#55169: Can't combine window-min-height with window-height, (continued)
- bug#55169: Can't combine window-min-height with window-height, Juri Linkov, 2022/05/06
- bug#55169: Can't combine window-min-height with window-height, martin rudalics, 2022/05/07
- bug#55169: Can't combine window-min-height with window-height, Juri Linkov, 2022/05/08
- bug#55169: Can't combine window-min-height with window-height, martin rudalics, 2022/05/09
- bug#55169: Can't combine window-min-height with window-height, martin rudalics, 2022/05/09
- bug#55169: Can't combine window-min-height with window-height, Juri Linkov, 2022/05/09
- bug#55169: Can't combine window-min-height with window-height, martin rudalics, 2022/05/10
- bug#55169: Can't combine window-min-height with window-height, Juri Linkov, 2022/05/11
- bug#55169: Can't combine window-min-height with window-height, martin rudalics, 2022/05/11
- bug#55169: Can't combine window-min-height with window-height, Juri Linkov, 2022/05/12
- bug#55169: Can't combine window-min-height with window-height,
martin rudalics <=
- bug#55169: Can't combine window-min-height with window-height, Juri Linkov, 2022/05/13
- bug#55169: Can't combine window-min-height with window-height, martin rudalics, 2022/05/14
- bug#55169: Can't combine window-min-height with window-height, Richard Stallman, 2022/05/11
- bug#55169: Can't combine window-min-height with window-height, Juri Linkov, 2022/05/12
- bug#55169: Can't combine window-min-height with window-height, Juri Linkov, 2022/05/18
- bug#55169: Can't combine window-min-height with window-height, martin rudalics, 2022/05/19
- bug#55169: Can't combine window-min-height with window-height, Juri Linkov, 2022/05/19