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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 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 ...
efe373's user avatar
  • 19
3 votes
1 answer
53 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 ...
sds's user avatar
  • 5,958
0 votes
0 answers
45 views

Org-Mode links opening in new splits?

I'm a bit stuck. I want to open new splits (windows within a frame to be precise) with each link I'm visiting. A bit like going down the rabbit hole. What I have is 1 | 2 and it bounces back between ...
Voodoopants's user avatar
0 votes
0 answers
60 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 ...
user129393192's user avatar
1 vote
2 answers
84 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 ...
Niranjan's user avatar
  • 145
0 votes
1 answer
55 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. ...
Claudio's user avatar
  • 420
3 votes
0 answers
146 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 ...
ldeck's user avatar
  • 215
0 votes
0 answers
18 views

default extension-specific split windows?

I currently have emacs to open up with split vertical windows. This is helpful for .R files but useless for .txt (or other files I edit in emacs). Can I set extension-specific window arrangement in ...
Jacob's user avatar
  • 21
0 votes
1 answer
110 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 &...
Lyn Headley's user avatar
0 votes
1 answer
93 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 ...
alvatar's user avatar
0 votes
1 answer
54 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?
ychaouche's user avatar
  • 207
1 vote
2 answers
236 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. ...
munHunger's user avatar
  • 125
2 votes
0 answers
31 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 | | | | |------|--...
Inspired_Blue's user avatar
0 votes
1 answer
38 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 ...
Doug Harris's user avatar
0 votes
0 answers
40 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 ...
Spacemoose's user avatar
1 vote
0 answers
71 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 ...
Aaron's user avatar
  • 111
1 vote
2 answers
407 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....
page290's user avatar
  • 11
0 votes
0 answers
29 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 ...
jjk's user avatar
  • 721
1 vote
1 answer
88 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 "...
user570286's user avatar
0 votes
1 answer
65 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 ...
Hercislife's user avatar
4 votes
1 answer
100 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 ...
lawlist's user avatar
  • 18.9k
1 vote
2 answers
197 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 ...
buhtz's user avatar
  • 709
1 vote
2 answers
124 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 ...
HippoMan's user avatar
  • 594
0 votes
0 answers
88 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 ...
newuser1's user avatar
1 vote
1 answer
124 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-...
hrkshr's user avatar
  • 133
3 votes
1 answer
93 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 ...
Pedro Delfino's user avatar
1 vote
1 answer
196 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 ...
Ricky Robinson's user avatar
2 votes
1 answer
192 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 ...
Norman Ramsey's user avatar
1 vote
1 answer
186 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) ...
lecodesportif's user avatar
1 vote
1 answer
280 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))...
scaramouche's user avatar
  • 1,772
1 vote
1 answer
349 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, ...
felix's user avatar
  • 153
3 votes
1 answer
195 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 ...
hatmatrix's user avatar
  • 1,056
0 votes
0 answers
35 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 ...
Noel's user avatar
  • 1
0 votes
1 answer
135 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) ...
ironfish's user avatar
  • 248
0 votes
0 answers
30 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.
abhinav chavali's user avatar
0 votes
1 answer
49 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 () (...
Lhooq's user avatar
  • 230
1 vote
0 answers
33 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 ...
futpib's user avatar
  • 111
2 votes
1 answer
158 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 ...
doltes's user avatar
  • 587
2 votes
1 answer
366 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 ...
mcp's user avatar
  • 536
0 votes
1 answer
90 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 ...
Dan's user avatar
  • 191
3 votes
0 answers
96 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() (...
Dan's user avatar
  • 191
0 votes
0 answers
36 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 ...
Dan's user avatar
  • 191
2 votes
1 answer
122 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-...
extremeaxe5's user avatar
7 votes
1 answer
230 views

How to open new window below _all_ other windows?

Suppose my Emacs frame looks like this: .-------------. |a |b | | | | | | | | |------| | |c | | | | | | | '-------------' Is is possible ...
martinoidar's user avatar
1 vote
0 answers
101 views

Split window on specific buffer

I am new to Emacs but I'm working hard to catch up :) I try to get Emacs splits a window (with C-x 3 for example) not on the same buffer (default behaviour) but on a specific *dashboard* buffer. I've ...
sylcha's user avatar
  • 11
1 vote
1 answer
200 views

How can I create a frame and open two files split vertically in it?

I am trying to write an Elisp function that will create a new frame and in that new frame open two files split vertically. I have been unable to find anything about this in the Elisp manual, node ...
Noah's user avatar
  • 121
1 vote
1 answer
101 views

How can I split a window so that the cursor ends up in the right / lower window?

The functions I have found for splitting windows are (split-window-right) and (split-window-below). When these are evaluated the cursor ends up in the right window in the case of (split-window-right)...
fossegrim's user avatar
0 votes
1 answer
457 views

Why set-window-dedicated-p doesn't work with certain buffers?

I use emacs for latex, with pdf-tools. My layout is always a window with PDFView buffer on the right, any other buffer on the left. I always want the right window that cannot be touched by ...
PinkCollins's user avatar
4 votes
1 answer
2k views

Split Emacs Screen Three Ways

In my .emacs file I have (split-window-right). This has been working fine so far, but now I'm finding it would be easier if my workspace looked like: where each box is a separate window. So really I ...
user2154420's user avatar
0 votes
1 answer
203 views

Get org-agenda toggle all agenda and todo below frame (similar to ivy list buffer)

I have this function: (defun org-agenda-show-agenda-and-todo (&optional arg) (interactive "p") (org-agenda arg "n")) When calls, it will toggle a window with all of my current agenda ...
mle0312's user avatar
  • 295