3

As a standalone instance (without daemon mode) I close my emacs via C-x C-c (save-buffers-kill-terminal).

This works also with emacsclient and I see no problem about that.

But the manpage of emacsclient tells me that I should close a session via C-x # (server-edit).

And when I start emacsclient the minibuffer informs me that When done with this frame, type C-x 5 0. Which would be delete-frame-functions.

So I see 3 kinds of "closing". What are the differences and which one should I use?

I have read the documentation of all three functions but I do not understand them. There are some relevant questions and answers to this topic. But I can not bring them together. I assume the reason is that I lack a lot of emacs basic knowledge that would be relevant to understand the answers.

Maybe relevant:

buhtz
  • 679
  • 4
  • 22
  • 2
    Does this answer your question? [Why emacsclient say to quit with C-x 5 0?](https://emacs.stackexchange.com/questions/33589/why-emacsclient-say-to-quit-with-c-x-5-0) – phils Feb 07 '22 at 21:56
  • 1
    See also https://stackoverflow.com/questions/21317065/emacs-client-difference-between-c-x-k-and-c-x – phils Feb 07 '22 at 22:05
  • 1
    Note that buffers can be explicitly associated with clients, usually by specifying their filenames on the command line with `emacsclient FILE1 FILE2 ...`, and therefore telling the server that you are "done" with a given buffer is information that Emacs can act upon. – phils Feb 07 '22 at 22:11
  • `C-x 5 0` is `delete-frame` which "runs `delete-frame-functions` before actually deleting the frame" (from docstring). – JeanPierre Feb 13 '22 at 20:21

0 Answers0