I am trying to use emacs with a background server running and client instances.
To do so, I lauch an emacs daemon with emacs --daemon
. Then I open a client session with emacsclient -c
. Doing like that and then visiting a file in the client session works fine. However, if I try to directly open a file with emacsclient -c file
, there is a "Server" minor mode displayed in the mode line, and when I click on it and choose "Help for minor mode", a frame open with that text :
server-buffer-clients is an alias for `server-buffer-clients',
which is not defined. Please make a bug report.
Then, if I close the client and open a new client, the file previously opened with emacsclient -c file
isn't in the list of current buffers anymore (Ctrl-x b) while they stay in it if I just open a client with emacsclient -c
and next visit them.
Why this behavior ? I am doing things wrong ? How to properly use emacs in client/server modes to have a persistent background instance with which I can interact ?
Thanks :-)
PS : I am running emacs-24.5.1 I have also tried that without any customization (with no .emacs and no .emacs.d)
C-x #
(server-edit
) then this not only closes the client, but also kills the buffer. You can easily try that out in another server window, which will show the buffer as exisiting while the client still is running, and once you close it withC-x #
will not have it in the list of buffers any more.emacsclient -n -c file
instead. Then emacsclient will quit as soon as emacs has opened the file, and the buffer will remain until you kill it explicitly.