unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: PierGianLuca <luca@magnaspesmeretrix.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Get buffer unto a new frame
Date: Fri, 18 Aug 2023 15:57:03 +0200	[thread overview]
Message-ID: <2a718b7a-ad27-16d5-7f91-27708bbbf5c8@magnaspesmeretrix.org> (raw)
In-Reply-To: <XMNTTe9n5dVvo7ZsWkurom6grWLfakqR5CyKeKM1CwdOLCFEX51Eju6vJUl6BaZKXHKXSApmEls7gNPulo0bBQS4x3rN77XsU_kCgSfm2CM=@protonmail.com>

Hi Heime,

Just wanted to say I completely understand you. I've had to deal with similar conundrums for many years. My personal experience is that (in my case) there's simply no best rule. I've had situations in which I needed copies of a buffer in different frames (especially if the frames live in different virtual desktops), or copies within the same frame but different windows; different buffers in different frames, different buffers in the same frame, and whatnot...

For me the optimal solution has been to set up quicker keyboard shortcuts (avoiding all longer "C-x ..." ones) to ease up this kind of configuration changes.

Cool if you find a standard solution for the kind of work you do.

I'm really happy for the extreme flexibility that Emacs gives in this regard!

Cheers,
Luca



On 230818 15:41, Heime wrote:
> 
> 
> 
> 
> 
> Sent with Proton Mail secure email.
> 
> ------- Original Message -------
> On Saturday, August 19th, 2023 at 1:12 AM, Yuri Khan <yuri.v.khan@gmail.com> wrote:
> 
> 
>> 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.
> 
> I usually have a single buffer displaying a file.  And want the file displayed
> in a new frame.  But you have outlined that I can have an additional window
> showing the file.
> 
> Am bit indecisive what to do.  Does one just make the file appear in a new
> buffer, leaving the rest (possibility of other windows showing same file)
> intact ?  What would you suggest ?
>   
>> 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	other threads:[~2023-08-18 13:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18  9:59 Get buffer unto a new frame Heime
2023-08-18 10:56 ` Christopher Dimech
2023-08-18 13:08   ` Tassilo Horn
2023-08-18 13:12 ` Yuri Khan
2023-08-18 13:41   ` Heime
2023-08-18 13:57     ` PierGianLuca [this message]
2023-08-18 14:10       ` Heime
2023-08-18 14:33         ` [External] : " Drew Adams
2023-08-18 14:36         ` PierGianLuca
2023-08-18 16:38           ` Yuri Khan
2023-08-24 16:01   ` tpeplt
2023-08-24 16:13     ` Corwin Brust
2023-08-24 16:20     ` Yuri Khan
2023-08-24 17:23       ` Richard Kerry via Users list for the GNU Emacs text editor
2023-08-25 20:24       ` tpeplt
2023-08-26  5:41         ` tomas
2023-08-26  8:28         ` Yuri Khan
2023-08-26  9:22           ` tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a718b7a-ad27-16d5-7f91-27708bbbf5c8@magnaspesmeretrix.org \
    --to=luca@magnaspesmeretrix.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).