emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: display-buffer-alist simplifications


From: Juri Linkov
Subject: Re: display-buffer-alist simplifications
Date: Wed, 17 Aug 2011 12:27:14 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

>>    Also provide a parameter to resize the reused window.
>
> So far we only even the size of a reused window.

Adjusting the size is also necessary with `fit-window-to-buffer'
(optionally) like in `dired-pop-to-buffer'.

>> 3. Otherwise, taking into account min-height try to create a new window
>>    with the specified height at the bottom of the selected frame.
>
> Calling `display-buffer-pop-up-window' with root and below as only
> choices, passing min-height and the specified height as arguments.

In `dired-pop-to-buffer', `min-height' is specified as an argument
of `fit-window-to-buffer'.  It would be good instead of

  (fit-window-to-buffer (display-buffer-pop-up-window " *Marked Files*"
                         '((root . below)))
   nil 1)

to specify that as

  (display-buffer-pop-up-window " *Marked Files*"
   '((root . below) (min-height . 1) (fit-to-buffer . t)))

This could avoid calling `fit-window-to-buffer' directly, because
`display-buffer-pop-up-window' could interpret the parameter
`fit-to-buffer' as an indication to calculate the height of the created
window from the number of lines in the buffer to be displayed.

>> 4. Otherwise, reuse any available window on the selected frame.
>>    Provide a parameter to define the order of different methods:
>>    largest, lru, rightmost, etc.
>
> `display-buffer-reuse-window' doesn't recognize these methods yet.  We
> would either have to get them manually and pass the windows directly or
> expand the semantics of the second argument.

They could share the same semantics to find the window to reuse/split.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]