Questions tagged [display-buffer]
10 questions
3
votes
1 answer
Using a predicate function in display-buffer-alist
I want to add a rule to display-buffer-alist, that splits the frame to the right when opening a .pdf file if and only if there is a corresponding .tex file in the same folder.
According to the documentation of display-buffer-alist, I can specify a…

Florian
- 241
- 1
- 11
3
votes
1 answer
make `display-buffer` open buffer in new tab
The display-buffer function seems to be used quite heavily within Emacs. It has a lot of options to determine where to open a new buffer (a new window, a new frame, an existing window, etc).
Emacs introduced a concept of tabs in 27.1. However,…

illabout
- 285
- 2
- 14
2
votes
1 answer
Change and later restore the window configuration of a frame
Imagine I have a frame containing some number of windows—sometimes only one, sometimes split in various ways.
Now imagine that one of the displayed windows contains an org-mode buffer. What I want is:
When I invoke org-edit-src-code, I want…

Colin Fraizer
- 740
- 4
- 12
1
vote
1 answer
emacs display layout for windows of bottom and right sides
With the following code, emacs split sides windows like:
;; -------------------------------------
;; | | * |
;; | | h |
;; | | e |
;; | Main Window…

RNA
- 368
- 2
- 10
1
vote
0 answers
display buffer: split below only once, then reuse
I am trying to tame display-buffer to achieve the following behavior: if I have a frame split once horizontally and then run a function that creates a third window (like help, magit, or similar) I would like it to appear below the selected window…

user27075
- 488
- 3
- 11
1
vote
2 answers
Why does this `display-buffer-alist` rule not do what I expect?
I have the following in the display-buffer-alist list:
(("*"
(display-buffer-in-side-window
((side . left)
(window-width . 110)))))
While display-buffer-overriding-action is (nil).
If I understand correctly, this means that…

Alexey Gorelov
- 143
- 4
1
vote
1 answer
Display attachment to mu4e message (a PDF) in the same window rather than new frame
I am using mu4e and pdf-tools. Whenever I go to open an attached pdf (e.g., with gnus-article-press-button) the attachment pops open in a new frame. How can I control where it pops up? Looking at that function and trying to trace it I couldn't find…

jds
- 177
- 7
1
vote
5 answers
Dired: How to open file with ace-window while keeping focus on dired buffer?
I have this Elisp code that allows me to use ace-window to open a file in a selected window from Dired:
(defun find-file-dired-ace-window ()
"Use ace window to select a window for opening a file from dired."
(interactive)
(let ((file…

Nicholas Hubbard
- 55
- 5
0
votes
1 answer
How to reuse a window in another frame for display-buffer
I like to have the Help buffer in a some frame (with some other windows) and I try to reuse this window in this frame even when I am in another frame and issue a help command.
I tried setting
(setq display-buffer-alist
'(("\\*Help\\*"…

halloleo
- 1,215
- 9
- 23
-1
votes
2 answers
Display buffer without transferring to the buffer
I am using (display-buffer buffer) and (pop-to-buffer buffer). The latter puts the cursor in the buffer. Although I want to show the buffer, I want to stay in the buffer I am working on rather than have pop-to-buffer switch to another buffer.

Dilna
- 1,173
- 3
- 10