Questions tagged [window-splitting]
is for splitting an Emacs window into two. Multiple windows can display different buffers, or different parts of one buffer. Emacs has several default key bindings for splitting windows.
165 questions
0
votes
1
answer
39
views
Restrict window split with "other" commands only to two windows
On a bigger monitor with higher resolution, the window split with the "other" functions keeps splitting the windows into 3, 4 windows. Is there a simple way to set the limit for the splits ...
1
vote
1
answer
54
views
Child frame dedication
I want to work with child frames. Do child frames support dedication, the property of dedicated frames?
Emacs supports window dedication, where a window is locked to a particular buffer, preventing ...
0
votes
2
answers
69
views
Emacs refusing to close windows
No matter what I try, no matter what commands, I cannot close windows, it says something like:
Window #<window 4 on item.rs> has same side left as major side window #<window 7> but its ...
6
votes
2
answers
212
views
How can I close all other windows on the same side of a vertical split where the current window is?
I always work with Emacs in full screen mode and a vertical split down the middle, with windows on the left and right sides. How could I write an elisp command that would close all other windows on ...
2
votes
1
answer
85
views
Prevent overly window (mis-)management
I have EMACS window normally split in two panes (C-x 3), left is for editing, right is for command line for example. I edit .po file in the left pane: I select an entry, hit ENTER and subedit buffer ...
0
votes
1
answer
125
views
display-buffer-alist does not seem to work
The aim is to display a buffer named *navigator* in a side window at the bottom.
I have following code.
;; the function toggle-navigator is in another directory being imported as a package.
;; it is a ...
1
vote
1
answer
109
views
How to set one emacs window to be unsplitable?
I like to create a small ansi-term window at the bottom of my emacs frame, so if I'm editing two files "A" and "B", my emacs frame would look like this:
+------+------+
| | ...
0
votes
0
answers
113
views
Split horizontally after installing treemacs
I have installed treemacs package and I have enabled it in init.el file to open the treemacs on start-up. However, this also splits my window horizontally as in the picture below. I do not want the ...
3
votes
1
answer
111
views
Permanent two-horizontal-windows configuration
I want my emacs frame to be permanently split into two (or sometimes 3 - with a different monitor - but let's talk two for now) columns of windows.
E.g., C-x 0 and C-x 1 may only affect the windows in ...
0
votes
1
answer
337
views
How to open a eshell buffer in a different window in doom emacs?
I want to open an eshell buffer in right side of the current window in the same frame.
0
votes
0
answers
172
views
New windows open below (horizontal split) by default
Before, I used to have that windows would open on the right of my current window for things like M-x man and M-x shell. Now I have that they open below. All I've done is uninstall and reinstall my ...
1
vote
2
answers
229
views
How to change split-window-below to split-window-right?
I am using AucTeX with GNU Emacs 30.0.50. It has a shortcut C-c C-l for viewing the processing of the TeX file. It seems to be using split-window-below command for opening the new buffer. Is there any ...
1
vote
1
answer
139
views
What does "split-window: Window #<window 3 on *scratch*> too small for splitting" mean?
Context: GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2023-03-30, Development version 4508a024e818 on emacs-29 branch; build date 2023-03-30. ...
5
votes
0
answers
407
views
Help: delete-other-windows only working from the original window
Overview
I'm having trouble understanding from my current config why C-x 1 (i.e., M-x delete-other-windows) does not work when executed from a window in a project that was created as a result of ...
1
vote
1
answer
420
views
How do I prevent switch-to-buffer-other-window from creating an unwanted new window?
I am seeing confusing behavior when using switch-to-buffer-other-window.
When there is only a single window, and I run these two commands:
M-x split-window-right
M-x other-window
M-x eval-expression &...
0
votes
1
answer
133
views
How can I control in which window are open the errors in a compile buffer?
Summary: How can I control in which window are open the error links in a compile buffer? That is, if I have already 2 windows, I want that the error jumps to the other open window and reuses it for ...
0
votes
1
answer
113
views
How to create a new window on the bottom starting from this configuration
Starting from this window configuration of 5 windows split like this
How do I create a sixth window that would take all the bottom space like the outline in red?
1
vote
2
answers
765
views
save a specific layout
I am pretty new to emacs (doom-emacs in this case) and I have an idea of what I want to do, but not sure how to do it.
What I am after is that when I open a .js file, I want to split my window into 3.
...
2
votes
0
answers
60
views
How to control the direction of collapse with `C-x 0` or `delete-window`?
This is a follow up to this emacs stackexchange question:
Given split windows like this:
|------|-------|
|1 |2 |
| | |
|------|-------|
|3 |4 |
| | |
|------|--...
0
votes
1
answer
68
views
Change vc-print-log split axis
I recently updated to emacs 28.2 (as packaged from https://emacsformacosx.com/). Prior to this if I hit C-x v l (vc-print-log) to see a file's git history, the window split horizontally. I'd have the ...
0
votes
0
answers
93
views
Instruct emacs not to open new window when following a link
I'm thinking of two specific examples, but I'm sure there are more. Currently when I do a rg, and select one of the files, it is opened in a new window in my current frame. Likewise if I am ...
1
vote
0
answers
105
views
How do I start emacs with two horizontal windows one of which is dired?
How do I write a function and call it in my init script so that when I open a file, I have two horizontal windows, the left one being dired mode and about 25% of the total emacs screen, while the ...
1
vote
2
answers
720
views
Using hydra to split windows like in doom-emacs and Spacemacs
I am writing my own Emacs config coming from doom-emacs and Spacemacs. One thing I really miss is the ability to split windows using split-window-below and split-window-right using S-w s s and S-w s v....
0
votes
0
answers
41
views
How can I disable horizontal pop up buffers?
If my laptop is connected to a 4K monitor, org export dispatcher, magit other pop up buffers are placed vertically at the right side. If undocked these buffers are placed horizontally over the low-res ...
1
vote
1
answer
176
views
How can I keep windows from being shrunk past their fill-columns?
Typically I have two windows, left and right, with the left window (call it the "editing window") showing a buffer in a prog-mode or text-mode and the right window (call it the "...
0
votes
1
answer
119
views
Trying to open Diary on startup but Emacs is launching in split screen, how can I stop it
I have (diary) setup in my .emacs file so that it will launch diary on launch but it always launches in horizontal split screen with fancy diary mode on bottom and Scratch on top. I've inhibited the ...
4
votes
1
answer
123
views
How to get a window in a corner of the frame
Is there a built-in function to return a window in a particular corner of a frame (e.g., lower-left, upper-left, upper-right, lower-right).
The following is a first draft to locate the lower-left ...
1
vote
2
answers
422
views
Split window and move cursor to new window with predefined Emacs command/function
I can split windows with C-x 2 (split-window-below) or C-x 3 (split-window-right). But the cursor does not move to the new window.
When I split I need to have the cursor in the new window. Is there a ...
1
vote
2
answers
228
views
Exotic dired-based window-splitting mode
NOTE: I added more info to this query. Initially, I didn't mention dired, but after experimenting, I see that it needs to be explicitly discussed here, because of how it manages buffers.
I'm using ...
0
votes
0
answers
110
views
Buffer divider staggered upon split window and scroll
Whenever I split windows or scroll with a split window, the buffer dividers and text end up staggered horizontally.
Here is a screenshot of a file without the split window or issue shown.
And here is ...
1
vote
1
answer
236
views
Help window in ESS
I am using ESS for using R. When I use help in ESS, I have the screenshot like Picture 1. But, I want to get Picture 2. How do I manage my init.el? The following code is my init related to ESS.
(use-...
3
votes
1
answer
193
views
How to control the resulting sizes when splitting a window?
I often split my windows into two with C-x 2. The window in the bottom tends to be the SLIME's REPL or Magit and the one at the top is usually the common lisp file being edited.
I like to have more ...
1
vote
1
answer
295
views
With side-by-side windows how to slide the middle vertical bar?
I often have two buffers open side by side and I'd like to be able to slide the central vertical bar to the left or to the right, in order to make either buffer wider or narrower.
Is this supported in ...
2
votes
1
answer
363
views
What controls whether `M-x compile` splits a frame into two windows?
To resolve some performance issues I refactored my .emacs, and since the refactoring, M-x compile does not split a frame into two windows. Instead, running M-x compile takes over the entire frame ...
1
vote
1
answer
233
views
Is it possible to open Deft in a sidebar?
I'm trying to open Deft in the left sidebar using this code:
(setq display-buffer-alist
'(("*Deft*"
(display-buffer-in-side-window)
(window-width . 0.25)
...
1
vote
1
answer
396
views
Using Shackle to manage WoMan buffers
I would like shackle.el to manage the buffers created by WoMan.
Here's the configuration I'm using:
(use-package shackle
:config
(setq shackle-rules '((woman-mode :select t :align below :size 0.5))...
1
vote
1
answer
617
views
Open two files on startup - how to set vertical split as default?
When I invoke Emacs from the shell with the command emacs fileA fileB, I'd like to have the Emacs window split vertically (i.e. with one file on the left and one file on the right), not horizontally, ...
4
votes
1
answer
413
views
How can I specify the maximum number of windows
I like to work with two windows split horizontally or vertically. However, when I try to use C-x 4 f (ido-find-file-other-window) when I already have two windows, it will split one of my windows so I ...
0
votes
0
answers
43
views
Stop reftex-toc from opening a new window if only one window is currently open
Currently when I choose an entry from RefTex's table of contents (opened using the C-c = keybinding), if I only have a single window open, the chosen file is opened in a new window to the right of the ...
0
votes
1
answer
279
views
Open a new buffer on the right
I just upgraded from Fedora Linux 32 to Fedora 33 and I think this updated emacs as well because I now see some new behaviours.
I have set:
(global-set-key (kbd "<f6>") 'org-todo-list)
...
0
votes
0
answers
44
views
Create term horizontal split that is 20% size key binding
I'd like a key binding that can create a term buffer in a 25 percent split. What I mean by that is, with a specific key binding like SPC t c, I'd like to open up a terminal in a split.
0
votes
1
answer
73
views
Adapt a function to work when windows are split only vertically
As @drew asked me to do here I'm asking one question per problem
I'm trying to enable/disable visual-fill-column when there is one window/multiple windows.
(defun my-visual-fill-one-window ()
(...
1
vote
0
answers
43
views
How to show all split window titles in the X11 window title?
If I split an Emacs frame (one X11 window) into multiple Emacs windows (with C-x 2 and C-x 3) and open different Emacs buffers in different Emacs windows, Emacs frame title (X11 window title) displays ...
3
votes
1
answer
256
views
How to control the way windows are opened by "next-error" and "previous-error"?
The context
In the gif shown below, I demostrate that the way next-error show the current error in a new window depends on the size of the font.
When using the font Fira Code 20, a single window is ...
2
votes
1
answer
527
views
Force one window when opening multiple files
Any time I open multiple files I'd like emacs to only show me one buffer. I do not want any split windows. This would save me a keystroke every time.
I learned I could do away with the buffer list ...
0
votes
1
answer
111
views
Prevent screen splitting by julia-repl
I want to prevent julia-repl from splitting my screen, which seems like a common request given the numbers of questions I have found relating to this. Drawing on advice found here and here, I came up ...
3
votes
0
answers
113
views
Why is file buffer replaced by scratch buffer on startup?
When I open an R file in ESS-mode, I'd like emacs to setup my panes in a certain format.
To this end, I've added the following to my init.el.
(add-hook 'ess-mode-hook
(lambda()
(...
0
votes
0
answers
49
views
Patching together emacs buffers and shells outside of emacs
I'd like to use emacs as a replacement for my current IDE when using R. I like to divide my workspace into three panes:
Text editor
R console
zsh
Previously, I had used tmux to achieve this by ...
2
votes
1
answer
158
views
In EXWM `split-window-right` followed by immediate `windmove-right` swaps order of buffers
I have a function
(defun bad-fn ()
(interactive)
(split-window-right)
(windmove-right)
)
If I go to a frame with just one window visiting EXWM buffer A (and buffer B
is next), and call
split-...
7
votes
1
answer
269
views
How to open new window below _all_ other windows?
Suppose my Emacs frame looks like this:
.-------------.
|a |b |
| | |
| | |
| |------|
| |c |
| | |
| | |
'-------------'
Is is possible ...