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
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, ...
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 ...
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 ...
8
votes
2answers
921 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)) ...
96
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 ...
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.
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 ...
5
votes
1answer
888 views

desktop-save-mode fails to save window layout

I use Emacs 24.5.1 on OS X in terminal mode. I intend to use desktop-save-mode to save and restore window layout (i.e. positions of buffer windows) upon exiting and starting Emacs. From this answer ...
13
votes
1answer
832 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
2answers
770 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 ...
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 ...
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 ...
8
votes
4answers
877 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 ...
6
votes
1answer
466 views

Forcing Emacs Layout

(This is a followup and different from Emacs Fixed Layout ) High Level My typical Emacs Working environment is: +------------+--------------------------+--------------------------+ | NeoTree | ...
13
votes
1answer
568 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 ...
10
votes
3answers
439 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 | | | | +--------+-----...
4
votes
1answer
187 views

How to update window-start without calling redisplay?

While debugging swiper I've encountered a situation when the point is changed inside with-selected-window, but window-start isn't updated. This can be annoying, because I need the up-to-date window ...
4
votes
2answers
329 views

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 ...
1
vote
2answers
636 views

Is there a better way to override opening window in compilation-goto-locus?

I don't like the behavior of compilation-goto-locus (bound to Enter in a *compilation* or *grep* buffer), where it splits the window and jumps to the line in a new window. I prefer the *compilation*/*...
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 ...
27
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?
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?
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 ...
3
votes
1answer
660 views

Remapping C-x C-b to Open List of Buffers in Same Window

I use Emacs across different machines and operating systems. I noticed that when I press C-x C-b to get a list of all buffers, on some machines the list opens in the same window where the cursor is ...
7
votes
2answers
729 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 ...
4
votes
1answer
2k views

Customizing the layout of gdb-many-windows

I really like all of the information that is available to me when I run GUD/GDB with gdb-many-windows, but I would like to be able to move the windows around some. Specifically I would like to use ...
4
votes
1answer
412 views

Let switch-to-buffer to already open buffer switch to that window, rather than open it in this one

Is there a way to make switch-to-buffer more dwim in this regard? Let's say I have two windows with foo.el and bar.el open. With my point in foo.el, if I switch-to-buffer and open bar.el, I'd like to ...
3
votes
0answers
250 views

Emacs Fixed Layout

Background Used vim for 15+ years. Currently using Emacs + Evil + Cider (Clojure). My Ideal Workflow (this part is not the question -- merely describing my ideal workflow) Three vertical panes. +--...
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.
6
votes
2answers
838 views

Preventing mouse clicks in inactive windows from repositioning the cursor

When I have Emacs (24.4, Mac OS, NS build) in the foreground, I often have many windows open in one frame. I sometimes want to switch windows by clicking in an inactive window. By default, this calls ...
6
votes
1answer
344 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 ...
4
votes
1answer
158 views

How to stop auto backup in some directory in Emacs

In general I want Emacs to save a backup file for me, except in some special directories. I tried to define a Directory Local Variables, and add: ((nil . ((make-backup-files . nil)))) But it seem ...
4
votes
3answers
108 views

Inconsistent point when inserting into a buffer that is visible in another frame

While working on a sort of "background processing" function, I noticed that my logs would print backwards if the buffer was in another frame. I cannot seem to figure out why it is happening. I am not ...
3
votes
1answer
129 views

Jump between two frames, code improvement

I often have got multiple emacs frame in various desktop, but only two of them are visible. I often need to jump between those two frames, but since other frames are opened I can't use C-x 5 o, ...
2
votes
1answer
282 views

How can I force emacs to never split frames, in particular for compile-goto-error?

I want emacs to always display new buffers in the current frame, but always taking the whole frame, rather than splitting it. I currently have customized display-buffer-alist to the following '(...
16
votes
1answer
2k views

Switch window split orientation, fastest way

Say you have two buffers open like so: ------------------------------------ | | buffer 1 | buffer 2 | | | ------...
8
votes
2answers
961 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 ...
4
votes
1answer
1k views

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

Attempt to delete minibuffer or sole ordinary window

I have a daemonized emacs, and I'm able to close any emacs frame, even the last one, using the window manager or old good C-x C-c, just to be able to retrieve all my buffers when i ask the daemon for ...
3
votes
3answers
357 views

The background color can't fill the buffer completely

I used a theme in emacs 24, but recently, the background color just filled area where characters are instead of the buffer completely. Even though I killed the orignal ~/.emacs, and used command like ...
2
votes
1answer
360 views

How to control which window is opened as “other Window”?

I am new to Magit and Spacemacs. I do not understand descriptions of other-window and next-window in the manual. I have 4 windows open in a Spacemacs frame like this: +--+--+ | | | +--+--+ | | | ...
2
votes
1answer
47 views

Getting a sorted window list

(window-list) returns a list of visible windows. Is it possible to get this list sorted from the most recently active window to the least?
2
votes
2answers
355 views

emacs opens shells in a random window, how to change this?

Try splitting the frame repeating some times the command C-x 3. Then try open the shell with M-x shell. It will open in a random window and not the one which you have typed the command from. Why?
2
votes
2answers
142 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 ...
2
votes
1answer
724 views

In exwm (Emacs X Window Manager) how can I switch to previous workspace?

Say I'm in workspace 1 and I switch to workspace 3. Currently I have to remember that I was in workspace 1 but I want some sort of functionality to to do this for me. In i3wm I can enable ...
0
votes
0answers
169 views

compile-goto-error: be more consistent in choosing a window for display

I have a main window displaying buffer A, and bottom window displaying some project-wide search results. ┌───────────┐ │ A │ │ │ ├───────────┤ │ results │ └───────────┘ Hitting ...