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
3
votes
0answers
40 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
2answers
48 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
2answers
31 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
0answers
37 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 ...
0
votes
0answers
16 views

How to change the size of the popup window from org-edit-special?

When I type C-c ' on an org-babel source block, a horizontal split buffer appears where I can edit the source code. If I want to resize this pane, I can do it with window resizing commands or just ...
1
vote
1answer
41 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-...
0
votes
0answers
22 views

default split into vertical panes, but don't further split more than 2 panes

When I open a new buffer I would like emacs to split the current buffer into two vertical panes side-by-side (with a vertical line down the middle). Eg I have a single buffer open with source code, I ...
3
votes
1answer
45 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 ...
0
votes
1answer
29 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 ...
0
votes
0answers
36 views

Treemacs and Transpose-Frame issue

I use treemacs to navigate files and functions, open in a panel to the left (window 1). I also like the transpose frame package functions to change the orientation of windows, however this doesn't ...
1
vote
1answer
33 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
1answer
109 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
1answer
96 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))...
0
votes
1answer
53 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, ...
0
votes
0answers
24 views

Split window horizontally when calling switch-to-buffer-other-window the first time

When calling switch-to-buffer-other-window interactive function the first time, the window is split horizontally. I would like the window to split vertically instead of horizontally by default. Is it ...
3
votes
1answer
63 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
0answers
30 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
0answers
18 views

Eval expression in split window

Scenario: I am working in a single window with sql expressions. ---------------------- | File 1 | | | | expr 1 | | expr 2 | | etc... ...
0
votes
1answer
47 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
0answers
12 views

`(setq max-mini-window-height 1)` splits windows randomly

I have observed that using (setq max-mini-window-height 1) splits windows randomly. I was wondering what may be the main cause of this? On the example file, when the cursor comes to beginning of less ...
0
votes
0answers
25 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
0answers
157 views

How do I split a side window?

I am using the org-roam package, which, while great, uses up the entire side window of my main emacs frame. I would like to use some of that side window to display something else, ideally an eaf ...
0
votes
1answer
33 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 () (...
0
votes
0answers
26 views

Split windows horizontally not working when global-visual-fill-column is enabled

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
0answers
20 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 ...
0
votes
0answers
40 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 ...
1
vote
1answer
155 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
1answer
60 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 ...
2
votes
0answers
48 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
0answers
26 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
1answer
68 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-...
6
votes
1answer
137 views

How to open new window below _all_ other windows?

Suppose my Emacs frame looks like this: .-------------. |a |b | | | | | | | | |------| | |c | | | | | | | '-------------' Is is possible ...
1
vote
0answers
44 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 ...
1
vote
1answer
76 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 ...
0
votes
1answer
42 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)...
0
votes
1answer
165 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 ...
4
votes
1answer
877 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 ...
0
votes
1answer
87 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 ...
0
votes
0answers
45 views

Function to toggle 'list-bookmark' in the style of Neotree or speedbar

I modified this function: #+BEGIN_SRC emacs-lisp (defun toggle-bookmark-list () "Toggles between bookmark list and current buffer " (interactive) (if (string= (buffer-name) "*Bookmark ...
0
votes
2answers
111 views

How could "C-x 4 b "which pop-up-window but display to the right?

In emacs -Q, I strike C-x 4 b which invoke (switch-to-buffer-other-window) and display the other window vertically as I reference it's source code (defun switch-to-buffer-other-window (buffer-or-...
0
votes
0answers
14 views

Provide hint about which windows for a function to use?

I like follow-mode which I have recently discovered. But I would like to avoid completely losing my window setup within a frame. Is there a way to label a window as usable by a function?
1
vote
1answer
105 views

How to prevent the completion window from hogging up nearly whole frame (-3 lines)?

One or the other of the various Emacsen has been, at different times, my one and only editor on all *nix systems¹. I usually use one X window per buffer, so I can arrange windows side by side, or use ...
2
votes
1answer
91 views

Linked, Split screen scrolling for a single buffer?

I would like to be able to have a C-x 3 split to have two windows in a frame both windows view a single buffer window on left ends at line n window on right starts at line n +/- configurable offset ...
1
vote
2answers
415 views

Two windows split horizontally-> can't split vertically

emacs 26.1 I split windows-horizontally by split-window-horizontally Nice. Now I want to get smt like this: I try split-window-vertically , but I get this (not correct result):
5
votes
1answer
266 views

C-x 3 open a new buffer to the left of the current buffer

When strike C-x 3, a new window and buffer will open to the right of the current buffer. How could set it open to the left of the current?
1
vote
1answer
140 views

Choose where org-agenda-tree-to-indirect-buffer window opens

If I have an org file open: +----------------------------------------+ | | | | | ...
0
votes
0answers
87 views

How to keep a high-level window configuration?

I use Emacs as a single maximized frame. The monitor is wide enough for two windows to sit together there, with a vertical split. I want this window configuration to be permanent, i.e.: I want it to ...
1
vote
0answers
264 views

How to open two files in two frames on startup?

Here's what I'm trying to make happen: on startup, I want emacs to split vertically into two windows displaying two different files, with my to-do list on the left side of the screen and my notes on ...
1
vote
0answers
98 views

Open code snippet from org-mode with C-' in a vertical split instead of an horizontal one

In org-mode, I open a code snippet with C-' (org-edit-special) to edit it in a separate split. By default, it opens it in a horizontal split. Is there a way to open a code snippet from org-mode with ...
1
vote
2answers
102 views

How prevent `display-buffer` from opening a specific buffer in a new window if and only if it is shown in another frame

I want the *compilation* buffer to not pop up in my main frame when I have it in another frame already open. However if the buffer is not shown anywhere, I do want it to pop up in a new window of the ...