This is my current Emacs workflow:

emacs --daemon
emacsclient -c 

then editing few files and saving some of them (and keeping some of them unsaved and open on the server for later edit); then deleting the frame with C-x 5 0 (and later connecting again with emacsclient -c).

What is C-x # (server-edit) for? what does it do? how it can affect my workflow?


emacsclient waits for emacs server. When you do server-edit, the server notifies emacsclient to terminate.

It all depends on what you are going to do. In chrome I use the 'edit with emacs' extension, which uses emacs server to edit fields like these. From emacs I must notify chrome that I am done by calling server-edit. It is only at that moment that the text get pasted back into the input box (and the frame I am using to edit gets killed). Also, when the buffer is saved, chrome updates the edit field. But server-edit kills the frame too.

But from the command line I don't care to call server-edit. I usually create an alias for emacsclient -n (e='emacsclient -n' in bash). That way emacsclient does not have to wait for the server. I rarely do server-edit on these buffers.

| improve this answer | |
  • Interesting, I am curious how did you setup Google Chrome to edit this post using Emacs? – Håkon Hægland Dec 21 '16 at 10:33
  • 3
    I use the "edit with emacs" extension for Chrome. – dmg Dec 21 '16 at 11:01

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.