Subject: bug#17809: 24.4.50; Completions display

From: Juri Linkov <[email-masked]>
Date: Fri, 27 Jun 2014 02:41:37 +0300

>>> For `with-temp-buffer-window' this means that we would have to fill the
>>> buffer either via `temp-buffer-window-show-hook' or in QUIT-FUNCTION.
>>
>> Maybe filling the buffer is possible in QUIT-FUNCTION, but instead of
>> `with-temp-buffer-window', `minibuffer-completion-help' uses
>> `with-output-to-temp-buffer' that has no QUIT-FUNCTION arg.
>
> Then `temp-buffer-show-hook' should cut it.

You mean calling `fit-window-to-buffer' in `temp-buffer-show-hook' explicitly
instead of using an action alist `(window-height . fit-window-to-buffer)'?

But the problem will still remain, and to solve it we need to fill the buffer
after displaying that would be possible only after changing the order of calls
in `with-output-to-temp-buffer' from

       (prog1 (progn ,@body)
         (internal-temp-output-buffer-show ,buf))

to

       (progn
         (internal-temp-output-buffer-show ,buf)
         (progn ,@body)