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.

1
vote
1answer
25 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 ...
3
votes
1answer
64 views

How to display *help* buffers below one specific window?

I am (really) new in Emacs and ESS, and I am currently trying to customize my environment. The default settings of ESS[R] are convenient for me, since ESS[R] organizes the windows as follows: --------...
1
vote
0answers
37 views

open buffers from sr-speedbar in previously active window instead of splitting window

I'm using sr-speedbar to manage a list of buffers. After M-x sr-speedbar-toggle, I switch to the speedbar window, press b to switch into Quick Buffer mode, and then press Enter to select a buffer. In ...
2
votes
1answer
68 views

How to move windows?

How can I move a window from being a horizontal split down below all other windows to being a vertical split panel on the left? I don't want to move buffer contents - I want to move the actual window.
1
vote
0answers
29 views

Restore Spacemacs project windows layouts

Opening a project I would like the windows restored as I left them. E.g. tests.py on the left and a terminal /home/projectdir/>$ on the right: |-----------+-----------| | tests.py | >$_ |...
2
votes
0answers
23 views

Restoring windows with Desktop when running Emacs inside a terminal? [duplicate]

Maybe a silly question: I'm using desktop for saving Emacs' sessions. I've set (setq desktop-restore-frames t) (desktop-save-mode 0) So windows and frames state is supposed to be saved, and I'm ...
3
votes
2answers
77 views

Open org-mode links to info in different window?

I was wondering if anyone knew of a way to open links to info pages (Emacs manual) from org-mode without changing the current buffer to that info page? The reason I would like to do this is because I ...
1
vote
0answers
28 views

elisp: create window layout with specific cycling order

I'd like to create a window layout like so: -----------|-------------- a | b -----------|-------------- d | c -----------|-------------- This is so that I can cycle from a ->...
0
votes
0answers
26 views

Display annotation contents horizontally in pdf-tools *with* live-preview

When looking at annotations with the pdf-annot-list-annotations command from the pdf-tools package, I prefer to preview my annotation contents in a separate buffer, which is the default behavior. ...
0
votes
0answers
24 views

buffer opens in window below if font size is changed

In my config file I changed the line (set-face-attribute 'default nil :height 100) to (set-face-attribute 'default nil :height 90) and suddenly, when I try to open a file in a separate vertical ...
1
vote
0answers
42 views

Why is cursor moving after a save?

When working with the same buffer in multiple windows within one frame, it seems like the location of the cursor in, say, window A gets inadvertently set as a marker such that right after the buffer ...
0
votes
0answers
18 views

Ada mode : navigating through code, always open in new window

when I navigate in ada-mode, The first time that I press C-cC-d (ada-goto-declaration), Emacs divide vertically the frame, and open the new file in the other window. Most times, every C-cC-d press, ...
0
votes
0answers
37 views

Save whole emacs session

After closing emacs I would like to restore the same session I left, which includes opened windows, font sizes within the windows and open buffers. I'm aware there's a lot out there, but most things ...
1
vote
5answers
77 views

Copy-paste text among Split Window Buffers

Say I have split my main Emacs Window into 2 : LEFT and RIGHT. My cursor is currently in LEFT. How do I copy some text from LEFT to RIGHT without going to the RIGHT window?
0
votes
1answer
74 views

How can I startup Spacemacs with several windows?

I'd like to have two windows opened (vertical split) after startup of Spacemacs. How do I have to configure .spacemacs?
2
votes
1answer
65 views

how can I programatically transition between those 2 window layouts?

I am trying to implement this window transition a/ b/ --------- ------------- | 1 | 2 | | | 1 | 2 | --------- -> | 0 |-------| | 3 | 4 | | | 3 | 4 | --------- ...
6
votes
4answers
587 views

Switch between horizontal and vertical splitting?

From time to time, by mistake, I split my screen vertically C-x 3 (binded to split-window-right), whereas I originally wanted a horizontal splitting C-x 2 (binded to split-window-below). Question: is ...
0
votes
1answer
52 views

Eshell command in another window keeping focus in the working one

