Questions tagged [window]

In Emacs, a window is one part of a frame, displaying one buffer. For questions about operating system windows, see the tag 'frame.

Emacs can split a frame into two or more windows. Multiple windows can display parts of different , or different parts of one buffer.

Note that what most operating systems call a window is called a frame in Emacs. For questions related to operating system windows, see the tag . What Emacs calls a windows is called a pane in some other systems.

For questions about running Emacs on Microsoft's family of operating systems, see .

Multiple always imply multiple windows, because each frame has its own set of windows. Each belongs to one and only one frame. The active window's is highlighted.

Tag questions about with appropriate additional tags to avoid confusion with frames and GUI conventions.

Useful links:

440 questions
47
votes
3 answers

How to change Emacs windows from vertical split to horizontal split?

Window A ++++++++ Window B Is there a way to switch to Window A : Window B Is there a way to switch view without closing windows?
Nick
  • 4,473
  • 4
  • 26
  • 44
12
votes
3 answers

Defining the window pointed by "other-window"

In emacs, more often than i like, I end up with 4 windows or more. I'll use that example: +--------|-----------+ | | | | 1 | 2 | | | | +--------+-----------+ | 3 | 4 | | …
Lompik
  • 1,224
  • 10
  • 11
11
votes
2 answers

Can I split emacs the window 4 ways (vertically and horizontally) in a 4 grid layout with different files in each?

I just started using emacs and since I have been using Sublime Text for a while, I am used to the four-grid-layout with 4 windows stacked horizontally and vertically. I have been able to split the screen horizontally only. How do I split it 4 ways?
twodee
  • 163
  • 1
  • 1
  • 7
8
votes
3 answers

How to cycle between two windows when I have more than two open?

Scenario: I have several (more than 2) windows open. I actively work with two of them. How do I best jump from one window to another, and back, with one command? I use ace-window; it's great but I don't want to press window number every time. I know…
9000
  • 537
  • 2
  • 16
8
votes
2 answers

Window Layout selecter

Is there a package that helps me to choose a predefined layout for an arbitrary number of windows in a frame? I would be perfect if it works in a similar way to the select-layout function in tmux. EDIT Here is a gif showing how tmux switches between…
kain88
  • 835
  • 7
  • 19
7
votes
3 answers

Set windows layout by a function

We all use multi-windows in Emacs, and for some projects, I developed a habit of using four windows, one each for a different buffer. I wonder if I can define a function and when I start to work in a project, it will take the project name as input…
yi.tang.uni
  • 1,017
  • 8
  • 20
7
votes
1 answer

Forcing Emacs Layout

(This is a followup and different from Emacs Fixed Layout ) High Level My typical Emacs Working environment is: +------------+--------------------------+--------------------------+ | NeoTree | Main | Rhs …
eav db
  • 201
  • 1
  • 3
6
votes
2 answers

Is there a generic toggle-previous-window function?

Some major modes have code and key-bindings to toggle focus back and forth between their inferior processes and the major-mode buffer. Is there an Emacs function which lets me do this between the current and previous window such that calling the…
wdkrnls
  • 3,707
  • 2
  • 28
  • 46
6
votes
2 answers

How to move point to new window, within a function?

I'm trying to write a simple function to divide the Emacs frame into four quadrants. Once I get the splitting to work, each window will have Dired for a different directory. The splitting isn't giving the results I want, because I can't move…
BT56
  • 163
  • 2
5
votes
4 answers

Define a main window and then close all others

With the way I work, I often just want one window (what's showing my code). Now several things (like opening help) open another window. That's fine, but when I'm finished I just want all windows closed and to return to the original. Often Q will get…
Mike McFarland
  • 439
  • 3
  • 11
5
votes
1 answer

Open a file from the desktop in a single window (without home screen splitscreen)

When I open a file from the context menu by choosing "Open with Emacs", Emacs starts with a horizontal splitscreen. The first window shows the desired file and the other one the home screen. Is it possible to change the behaviour of emacs so that…
Miguellissimo
  • 255
  • 2
  • 5
5
votes
1 answer

Move to other window backwards?

Emacs has the function other-window that lets you jump between windows. The function's documentation states that it takes an optional argument that tells the function how many windows to jump ahead. Once upon a time, I defined a keyboard shortcut to…
krylon
  • 53
  • 5
5
votes
1 answer

How to shift vertical column of windows left and right in a frame?

Q: how can I shift a window column left and right in a frame? I use a single frame with multiple windows side-by-side. Usually each window takes up the full height of the frame, but occasionally, one of those windows will be split vertically (eg,…
Dan
  • 32,980
  • 7
  • 102
  • 169
5
votes
1 answer

Move point to the end of a live window using elisp

I want to move the point to the end of a window using elisp. The following code snippet: (set-buffer "buffer-name") (goto-char (point-min)) does not visually change the location of the cursor on the window visiting the buffer "buffer-name". This is…
Sagar Jha
  • 239
  • 1
  • 8
4
votes
5 answers

Manually close a (compilation) window that was most recently opened by running e.g. 'grep'

I'm trying to find a way to quickly close the window that I just created by running 'grep' (i.e. a kind of compilation window). I'd like the solution to be independent of my current window layout and also of which window that's currently in focus.…
chr
  • 87
  • 7
1
2 3 4