From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: PierGianLuca Newsgroups: gmane.emacs.help Subject: Re: Get buffer unto a new frame Date: Fri, 18 Aug 2023 15:57:03 +0200 Message-ID: <2a718b7a-ad27-16d5-7f91-27708bbbf5c8@magnaspesmeretrix.org> References: <63aR95kjBnrEzFE6lJM9suzyL-9i_WCsNCxKxYgFrpfCNKRsd7a3VasrDsShzVumLgkPHW3JpekQ2AVAtbwlE4nDFCmBMaGx4OcGNTeLpWU=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11721"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 18 16:00:04 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qX01E-0002rN-02 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 18 Aug 2023 16:00:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qX00N-0003OV-Eq; Fri, 18 Aug 2023 09:59:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWzyU-0002ev-IQ for help-gnu-emacs@gnu.org; Fri, 18 Aug 2023 09:57:14 -0400 Original-Received: from manu28.manufrog.com ([138.128.182.226]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWzyQ-0001Xj-K5 for help-gnu-emacs@gnu.org; Fri, 18 Aug 2023 09:57:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=magnaspesmeretrix.org; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:To:Subject:MIME-Version:Date:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WTaV73MvrXM++g8jg9cQOagh3hUyhoeKiyTjWGXbewY=; b=YpzXmT6ycSKv/YYnRYpbVSRC50 fK0tXWBr8faAMl+hXG/onOkr82nGIeVkRVDJfSt/NKSICyMkRxi7o1Mb2uJuDQM4aV8hc+WVDilhp Uqgh0bqMSdaEyG61K+479heti; Original-Received: from [51.174.11.164] (port=52826 helo=[192.168.10.171]) by manu28.manufrog.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1qWzyR-0002RN-3A for help-gnu-emacs@gnu.org; Fri, 18 Aug 2023 15:57:09 +0200 Content-Language: en-GB, en-US In-Reply-To: X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - manu28.manufrog.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - magnaspesmeretrix.org X-Get-Message-Sender-Via: manu28.manufrog.com: authenticated_id: luca@magnaspesmeretrix.org X-Authenticated-Sender: manu28.manufrog.com: luca@magnaspesmeretrix.org Received-SPF: pass client-ip=138.128.182.226; envelope-from=luca@magnaspesmeretrix.org; helo=manu28.manufrog.com X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, NICE_REPLY_A=-3.454, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144869 Archived-At: 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 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.) >