help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get buffer unto a new frame


From: Yuri Khan
Subject: Re: Get buffer unto a new frame
Date: Fri, 18 Aug 2023 20:12:57 +0700

On Fri, 18 Aug 2023 at 17:02, Heime <heimeborgia@protonmail.com> wrote:

> How can I have a buffer taken out from a frame and make a new frame
> using elisp code ?

It does not make sense to talk about taking a buffer out from a frame.
Buffers exist within the core of Emacs independently of any frames. A
buffer can be displayed in zero or more windows, and one or more
windows are part of a frame.

                      1 ┌───────┐
        ┌───────────────┤ Emacs ├────────────────┐
        │               └───────┘ 1              │
        │ 1..*                                   │ 0..*
    ┌───┴───┐      1..* ┌────────┐         1 ┌───┴────┐
    │ Frame ├───────────┤ Window ├───────────┤ Buffer │
    └───────┘ 1         └────────┘ 0..*      └────────┘

Therefore, you create a new frame, it automatically has a window, and
you arrange for that window to display your buffer. Optionally, you
bury the buffer in the original window so that it displays something
else, or delete the original window. (See code by Christopher in the
other reply.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]