Skip to main content

Questions tagged [frames]

are the graphical system-level “windows” of Emacs. It initially contains one window and normally also contains a menu bar, tool bar, and echo area.

Filter by
Sorted by
Tagged with
45 votes
2 answers
10k 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, ...
Dan's user avatar
  • 33k
10 votes
2 answers
5k views

How to set emacs frame size by pixels

I can resize the emacs frame to whatever size by mouse, is there a way that the frame size be set in init.el by pixels? Or anything similar in the window manager?
godblessfq's user avatar
  • 1,217
14 votes
3 answers
6k views

How i can open shell in current buffer?

In function "shell" this line display shell buffer and almost always its open new shell in random frame. And I have to swap the buffers, it's annoying. ... (pop-to-buffer buffer) ... In docs says: ...
Honnisha's user avatar
  • 163
16 votes
1 answer
2k 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 ...
Renan Ranelli's user avatar
31 votes
6 answers
10k 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 ...
lukas.pukenis's user avatar
9 votes
1 answer
2k 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 ...
skyork's user avatar
  • 231
9 votes
3 answers
4k views

How to use "o" to open from dired/ibuffer into another frame

I have two windows open and split vertically (single frame): A) contains my work B) contains either dired or ibuffer. I would like to be able to navigate to a file/buffer in pane B and hit "o" ...
Robert's user avatar
  • 99
9 votes
2 answers
1k views

Determine whether a frame is shown on primary display

I have a multi-monitor setup, in which a specific monitor has a dedicated Emacs frame in full screen which shows compiler errors (from Compilation Mode or SBT Mode). I'd like to preserve the setup ...
user avatar
14 votes
2 answers
3k views

Make emacsclient create a frame only if there isn't one already

How can I make emacsclient -a '' -n create a new frame only if there isn't one already? The problem with the -c flag is that it creates a new frame every time. The problem without it is that if there ...
spelufo's user avatar
  • 303
13 votes
3 answers
2k views

Kill buffer when frame is deleted

When I close a frame, I'd like for its buffer to be killed. If the buffer is displayed in other frames, the buffer should not be killed. Do nothing if more than one buffer is displayed in a frame. ...
dharmatech's user avatar
  • 1,262
4 votes
3 answers
146 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 ...
Jordon Biondo's user avatar
92 votes
6 answers
45k views

How to maximize my Emacs frame on start-up?

Is there a way to maximize my window on start-up? Currently, I hit Control++Up on my keyboard but it is very bothersome to do that every time. I am using Emacs 24.4 on Ubuntu 12.04.
programking's user avatar
  • 7,194
18 votes
2 answers
2k views

Can you activate/(bring to front) emacs using native elisp? (e.g when working in another program)

I want to force emacs to be activated, be bought to frond and 'steal' focus in certain circumstances. E.g when I finish a org-Pomodoro or during an important appointment reminder. Now, I'm looking ...
Leo Ufimtsev's user avatar
  • 4,558
16 votes
4 answers
3k views

Run a Function Only Once, Though a Hook Many Times

The context I'm using the after-make-frame-functions hook to load properly the themes in an emacs client/server configuration. Specifically this is the code snippet that I use to make that (based in ...
joe di castro's user avatar
14 votes
2 answers
1k 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 ...
PythonNut's user avatar
  • 10.4k
5 votes
2 answers
137 views

Simultaneously viewing two different Info areas

I'd like to have two emacs frames simultaneously open, with the first frame showing the Info(elisp tutorial) and the second frame showing the Info(elisp manual). After setting the first frame and ...
zugzwang's user avatar
  • 319
3 votes
3 answers
3k views

How to make size of Emacs frame persistent?

When I start Emacs (by clicking on a desktop icon), its frame is too big for the screen, so the mode-line/mini-buffer area is not visible. It's not difficult to resize and reposition the frame, but ...
kjo's user avatar
  • 3,247
