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?
Asked
Active
Viewed 1,102 times
10
1 Answers
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’.

phils
- 48,657
- 3
- 76
- 115
-
Is it possible to suppress this message? – alper Mar 21 '21 at 14:09
-
Only in Emacs 28+, where you can customize the user option `server-client-instructions`. – phils Mar 21 '21 at 14:28
-
ah it answers https://emacs.stackexchange.com/q/64019/18414 than; I couldn't switch to Emacs 28+ and stuck at `Emacs 26.3` :-( due to https://emacs.stackexchange.com/a/55186/18414 answer only works under `Emacs versions < 27.1` – alper Mar 21 '21 at 14:30
-
1@alper: the [answer](https://emacs.stackexchange.com/questions/55184/how-to-highlight-in-different-colors-for-variables-inside-fstring-on-python-mo/55186#55186) 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 Feb 08 '22 at 13:41