unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#35592: Use display-buffer-in-direction for completion-like windows
@ 2019-05-05 20:40 Juri Linkov
  2019-05-07  8:14 ` martin rudalics
  0 siblings, 1 reply; 20+ messages in thread
From: Juri Linkov @ 2019-05-05 20:40 UTC (permalink / raw)
  To: 35592

Proced has dired-like UI.  Dired smoothly displays a completion-like
confirmation window with filenames.  ‘proced-with-processes-buffer’
even has a comment proudly declaring its compatibility with dired:

         ;; Analogous to `dired-pop-to-buffer'
         ;; Don't split window horizontally.  (Bug#1806)

But in fact currently Proced can't handle more than 1 window on the same frame.

For example, compare these cases:

When there is only 1 window:

0. emacs -Q
1. M-x proced
2. C-x 1
3. d d x

then a list of *Marked Processes* is displayed in the bottom window
nicely like in Dired.

But when windows are split vertically:

0. emacs -Q
1. M-x proced
2. d d x

then a list of *Marked Processes* is displayed in the top window.

When windows are split horizontally:

0. emacs -Q
1. C-x 3
2. M-x proced
3. d d x

then the buffer *Marked Processes* is displayed in the left window.

Splitting to more windows cause it to display this buffer in random places.

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)







^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-06-05 20:57 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-05 20:40 bug#35592: Use display-buffer-in-direction for completion-like windows Juri Linkov
2019-05-07  8:14 ` martin rudalics
2019-05-07 21:30   ` Juri Linkov
2019-05-08  9:09     ` martin rudalics
2019-05-08 19:32       ` Juri Linkov
2019-05-09  8:12         ` martin rudalics
2019-05-09 19:50           ` Juri Linkov
2019-05-10  5:34             ` Eli Zaretskii
2019-05-11 20:48               ` Juri Linkov
2019-05-12  2:31                 ` Eli Zaretskii
2019-05-12 19:17                   ` Juri Linkov
2019-05-19  9:17                     ` martin rudalics
2019-05-19 19:54                       ` Juri Linkov
2019-05-20  8:25                         ` martin rudalics
2019-05-20 20:36                           ` Juri Linkov
2019-05-21  7:32                             ` martin rudalics
2019-05-21 20:18                               ` Juri Linkov
2019-05-22  8:31                                 ` martin rudalics
2019-06-05 20:57                                   ` Juri Linkov
2019-05-19  9:17                 ` martin rudalics

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).