I am using emacsclient to connect to an emacs server.

When I exit my emacsclient, I use Ctrl-X Ctrl-C just like how I normally exit emacs.

How can I kill the buffer on the emacs server?

I find that the emacs server still keeps the buffer and the memory usage keeps growing as I have more emacsclient but exit from them using Ctrl-X Ctrl-C.

  • I believe it's Ctrl-x #. – Pedro Romano Nov 15 '12 at 2:00
  • C-x # runs the command server-edit — 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. — That's interesting, and complicated also. – Nikana Reklawyks Nov 15 '12 at 19:29

Killing buffers and quitting your emacs frame are totally independant as you mention : the server keeps everything you don't close open, independently of what you display in how many windows. (I often have the same buffers open on 2 or 3 of my virtual desktops, for example not at the same point.)

To kill a buffer, that's C-x k.

Your Answer

