Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The reason why I ask is for most thing they appear similar, except when using Thunderbird External Editor Extension (with editor designated as emacsclient -c). Closing the frame created with this emacsclient instance with C-x C-c (C-x # does not work sometimes?) will also kill the buffer associated with this frame (not the usual emacsclient behavior).

And, in general, C-x C-c will just close the frame unless another buffer is visited in that frame -- after this, C-x C-c will try to close all of emacs. How do I try to understand this behavior?

share|improve this question
add comment

1 Answer 1

From Emacs, you can get help for any key by pressing C-h k and then entering the key combination that you want to know about. Pressing C-h k C-x # returns this:

C-x # runs the command server-edit, which is an interactive compiled Lisp function in `server.el'.

It is bound to C-x #.

(server-edit &optional ARG)

Switch to next server editing buffer; say "Done" for current buffer. If a server buffer is current, it is marked "done" and optionally saved. The buffer is also killed if it did not exist before the clients asked for it. When all of a client's buffers are marked as "done", the client is notified.

Temporary files such as MH files are always saved and backed up, no questions asked. (The variable 'make-backup-files', if nil, still inhibits a backup; you can set it locally in a particular buffer to prevent a backup for it.) The variable 'server-temp-file-regexp' controls which filenames are considered temporary.

If invoked with a prefix argument, or if there is no server process running, starts server process and that is all. Invoked by C-x #. C-x # runs the command server-edit, which is an interactive compiled Lisp function in 'server.el'.

Similarly for C-x C-c

C-x C-c runs the command save-buffers-kill-terminal, which is an interactive compiled Lisp function in `files.el'.

It is bound to C-x C-c, .

(save-buffers-kill-terminal &optional ARG)

Offer to save each buffer, then kill the current connection. If the current frame has no client, kill Emacs itself.

With prefix ARG, silently save all file-visiting buffers, then kill.

If emacsclient was started with a list of filenames to edit, then only these files will be asked to be saved.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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