Basically, I would like GUI emacs to replicate the terminal behavior, where a new frame is opened within the same (OS) window. This would work similar to vim's tabs, which are just a way to move around different window configurations within the same session.
Asked
Active
Viewed 466 times
1
-
2To make sure everyone is using the terms the same way, have a look at [What's the difference between a buffer, a file, a window, and a frame?](http://emacs.stackexchange.com/questions/13583/whats-the-difference-between-a-buffer-a-file-a-window-and-a-frame) – Dan May 15 '16 at 23:40
-
`elscreen` is the tabbar-looking minor-mode that switches window configurations. I had to do some tweaking to the source-code that I used a while back to get everything working just right, so I'll let someone else provide the best fork/link for it. – lawlist May 16 '16 at 01:44
1 Answers
1
In emacs, a frame is always a separate graphical window (and as you know, in emacs the frame is divided into windows, making the terminology somewhat confusing).
However, you can save window configurations to registers, and restore them later; see the "Configuration Registers" page of the emacs manual (M-: (info "(emacs)Configuration Registers")
).
There are a number of emacs packages which give you a tab bar, such as TabBarMode, but I'm not aware of any off-hand where the tab buttons switch window layouts, rather than which buffer is visible. Maybe you can find one, or you could modify one to do it.
Another option is to do this not in emacs, but in your window manager. i3, for instance, can stack windows into a tabbed container.

db48x
- 15,741
- 1
- 19
- 23
-
db48x: The question terminology is pretty much fine. When Emacs is run in a terminal, frames work as described in the question -- opening a new frame (`C-x 5 2`) 'replaces' the frame displayed in the terminal, as does switching between existing frames (`C-x 5 o`). iDontKnowBetter is asking how to get the same experience in GUI Emacs. – phils May 16 '16 at 05:28
-
1I understand, but making a new frame while running in a window manager (as opposed to a terminal) always puts the frame in a new gui window. This isn't configurable, and if you hack `make-frame` so that it always calls `tty-create-frame-with-faces` then you get an error because you're not in a tty. This is implemented in C, and internally it calls the C function [`make_frame`](http://git.savannah.gnu.org/cgit/emacs.git/tree/src/frame.c#n607). It's not exposed to elisp, but even if it were it intermingles all of the X and GTK operations needed to make a new gui window for the frame. – db48x May 16 '16 at 07:41
-
1Oh, and the brief discussion of terminology is not because of confusion on the part of anyone here; it's for the benefit of future readers. Howdy folks! – db48x May 16 '16 at 07:43
-
1Ah, I see :) I think the details of your first comment would make a very helpful edit to the body of your answer, as that addresses the question directly. – phils May 16 '16 at 09:01