|
From: | Juri Linkov |
Subject: | bug#55169: Can't combine window-min-height with window-height |
Date: | Fri, 06 May 2022 18:34:35 +0300 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
>>> You mean the value of a 'window-height' entry could also be a >>> >>> • A list whose CAR is a function and whose remaining elements >>> are the arguments passed to that function. >>> >>> so we'd run >>> >>> (ignore-errors (funcall (car height) window (nth 1 height) ...)) >> ... > This boils down to what I sketched above: ALIST must supply a list whose > car is 'fit-window-to-buffer' and 'window--display-buffer' supplies the > window used as first argument in its call to 'fit-window-to-buffer' and > the rest of the list as the remaining arguments. Then this could be an easy to explain rule. I'm only unsure about the WINDOW argument. What if another function has a WINDOW argument in another position, not the first? Maybe better to allow a lambda like this: (pop-to-buffer (generate-new-buffer "*edit string*") '(display-buffer-below-selected (window-height . (lambda (window) (fit-window-to-buffer window nil 10)))))
[Prev in Thread] | Current Thread | [Next in Thread] |