2 votes
1 answer
434 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 '(...
ajp's user avatar
  • 393
2 votes
2 answers
2k views

automatically open new buffer in new frame

I use tiling window manager and usually prefer it to handle emacs frames instead of using emacs windows. Is there a way I could force emacs to spawn new buffers in new frames automatically? Ideally ...
Sergey's user avatar
  • 249
2 votes
1 answer
648 views

How to make frame-title-format persistent?

When I set the title for a frame to current buffers filename via (setq-default frame-title-format '("%b")) the title often falls back to "emacs@" system-name, when the frame is inactive. I'd expect ...
kai-dj's user avatar
  • 427
28 votes
2 answers
8k views

How to change the frame title from `emacs@host` to visited file name

I am using Emacs 24.5.1 on OpenSUSE Tumbleweed, with Gnome 3.16, and the title of the GTK window with Emacs in it is always emacs@hostname. How can I change it to the name of the current file I'm ...
Sean's user avatar
  • 383
21 votes
2 answers
435 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 ...
Joseph Garvin's user avatar
17 votes
1 answer
809 views

Never create frame in ediff

In general, I dislike frames. Right now, I'm using (setq ediff-window-setup-function #'ediff-setup-windows-plain) To ensure that ediff does not create a frame when it starts. However, certain ...
PythonNut's user avatar
  • 10.4k
11 votes
1 answer
2k views

how to make emacs prompt me before closing the last emacs gui frame when running emacs as a daemon?

I know that if I set: (setq confirm-kill-emacs 'y-or-n-p) Emacs prompts me before I kill it. But I want emacs to prompt me before I close my last gui frame (prompting me before killing any frame ...
ninrod's user avatar
  • 1,506
11 votes
2 answers
3k 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.
rgtk's user avatar
  • 414
10 votes
1 answer
1k views

Why emacsclient say to quit with C-x 5 0?

As soon as I open emacsclient I found the following message in the minibuffer: When done with this frame, type C-x 5 0, I find it strange that it advices how to close the frame with delete-frame, any ...
marcanuy's user avatar
  • 818
9 votes
2 answers
2k 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 ...
ajp's user avatar
  • 393
9 votes
2 answers
539 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 ...
elemakil's user avatar
  • 2,537
8 votes
1 answer
3k views

How to prevent emacsclient starting a new frame every time?

I have Ubuntu 12.04 running with Emacs 24.3. On computer startup, emacs --daemon is executed, and I have modified the emacs24.desktop to take emacsclient -c -a "" as exec parameter. However, whenever ...
strNOcat's user avatar
  • 211
6 votes
4 answers
7k views

Switch to a neighboring frame?

How can I move focus from currently focused frame to a neighboring frame-- e.g. right next frame-- via a keyboard shortcut? I'd like to cycle through frames in "z" direction. If I had frames a to h ...
stacko's user avatar
  • 1,597
6 votes
3 answers
3k views

resize Emacs (GUI) window to exactly half the screen?

When I maximize the Emacs frame, it uses the full width of the screen, no background showing. But if I e.g. snap-to-edge (in XFCE), it shows a little "margin" of background outside the frame. And if I ...
unhammer's user avatar
  • 1,159
6 votes
1 answer
3k 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 ...
gboffi's user avatar
  • 614
6 votes
1 answer
70 views

Find the last selected frame on a given display

I want to know which frame on a given X11 display was most recently selected. In fact, I want to know which frame that is mapped on the current desktop was most recently selected. I can tell what ...
Gilles 'SO- stop being evil''s user avatar
6 votes
1 answer
871 views

Replacing display-buffer-reuse-frames

display-buffer-reuse-frames tells Emacs to re-use frames for displaying buffers. However, as of 24.3 this variable is obsolete (emphasis mine): display-buffer-reuse-frames is a variable defined ...
user avatar
5 votes
1 answer
842 views

Add window to the right of two horizontally split windows

Following scenario: 1) I start emacs and the initial frame is as follow: +---------------+ | | | | | | | | | | +---------------+ ...
Rainer's user avatar
  • 907
