all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [multi-tty] emacsclient and buffers
@ 2007-05-24 18:15 csant
  2007-05-24 20:36 ` David Kastrup
  0 siblings, 1 reply; 2+ messages in thread
From: csant @ 2007-05-24 18:15 UTC (permalink / raw)
  To: emacs-devel

Karoly Lorentey said in a message:

       Frames are associated with the emacsclient session they were
       created in.  C-x 5 2 makes the new frame inherit the association
       as well.  When the user closes the last frame associated with a
       particular emacsclient session, emacsclient exits automatically,
       and vice versa.  C-x C-c is rebound to exit the client, not Emacs
       itself.

But how do buffers behave with respect to these frames?

If I have the client open a file from command line
	$ emacsclient file1
and then find another file, C-x C-f file2 in the same frame, is there one,  
or are there two buffers "associated with the emacsclient session"?  If I  
C-x C-c in the client, it will exit, but leave file2 in the buffer list of  
the emacs server instance.

It seems as if only the file opened from command line is associated with  
the client frame: no matter whether file1 or file2 are in the foreground  
in the client frame, if I C-x C-c in the client, file2 will stay in the  
buffer list of the server.  (Amusing side note: to my bewilderment, this  
happened when I C-x C-f a file with tramp as root from within the client,  
and later found that very file still open in the server's buffer list).  I  
can also kill file1 from within the server, and this will terminate the  
client, allthough file2 is still open in the bufferlist.

If this is expected behaviour, I guess it might need some good user  
documentation.

Also, in terminal (-nw and -t respectively) it is not possible to switch  
to a buffer which is currently in the foreground in another frame (emacs  
server, or client).

Kind regards,
/c

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

* Re: [multi-tty] emacsclient and buffers
  2007-05-24 18:15 [multi-tty] emacsclient and buffers csant
@ 2007-05-24 20:36 ` David Kastrup
  0 siblings, 0 replies; 2+ messages in thread
From: David Kastrup @ 2007-05-24 20:36 UTC (permalink / raw)
  To: csant; +Cc: emacs-devel

csant <csant@csant.info> writes:

> It seems as if only the file opened from command line is associated
> with the client frame: no matter whether file1 or file2 are in the
> foreground in the client frame, if I C-x C-c in the client, file2
> will stay in the buffer list of the server.  (Amusing side note: to
> my bewilderment, this happened when I C-x C-f a file with tramp as
> root from within the client, and later found that very file still
> open in the server's buffer list).  I can also kill file1 from
> within the server, and this will terminate the client, allthough
> file2 is still open in the bufferlist.
>
> If this is expected behaviour, I guess it might need some good user
> documentation.
>
> Also, in terminal (-nw and -t respectively) it is not possible to
> switch to a buffer which is currently in the foreground in another
> frame (emacs server, or client).

While I agree with your points, those are usability issues that are
annoying, not critical.

I suppose that once we merge multi-tty, lots of people will start
removing their favorite annoyances.

In this particular case, one would probable not consider the frames
open from one "terminal" when considering how to arrange the frames in
another.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

end of thread, other threads:[~2007-05-24 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-24 18:15 [multi-tty] emacsclient and buffers csant
2007-05-24 20:36 ` David Kastrup

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.