3

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?

1 Answers1

8

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.

dmg
  • 629
  • 4
  • 13