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

From: Davor Rotim <[email-masked]>
Date: Sat, 29 Feb 2020 16:26:36 +0100

Hello Martin,

martin rudalics <[email-masked]> writes:

> Strictly spoken, the behavior you describe is a bug because
> 'minibuffer-completion-help' violates the contract obligations of
> 'display-buffer'.  But displaying completions had its own rules ever
> since so I'm not sure what to suggest.
>
> martin

I'm not seeing any adverse effects by obeying the contract:

diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 49daabc..64139bf 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1980,10 +1980,8 @@ variables.")
              ,(if (eq (selected-window) (minibuffer-window))
                   'display-buffer-at-bottom
                 'display-buffer-below-selected))
-           ,(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