Subject: Re: bug#39822: 27.0.90; Cannot set *Completions* buffer height using display-buffer-alist

From: Juri Linkov <[email-masked]>
Date: Sat, 29 Feb 2020 23:10:22 +0200

>> I'm not seeing any adverse effects by obeying the contract:
>
> Neither would I ...
>
>> -           ,(if temp-buffer-resize-mode
>> -                '(window-height . resize-temp-buffer-window)
>> -              '(window-height . fit-window-to-buffer))
>>              ,(when temp-buffer-resize-mode
>> +               '(window-height . resize-temp-buffer-window)
>>                 '(preserve-size . (nil . t))))
>>             nil
>>             ;; Remove the base-size tail because `sort' requires a properly
>
> ... because I'm using 'temp-buffer-resize-mode'.  But IIRC (Juri likely
> knows better) completions windows are traditionally fit to their buffer
> so people who never use 'temp-buffer-resize-mode' would now be surprised
> to not see their completions window fit.  So while we probably can't do
> what you propose above, we should be able to _not_ fit the window when
> the alist already provides an explicit height argument as in your case.

I'm using 'temp-buffer-resize-mode' too.  I don't know why it's disabled
by default.

My old opinion is that we need to try to get rid of these macros
and rely only on alist values.  So it would be easier to override
the default alist values such as 'window-height'.