[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: display-buffer-alist simplifications
From: |
martin rudalics |
Subject: |
Re: display-buffer-alist simplifications |
Date: |
Thu, 18 Aug 2011 08:57:59 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
>> 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'.
Indeed. ISTR that I readjusted the height of such windows when quitting
them but this somehow doesn't work any more. Hmmmm ...
>>> 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)))
min-height 1 might not be very useful here if the subsequent
`fit-to-buffer' fails. In any case, `dired-pop-to-buffer' must deal
with the fact that no window can be popped up.
> 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.
So why not make this the value of min-height?
>>> 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.
This can be done. BTW in your example above (root . below) is not a
valid alist entry since below is not the value of the key root. We need
something like (window . root) (side . below) instead.
martin
- Re: display-buffer-alist simplifications, (continued)
- Re: display-buffer-alist simplifications, martin rudalics, 2011/08/11
- Re: display-buffer-alist simplifications, Stefan Monnier, 2011/08/11
- Re: display-buffer-alist simplifications, martin rudalics, 2011/08/12
- Re: display-buffer-alist simplifications, Chong Yidong, 2011/08/12
- Re: display-buffer-alist simplifications, Stefan Monnier, 2011/08/12
- Re: display-buffer-alist simplifications, martin rudalics, 2011/08/13
- Re: display-buffer-alist simplifications, Stefan Monnier, 2011/08/13
- Re: display-buffer-alist simplifications, Juri Linkov, 2011/08/16
- Re: display-buffer-alist simplifications, martin rudalics, 2011/08/16
- Re: display-buffer-alist simplifications, Juri Linkov, 2011/08/17
- Re: display-buffer-alist simplifications,
martin rudalics <=
- Re: display-buffer-alist simplifications, martin rudalics, 2011/08/13
- Re: display-buffer-alist simplifications, Stefan Monnier, 2011/08/12
- Re: display-buffer-alist simplifications, martin rudalics, 2011/08/13
- Re: display-buffer-alist simplifications, Stefan Monnier, 2011/08/13
- Re: display-buffer-alist simplifications, martin rudalics, 2011/08/28
- Re: display-buffer-alist simplifications, martin rudalics, 2011/08/29
- Re: display-buffer-alist simplifications, Stefan Monnier, 2011/08/29
- Re: display-buffer-alist simplifications, Stefan Monnier, 2011/08/29
- Re: display-buffer-alist simplifications, martin rudalics, 2011/08/29
- Re: display-buffer-alist simplifications, Juri Linkov, 2011/08/29