GNU bug report logs - #55169
Can't combine window-min-height with window-height

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 28 Apr 2022 18:04:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Juri Linkov <juri <at> linkov.net>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 55169 <at> debbugs.gnu.org
Subject: bug#55169: Can't combine window-min-height with window-height
Date: Sat, 7 May 2022 09:58:48 +0200
> 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)))))

Sounds too complicated IMO.  Let's stick to your earlier proposal as

	  (ignore-errors
            (if (eq height 'fit-window-to-buffer)
                (fit-window-to-buffer
                 window nil (cdr (assq 'window-min-height alist)))
              (funcall height window)))

say something like "As a special case, if `window-height' specifies
`fit-window-to-buffer' and ALIST contains a `window-min-height' entry,
pass the value of that entry as MIN-HEIGHT argument to
`fit-window-to-buffer'." and do a similar thing for `window-min-width'.

And if we really want to, we can always add a MIN-HEIGHT argument to
'shrink-window-if-larger-than-buffer' and handle it the same way.

martin




This bug report was last modified 3 years and 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.