[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help with display-buffer-alist
From: |
Ergus |
Subject: |
Help with display-buffer-alist |
Date: |
Fri, 15 Apr 2022 13:15:31 +0200 |
Hi:
I am trying to mimic somehow the swiper behavior with occur. The first
step for that is to put the occur window always at bottom which was
pretty simple with this:
(add-to-list 'display-buffer-alist ("*Occur*" display-buffer-at-bottom))
But now I want somehow to limit the window height to 10 lines.
With the documentation of display-buffer and display-buffer-alist It
says that there should be (CONDITION . ACTION) where:
ACTION is a cons cell (FUNCTIONS . ALIST), where FUNCTIONS is an
action function or a list of action functions and ALIST is an
action alist. Each such action function should accept two
arguments: a buffer to display and an alist of the same form as
ALIST. See `display-buffer' for details.
So I tried substituting display-buffer-at-bottom with:
(display-buffer-at-bottom . (window-height . 10))
But I am obviously doing something wrong because this just doesn't
work... so the question is: how do I use correctly the
(FUNCTIONS . ALIST) in the extended way?
Thanks in advance,
Ergus...
PD: Maybe another example with this answer may be added to the docstring.
- Help with display-buffer-alist,
Ergus <=