Ho can I run an eshell command in another window keeping focus in the working one? Let's say I'm scanning a buffer searching for a regexp (to be precise an URL) and every time I find it I want to ...
1
vote
0answers
59 views

migrated from emacs 25 to 26.1: cannot force find-file/counsel-projectile-find-file to always open buffer in current window

Recently I migrated from emacs 25 to 26.1. Before I reached the window behaviour, where I could always open a file at the window at point. The most simple case to illustrate undesired behaviour: I ...
2
votes
0answers
114 views

Force new window to open to the left or right

I have two frames open with the following window splits: Frame 1 Frame 2 |---+---+ |------| |a |b | |d | | | | | | |---+---+ | | |c | | | |---+---+ |------| Say that ...
1
vote
0answers
31 views

How to change which window a click in *Occur* buffer affects?

My use case: I am looking at one place in the code in one window (call it window A), have a second window with the SAME code open (window B) in the same frame, together with an Occur buffer, that I ...
1
vote
0answers
196 views

Emacs 26-1 Problems : find-file and neotree

The Problems: I just did a full re-install to Fedora 29, which included the dnf install emacs command. This installed emacs 26-1; formerly I was using emacs 25.2. Formerly, my emacs initialization ...
1
vote
1answer
79 views

Which hooks guarantee proper (re)displaying of windows after windows configuration is changed?

I'm writing a simple minor mode (for personal use) which dynamically sets fringes according to current window width. I added a dedicated function to those hooks: window-configuration-change-hook ...
1
vote
1answer
96 views

How to launch (start) emacs with a single window and choose the buffer of that window as default in the init.el file? [closed]

What statements in the init.el file can be added so that there is a single window shown as the default I have is split into 2 windows vertically aligned (equivalent to typing C-x 1)? Then once there ...
3
votes
1answer
190 views

How to force new `shell` to appear in current window?