5 votes
4 answers
5k views

Resize/move frame/window

Are there emacs commands which will let me resize/move the frames/windows? By frame/window I mean the GUI object that X/Windows/whateverAppleCallsIt to contain the interface to emacs. Sorry, emacs ...
Mouse.The.Lucky.Dog's user avatar
4 votes
3 answers
2k views

Open buffer in a specified frame

Do frames in emacs have a handle the way buffers do? In particular, can I specify that a particular file should be opened in a specified frame? I would like to have two frames where I use one for ...
Pradhan's user avatar
  • 2,370
4 votes
1 answer
2k views

Run command in new frame

I'm managing workspaces by creating new frames, but running C-x 5 C-h couldn't find anything like "run command in new frame", basically what I'd like to do is to run some REPL or shell in new frame. ...
4lex1v's user avatar
  • 603
4 votes
1 answer
596 views

From File Manager, open file in specific instance of Emacs

Here's my intended use case: Emacs Instance 1: I have an emacs instance containing open buffers of the project I'm working on. All directly related. Emacs Instance 2: I'm in the Windows explorer, ...
cheezy's user avatar
  • 297
4 votes
2 answers
2k views

How to swap buffers between two frames?

There are at least a couple of packages dedicated to moving buffers around within a frame (buffer-move and transpose-frame are the ones I'm aware of), but I don't seem to be able to find anything to ...
Turn's user avatar
  • 153
3 votes
1 answer
208 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, ...
Nisba's user avatar
  • 905
3 votes
1 answer
621 views

How can I highlight cursor or line in unselected frames?

Prelude Let me start by mentioning the scenario where the problem arises. I see that 2-3 variables are always used together in a system. I need to add yet another one that will be used along with ...
Calaf's user avatar
  • 483
3 votes
1 answer
295 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 ...
Stéphane Gourichon's user avatar
3 votes
1 answer
603 views

Obtain absolute pixel position of point

I'd like to obtain the absolute pixel position of the point (i.e. the cursor, not the mouse pointer) in the current buffer in a GUI frame, to pass it onwards to an external program. I don't mind ...
user avatar
3 votes
0 answers
655 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. +--...
eav db's user avatar
  • 201
2 votes
2 answers
1k views

How to change emacs font size on the fly from commandline?

Using 1autorandr for multimonitor detection, the script below is runned each time I dock my machine. In order to use spacemacs on the 4k monitor I curently must hit M-x zoom-frm-in. What command ...
jjk's user avatar
  • 744
2 votes
2 answers
2k views

Why doesn't set-background-color work in my init file?

I have an init file for Emacs located at /home/username/.emacs.d/init.el and it has the command (set-background-color "honeydew"). However, when I open Emacs the color has obviously not changed from ...
Adam G's user avatar
  • 21
2 votes
2 answers
399 views

How to use make-frame to bring up "maximized windows" like -mm does for the first window (using WSL 2)?

I am running emacs under (Ubuntu under) WSL 2 and I can bring up the first frame maximized (i.e. almost full screen, leaving the Windows "task bar" exposed, the -mm option does that). I ...
intel_chris's user avatar
2 votes
3 answers
322 views

Save/Restore Position and Size of Last Closed Frame

Say there're 3 frames Fa Fb Fc. Then I closed Fa Fc, Emacs needs to remember nothing; instead, Fb is the one that needs to be saved its parameters, because it's the only frame on the desktop. Then ...
shynur's user avatar
  • 5,318
2 votes
2 answers
2k views

How to disable margin inside a frame

My emacs frames have an unwanted border, even if maximized: The blue thing at the bottom is the border drawn by the openbox. The dark gray/black interior is Zenburn's background. But what is this ...
matklad's user avatar
  • 21