10

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

1 Answer 1

9

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’.
4
  • Is it possible to suppress this message?
    – alper
    Commented Mar 21, 2021 at 14:09
  • Only in Emacs 28+, where you can customize the user option server-client-instructions.
    – phils
    Commented Mar 21, 2021 at 14:28
  • ah it answers emacs.stackexchange.com/q/64019/18414 than; I couldn't switch to Emacs 28+ and stuck at Emacs 26.3 :-( due to emacs.stackexchange.com/a/55186/18414 answer only works under Emacs versions < 27.1
    – alper
    Commented Mar 21, 2021 at 14:30
  • 1
    @alper: the answer that you point to gives you a method for < 27.1 and it also gives you a method for >=27.1: "For later versions replace python-font-lock-keywords with python-font-lock-keywords-maximum-decoration."
    – NickD
    Commented Feb 8, 2022 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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