Whenever I run M-x shell, a buffer appears almost randomly somewhere - splitting current windows as it sees fit. I cannot work out the logic behind it. The docstring says: (shell &optional ...
0
votes
0answers
24 views

Icicles: Why candidates are on the right side?

windows 10 , Emacs 26.1, Icicles In my init.el (add-to-list 'load-path "~/.emacs.d/elpa/icicles") (require 'icicles) (icy-mode 1) And when I type the candidates are show on the right side. Why? ...
3
votes
1answer
61 views

Have compilation errors / grep match reuse current frame/window without ever splitting it?

I have searched in a number of places (1, 2, 3, 4) even looked at the e-lisp source files and could not figure out how to do, so I ask. Context I have bound next-error to a key. I'm in some source ...
1
vote
2answers
172 views

How fast swap between buffers?

Windows 10, Emacs 25.1 I have 4 open buffers. Here To switch from buffer "file_1.txt" to buffer "file_2.txt" I use standard command windmove-right. It is bound to <M-right>. To switch from ...
1
vote
1answer
90 views

Unable to use ediff with emacs and evil due to window configuration

Running emacs 25.2.2 with evil installed and updated from Melpa. When I run ediff, it asks for usual buffer A and buffer B and then ONLY the ediff buffer in its own frame is visible with 'Type ? for ...
1
vote
1answer
32 views

helm-find-file (and other things) appearing in my main split

I currently have helm installed. Sometimes when I have my window split vertically, when I run helm-find-files, it appears in one of the already open windows, rather than creating a new horizontal ...
2
votes
1answer
73 views

Minimap avoiding change window

Recently I started using minimap-mode, but it has been a bit buggy as sometimes when I split the window and open two different buffers, it won't let me go back to a buffer with code (and minimap). So ...
1
vote
0answers
61 views

Open some file types in new frame

I use split-frame (split-window-right in setup) for most things but would like Emacs to open some file types (specifically PDF files) in a new frame when using find-file. Other files (for example ....
0
votes
2answers
42 views

Split window with new buffer and spawn a new shell in same (possibly remote) directory as old buffer

In tmux, I can press some key combination and split the current window into two windows in the same directory. I've tried the split-window-* function, but found it just duplicates the same buffer in ...
3
votes
1answer
206 views

Splitting window vertically (rather than horizontally) when searching in Dired

My Emacs Dired window is wider than it is tall. After marking some files (say %m *.cpp) in Dired and running M-x dired-do-find-regexp <REGEXP> (A), I find myself in split-window-below (ex split-...
0
votes
1answer
158 views

How to resize vertical split with mouse when using telephone-line instead of mode-line?

According to this StackOverflow answer, one can resize a vertical split with the mouse by dragging the mode-line in a specific spot. I'm using telephone-line and can't find any spot on there to ...
2
votes
1answer
46 views

calc splits wrong window.

I have a problem with using calc. When I have two windows open in emacs, split vertically, calc frequently opens in the wrong window. Here's a demonstration of the problem that I ran with emacs -Q. ...
1
vote
1answer
92 views

emacs split window doesn't avoid other pane content

I'll get terminology wrong here, so be gentle with that (only). cd ~/src/ ./emacs * C-x 2 So I've got two windows here, one above the other, and a bunch of files in my buffer list (more than 2). ...
7
votes
3answers
624 views

Prefer vertical splits over horizontal ones

There are several questions similar to this one. I have read them all and they don't provide an answer for my scenario. I want emacs to prefer vertical splits (splitting windows into left and right ...
4
votes
2answers
93 views

Display all/current CSV heading names

In CSV files (especially ones with a lot of columns and/or a lot of rows) I find that it's hard to tell which column I'm on. Normally I'd like to know either the column heading, or sometimes the ...
2
votes
0answers
26 views

Keyboard macro with occur

In a keyboard macro, there is an occur command. While recording the macro, I switched to the occur window, did some editing, closed occur buffer reverted back to original buffer to continue editing. ...
1
vote
0answers
60 views

Restrict Mode Line display to window

I am configuring mode-line and currently the time is displayed in each window's mode-line, as shown by the image below. Is it possible to restrict the time display to the bottom right mode-line?
2
votes
2answers
110 views

replace-buffer-in-windows issues in switching from emacs 24.5 to emacs 25.2

I installed Emacs 25.2 on a new system and cannot get the desired behavior with killing buffers when an Emacs frame is split into multiple windows. For example, I have C-x 3 bound to a variation of ...
3
votes
1answer
186 views

How to force 'Ctrl-X, Ctrl-B' to always split vertically?

Once upon a time, Choose Window (invoked by C-x C-b) used to always split the window vertically. Starting from a certain Emacs version (I can't recall which one), that split is now either vertical or ...
3
votes
0answers
96 views

How to open all buffers in the same window and never create new one?

I'm using emacs in terminal via emacs-nox and I wish to sort of disable windows functionality at all. I mean I do not want each time to add some buffer to use display-buffer-same-window function, I ...
1
vote
1answer
161 views

split window horizontally with 1:2

I can set below variable to enable horizontal split window: (setq split-height-threshold nil) (setq split-width-threshold 160) But currently, it will split 1:1, but I wish it split with 1:2, the ...
3
votes
1answer
614 views

How to open multiple files without automatically activating the “Buffer List” split?

Running emacs with multiple files automatically opens the "Buffer List" split-window. eg: emacs -Q *.txt Opens a split window, one which contains a list of buffers. How can multiple files be ...
2
votes
2answers
224 views

Split helm window in different directions

I'd like helm-buffers-list to split my window horizontally, but I'd like for all other Helm functions to split it vertically. Is this possible?
1
vote
0answers
66 views

Bookmarks: how to display both file content and bookmark annotation without closing the *Bookmark List* buffer window?

When in my *Bookmarks List* buffer (Bookmarks vanilla), I can place point on a bookmark, and call the function bookmark-bmenu-switch-other-window. This will open a second window, to the right, showing ...
3
votes
1answer
528 views

Open vertical splits to the right

Using spacemacs with Evil. :vsp opens a new split vertical, but it always does it to the left. How can one configure it to open them to the right?
2
votes
1answer
328 views

How do I start emacs with one horizontal split and one vertical split

Every time I start Emacs, I want two windows, side by side, and one terminal/shell window below them both, as shown here. Please help me with the necessary code to my init file.