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.

Filter by
Sorted by
Tagged with
97
votes
13answers
50k views

How to switch between windows quickly?

How do I switch between windows quickly? I often have multiple windows open and need to switch between them. Right now, I use C-x o to get to the one I want. Is there a more efficient workflow ...
29
votes
2answers
5k views

What's the difference between a buffer, a file, a window, and a frame?

When posing questions on this site, people sometimes talk about "windows" when they mean "frames," and "buffers" or "files" when they mean "windows." So: Q: What is the difference between a buffer, ...
28
votes
3answers
6k views

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?
24
votes
6answers
6k views

Switching between window layouts

When I configure a custom layout and then just need to temporary look into one file fullscreen and once I want that layout back - I need manually to reflow it. I would like a plugin/elisp code to ...
22
votes
1answer
5k views

Synchronized scrolling in two windows

Is there a way to reflect the navigation commands in the current window in another visible window. I have two related LaTeX files displayed in two windows and would like to scroll through them ...
21
votes
4answers
3k views

Hide *compilation* window

It is annoying to see the compilation window appear when it is successful. How to remove that automatically? I want to see it though if it is not successful.
20
votes
2answers
312 views

Display list of words along bottom of frame?

I'd like to display 3 lists of words on separate lines horizontally along the bottom (although top would work too) of every emacs frame I have open. I've thought of 6 ways to do this, and they all ...
18
votes
4answers
7k views

How to setup default windows at startup?

Every time I open up Emacs I tend to set up 3 windows by doing C-x 3 (split-window-right) and then C-x2 (split-window-below). After that I have to switch to each window to open the files I want to ...
16
votes
1answer
2k views

Switch window split orientation, fastest way

Say you have two buffers open like so: ------------------------------------ | | buffer 1 | buffer 2 | | | ------...
16
votes
1answer
1k views

How can I block a frame from being split?

