unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Send buffer to new emacs session
@ 2023-08-22 22:30 Heime
  2023-08-23  1:30 ` [External] : " Drew Adams
  0 siblings, 1 reply; 5+ messages in thread
From: Heime @ 2023-08-22 22:30 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor



I have a buffer in an emacs session, call the session S1.  I want to start a new emacs session 
(call it S2)  with the frame displaying the current buffer in S1.  All the windows displaying 
buffer in S1 are then to be removed and the buffer in S1 killed. What can I do using elisp code ?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [External] : Send buffer to new emacs session
  2023-08-22 22:30 Send buffer to new emacs session Heime
@ 2023-08-23  1:30 ` Drew Adams
  2023-08-23  1:38   ` Drew Adams
  2023-08-23  5:17   ` Heime
  0 siblings, 2 replies; 5+ messages in thread
From: Drew Adams @ 2023-08-23  1:30 UTC (permalink / raw)
  To: Heime, Heime via Users list for the GNU Emacs text editor

> I have a buffer in an emacs session, call the session S1.  I want to start
> a new emacs session
> (call it S2)  with the frame displaying the current buffer in S1.  All the
> windows displaying
> buffer in S1 are then to be removed and the buffer in S1 killed. What can
> I do using elisp code ?

The buffer doesn't exist in another Emacs session,
as I mentioned when you asked the question elsewhere.

If you're talking only about the buffer's _content_,
or perhaps its content and some other state (e.g.
list of markers, variable values,...), then you can
of course _persist_ most such info in a file and
then populate a buffer in the other session using it.

But a _buffer_ is itself in memory, and session-specific.

(But I said all of this the first time you asked...,
and I pointed you to Emacs docs about buffers etc.)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [External] : Send buffer to new emacs session
  2023-08-23  1:30 ` [External] : " Drew Adams
@ 2023-08-23  1:38   ` Drew Adams
  2023-08-23  5:17   ` Heime
  1 sibling, 0 replies; 5+ messages in thread
From: Drew Adams @ 2023-08-23  1:38 UTC (permalink / raw)
  To: Heime, Heime via Users list for the GNU Emacs text editor

To wit:

https://stackoverflow.com/q/76951539/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [External] : Send buffer to new emacs session
  2023-08-23  1:30 ` [External] : " Drew Adams
  2023-08-23  1:38   ` Drew Adams
@ 2023-08-23  5:17   ` Heime
  2023-08-23 14:13     ` Drew Adams
  1 sibling, 1 reply; 5+ messages in thread
From: Heime @ 2023-08-23  5:17 UTC (permalink / raw)
  To: Drew Adams; +Cc: Heime via Users list for the GNU Emacs text editor






Sent with Proton Mail secure email.

------- Original Message -------
On Wednesday, August 23rd, 2023 at 1:30 PM, Drew Adams <drew.adams@oracle.com> wrote:


> > I have a buffer in an emacs session, call the session S1. I want to start
> > a new emacs session
> > (call it S2) with the frame displaying the current buffer in S1. All the
> > windows displaying
> > buffer in S1 are then to be removed and the buffer in S1 killed. What can
> > I do using elisp code ?
> 
> 
> The buffer doesn't exist in another Emacs session,
> as I mentioned when you asked the question elsewhere.
> 
> If you're talking only about the buffer's content,
> or perhaps its content and some other state (e.g.
> list of markers, variable values,...), then you can
> of course persist most such info in a file and
> then populate a buffer in the other session using it.
> 
> But a buffer is itself in memory, and session-specific.

The buffer is then only known with a particular session,
there is no possibility for a different emacs session to
capture the details from another emacs session.  Unless
that memory is captures in a file that the new session can
read.

I understand your point.  I shall keep with a new frame
associated with its respective emacs session. 
 
> (But I said all of this the first time you asked...,
> and I pointed you to Emacs docs about buffers etc.)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [External] : Send buffer to new emacs session
  2023-08-23  5:17   ` Heime
@ 2023-08-23 14:13     ` Drew Adams
  0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2023-08-23 14:13 UTC (permalink / raw)
  To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor

> > > I have a buffer in an emacs session, call the session S1. I want to
> start
> > > a new emacs session
> > > (call it S2) with the frame displaying the current buffer in S1. All
> the
> > > windows displaying
> > > buffer in S1 are then to be removed and the buffer in S1 killed. What
> can
> > > I do using elisp code ?
> >
> > The buffer doesn't exist in another Emacs session,
> > as I mentioned when you asked the question elsewhere.
> >
> > If you're talking only about the buffer's content,
> > or perhaps its content and some other state (e.g.
> > list of markers, variable values,...), then you can
> > of course persist most such info in a file and
> > then populate a buffer in the other session using it.
> >
> > But a buffer is itself in memory, and session-specific.
> 
> The buffer is then only known with a particular session,

Correct.

> there is no possibility for a different emacs session to
> capture the details from another emacs session.  Unless
> that memory is captures in a file that the new session can
> read.

Yes, AFAIK.  There may also be a way for one
Emacs process to interact with another, but
someone else will need to speak to that. Even
then, I doubt you can communicate things like
buffers between processes - you would need to
serialize/marshall whatever info you wanted
to send to the other process, which amounts
to the same thing as saving serialized data
to disk.

It's not clear what you really need or want
to do.  "The details" is vague.  Most info
about a buffer that would be relevant in 
general can be saved to disk and restored.

> I understand your point.  I shall keep with a new frame
> associated with its respective emacs session.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-23 14:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-22 22:30 Send buffer to new emacs session Heime
2023-08-23  1:30 ` [External] : " Drew Adams
2023-08-23  1:38   ` Drew Adams
2023-08-23  5:17   ` Heime
2023-08-23 14:13     ` Drew Adams

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).