6

As soon as I open emacsclient I found the following message in the minibuffer: When done with this frame, type C-x 5 0, I find it strange that it advices how to close the frame with delete-frame, any reason to display the message or prefer it over C-x C-c in this case?

enter image description here

6

This is explained in the manual here:

C-hig (emacs)emacsclient Options RET

   The new graphical or text terminal frames created by the ‘-c’ or ‘-t’
options are considered “client frames”.  Any new frame that you create
from a client frame is also considered a client frame.  If you type ‘C-x
C-c’ (‘save-buffers-kill-terminal’) in a client frame, that command does
not kill the Emacs session as it normally does (*note Exiting::).
Instead, Emacs deletes the client frame; furthermore, if the client
frame has an ‘emacsclient’ waiting to regain control (i.e., if you did
not supply the ‘-n’ option), Emacs deletes all other frames of the same
client, and marks the client’s server buffers as finished, as though you
had typed ‘C-x #’ in all of them.  If it so happens that there are no
remaining frames after the client frame(s) are deleted, the Emacs
session exits.

   As an exception, when Emacs is started as a daemon, all frames are
considered client frames, and ‘C-x C-c’ never kills Emacs.  To kill a
daemon session, type ‘M-x kill-emacs’.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.