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
109
votes
13answers
61k 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 ...
38
votes
3answers
9k 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?
36
votes
2answers
7k 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, ...
27
votes
6answers
8k 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 ...
23
votes
1answer
6k 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.
21
votes
2answers
334 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 ...
19
votes
4answers
8k 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 ...
19
votes
3answers
3k 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 ...
17
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 ...
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 ...
16
votes
2answers
6k 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 ...
15
votes
5answers
9k 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. ...
14
votes
3answers
2k 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 ...
14
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 ...
14
votes
2answers
990 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
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 ...
13
votes
1answer
4k 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?
13
votes
2answers
3k 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?
13
votes
1answer
1k 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
2k 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 (...
13
votes
1answer
714 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
3answers
2k 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 ...
11
votes
3answers
532 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 | | | | +--------+-----...
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
2answers
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?
9
votes
4answers
1k 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 ...
9
votes
4answers
1k 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
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 ...
9
votes
2answers
2k 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
1answer
7k 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 ...
9
votes
0answers
688 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
2answers
9k views

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

Automatically switch focus to new window

Is there a way to automatically switch focus to any new windows? For example, if I C-h f some-function, that creates a new window. But the focus remains where I was, so when I'm done reading and hit ...
8
votes
2answers
195 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
398 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
1k 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
1answer
623 views

How to make occur mode select the window of buffer `*Occur*`?

Is it possible to make the occur mode grab the cursor (point)?, right now when I do M-x occur and search anything in a buffer, it will open the new buffer with the findings but the cursor stays in the ...
7
votes
1answer
1k 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 ...
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
888 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
3answers
913 views

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 ...
7
votes
1answer
409 views

Pick a window for ido-find-file-other-window and ido-switch-buffer-other-window

Thanks to @itsjeyd, I've come to love ace-window, but now I want more. I use C-x 4 f and C-x 4 b to invoke the commands ido-find-file-other-window and ido-switch-buffer-other-window, but I want to ...

1
2 3 4 5
8