Subject: bug#35592: Use display-buffer-in-direction for completion-like windows

From: martin rudalics <[email-masked]>
Date: Tue, 7 May 2019 10:14:31 +0200

> This could be fixed by using something like:
 >
 > (display-buffer "*Marked Processes*"
 >    '((display-buffer-in-direction)
 >      (direction . bottom)
 >      (window . main)
 >      (window-height . fit-window-to-buffer)))
 >
 > The same would be useful also for Widget using e.g.
 >
 > diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
 > index b9f98cdc4c..b077299c0e 100644
 > --- a/lisp/wid-edit.el
 > +++ b/lisp/wid-edit.el
 > @@ -252,7 +252,11 @@ widget-choose
 >   	   (define-key map [?\M--] 'negative-argument)
 >   	   (save-window-excursion
 >   	     (let ((buf (get-buffer " widget-choose")))
 > -	       (fit-window-to-buffer (display-buffer buf))
 > +	       (display-buffer
 > +		buf
 > +		'(display-buffer-in-direction
 > +		  (direction main bottom)
 > +		  (window-height . fit-window-to-buffer)))
 >   	       (let ((cursor-in-echo-area t)
 >   		     (arg 1))
 >                    (while (not value)

Would these work despite of the 'fit-window-to-buffer' problem you
reported earlier?

martin