Currently I work with ruby and rspec. I really like the idea of having a separate frame in another monitor showing me the compilation buffer. My current setup uses a 'code' frame (in which I do actual ...
15
votes
2answers
4k views

When should I use with-eval-after-load in my configuration files?

I went over my configuration files and wanted to do some cleanup. My understanding of with-eval-after-load was that its body would be evaluated right after the related package is loaded. While ...
14
votes
2answers
2k views

How can I prevent a command from using specific windows?

Typically, I have a frame split into four windows, where two at the bottom are dedicated to my *compilation* and *grep* buffers. When browsing compilation errors, next-error will eventually replace my ...
14
votes
3answers
2k views

Is there a way to change color of active window's fringe?

To better distinguish between focused window and rest that are not I would love to change this window's fringe color. Discovering customize with fringe keyword I found only how to change its bg color ...
13
votes
2answers
772 views

“Pop” a window into a frame

Often, I my windows get automatically split until I arbitrarily decide that the current frame does not have enough real-estate for them all. When this occurs, I manually delete a window, create a ...
13
votes
1answer
836 views

How to control in which window a buffer is displayed?

Q: how can I control which window org-deadline uses to display the calendar? org-deadline temporarily pops up the calendar buffer in a window when setting a deadline, and then closes it again after ...
13
votes
1answer
571 views

Change highlight color when window isn't in focus?

I'm using hl-mode as a minor mode for deft. How do I make the highlighted line change color (e.g. to gray) when the deft window isn't the current window, and then back to the default highlight color ...
12
votes
5answers
4k views

How to Change size of split screen emacs windows?

If I have Emacs split horizontally and on top I'm editing elisp code and on the bottom I am in the shell. By default, Emacs makes the two windows equal in size, but I'd like the shell buffer smaller. ...
12
votes
3answers
1k views

Quick way to close all but one window, and then revert to previous window setup?

I want to close all my windows but the current one and maximize the frame so I can quickly see everything in the buffer in that one window, and then revert to my previous window setup. How would I go ...
12
votes
2answers
3k views

Moving the mode line and minibuffer to the top

Is there any way I can move the mode line and the minibuffer from the bottom to the top of the screen? The minibuffer is covered by the previous question How to display the content of minibuffer in ...
12
votes
2answers
2k views

How do I force a specific buffer to open in a new window?

When committing changes in Magit, it is useful to have the diff view open while adding details about the commit. In Magit, we see the diff in the *magit ..* buffer. When you hit cc while the cursor ...
12
votes
1answer
3k views

Open file in new window after searching it with helm

As written in A Package in a league of its own: Helm there's a way to search for a file using Helm decide after searching whether open it in same or other window My question is: How?
10
votes
1answer
2k views

How to count all of the windows in a frame?

Just as the question stated, I would like a function that would count of the windows that are currently being shown in that frame. So this: +--------------+-------------+ | | ...
10
votes
3answers
441 views

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 | | | | +--------+-----...
9
votes
4answers
860 views

One window per project

I am working on several projects right now. I want a single instance of Emacs to handle them all. What I want is a tmux-like behavior wherein every 'window' (in the Emacs sense) corresponds to a ...
9
votes
2answers
1k views

Single mode line for all windows

Is it possible to have only one mode line (sometimes referred as "statusbar") for all windows? I'd like to make this single mode line show information about the currently selected buffer.
9
votes
3answers
1k 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 ...
9
votes
2answers
2k views

Neotree window not resizable

I get this message when I try to resize the neotree window using my mouse: No resizable window on the left of this one Does anyone know how I can make the neotree window re-sizable?
9
votes
1answer
1k views

Open helm search result in a new window?

Commands like helm-projectile-grep, helm-swoop, projectile-find-file are extremely useful for jumping around code. However, so far I've not found how I can open a search result in a new window (...
9
votes
0answers
622 views

How to immediately resize the minibuffer window?

Suppose that I have this function, that inserts some stuff into the minibuffer: (defun foobar () (interactive) (minibuffer-with-setup-hook (lambda () (let ((resize-mini-windows t)) ...
8
votes
4answers
880 views

Async shell process buffer always clobbers window arrangement

I frequently launch external programs from emacs using M-!, such as Firefox or Evince, etc. Whenever I do, a buffer pops up full of results for the process, which clobbers whatever else I've got going ...
8
votes
2answers
2k views

Open new window and switch to it

Assume I'm opening a new window with for example C-x 2 or C-x 3 then the buffer opens and I need to switch to it by hand with C-x o. Is there a build in solution to do this with one command? Or even ...
8
votes
2answers
4k views

Splitting windows on startup

How do I split my windows on startup like so: _____________ | A | B | |_____|_____| | C | |___________|
8
votes
3answers
735 views

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 ...
8
votes
2answers
2k views

org-babel result to a separate buffer

I use org-babel to generate some reports which can't be automatically processed, and since org is a good outline format, I print the results in org to represent them as trees. I've noticed that ...
8
votes
1answer
6k views

How can I prevent GNU Emacs from splitting windows on startup?

Whenever I try to open an existing file with GNU Emacs, the window always split horizontally so as to show two buffers: one buffer containing the file and the GNU Emacs buffer. How can I set up Emacs ...
8
votes
2answers
925 views

How to display a help buffer/window full frame size (not full screen)

I sometimes want to display information in Help buffer style, so I have been using code like this: (with-help-window (help-buffer) (princ "Type q to exit this help buffer.\n\n") (princ result)) ...
8
votes
2answers
963 views

How can I prevent gdb *input/output* buffer from aggressively popping up in frame?

When using gdb with M-x gdb, the *input/output* buffer always pops up aggressively in any frame which has focus and isn't already displaying it. I would like the *input/output* buffer to stay quietly ...
8
votes
2answers
173 views

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. ...
8
votes
2answers
343 views

Split Window at outermost border

I'm looking for a way to add a new full-height window split to an existing (splitted) window configuration. Because I don't know how to explain it properly I'll just post some ASCII graphics showing ...
7
votes
1answer
884 views

How can I tell Emacs to always open help buffers in the current window?

When looking up documentation with describe-function, Emacs display the docstring in a temporary help buffer. I want this buffer to replace current window. So far, I've customized help-window-select ...
7
votes
2answers
1k views

How can I pin the *compilation* buffer to never leave a single frame/window

I would prefer to have the *compilation* buffer always stay in its own frame. However, currently if I run M-x compile from another frame/window, the buffer pops up in a new window there as well. How ...
7
votes
2answers
4k views

How can I adjust the fixed-width of a Neotree buffer?

Using emacs 24, when I try to use the Neotree package I am having issues with modifying the fixed-width of the window. I believe I have found the responsible chunk of lisp, but changing the value ...
7
votes
2answers
731 views

Hook that indicates when the cursor has been moved by scrolling

Inspired by this question: Let Emacs move the cursor off-screen, I am considering writing a minor mode that will keep the cursor in a fixed position that is not affected by scrolling operations. I ...
7
votes
1answer
749 views

How to set up Emacs to never split windows?

I want to try a new workflow where split windows only happen if I request them, otherwise Emacs simply changes windows. I tried putting this command in my init.el: (setq pop-up-windows nil) And it ...
7
votes
0answers
83 views

Ediff location pane

Is there a way to create something similar to the location pane from win merge in ediff? Not having this is about the only reason I use win merged instead of ediff.
6
votes
3answers
224 views

Creating function to move top-buffer to other window

TL;DR: Any suggestions as to what function(s) can help me restore (to any given window) the buffer that was visible most recently? It's important that the currently visible buffer is not killed, just ...
6
votes
3answers
129 views

`query-replace` leaves potential match to be replaced at bottom of window

If I have a long document that I run query-replace (or any other number of commands) in, as I'm saying y or n to replace that match or not, the current potential item to be replaced is always at the ...
6
votes
1answer
3k views

How to get org-agenda to prefer split-window-right

After upgrading to Emacs 24.4.1, when I call org-agenda with no splits it will show on the bottom half of the frame. Previously, it would show on the right half. How do I configure this behaviour?
6
votes
3answers
287 views

Is there a way to make the “o” keypress of other-window <C-x><C-o> repeatable?

Question is as stated in the title. Instead of using various packages for switching windows, it might be simpler to make <C-x><C-o> behave like <C-x><C-+>, such that repeated ...
6
votes
1answer
975 views

`switch-to-buffer` vs. `pop-to-buffer-same-window`

What is the difference between pop-to-buffer-same-window and switch-to-buffer? switch-to-buffer-other-window is basically an alias for pop-to-buffer, so I'm surprised that pop-to-buffer-same-window ...

1 2 3 4 5 7