Subject: bug#11102: 24.0.94; C-x C-c from a client frame sometimes kills the whole Emacs process

From: Dani Moncayo <[email-masked]>
Date: Fri, 13 Apr 2012 17:20:35 +0200

> In that case, I don't understand why did Dani expect something
> different from what he saw.

??
As I said in the first post, I expect the behavior documented in node
"(emacs)emacsclient Options":

    If you type `C-x C-c' (`save-buffers-kill-terminal') in an Emacs
 frame created with `emacsclient', via the `-c' or `-t' options, Emacs
 deletes the frame instead of killing the Emacs process itself.  [...]

>  I see the same behavior on GNU/Linux: if
> emacsclient is invoked with -n, "C-x C-c" kills Emacs.

If you used also -t or -c, then the the bug is also on that platform
(according to the manual).

> As for the logic behind the above code, AFAIU -n means emacsclient is
> used as a way of asking Emacs to visit a file without any special
> handling; in particular, "C-x #" does _not_ kill the buffer visiting
> that file.

According to the manual, "-n" just means "no wait for the server to
return control":

  `-n'
  `--no-wait'
       Let `emacsclient' exit immediately, instead of waiting until all
       server buffers are finished.  You can take as long as you like to
       edit the server buffers within Emacs, and they are _not_ killed
       when you type `C-x #' in them.

> So killing the entire session upon "C-x C-c" makes sense
> in this case.

I don't see how that interpretation can be deducted from the current manual.

Besides, as I said in the first post, the observed behavior also
varies when you call emacsclient with and without a filename.

-- 
Dani Moncayo