I have used emacs for several years now and wanted to make the leap to daemon mode and using emacsclient. What has prevented me so far is getting ride(closing) of buffers opend via emacsclient. Note that with the examples below the daemon was already started with emacs --daemon
First problem is:
- open a file via shell with "emacsclient -q -c a.txt"
- open a b.txt from inside emacsclient via "C-x C-f b.txt"
- executing "C-x #" in buffer b.txt switches to buffer a.txt, but does not close buffer "b.txt"
- executing "C-x #" in buffer a.txt closes the client frame and kills buffer a.txt, but buffer b.txt remains open (runnig afterwards "emacsclient -q -c" and checking Ibuffer will show buffer b.txt as available.)
- I can only get rid of b.txt by going into its buffer and executing "C-x k"
The first question is how can I get rid of b.txt by simply closing the frame which opened it via "C-x C-f".
The second problem is:
- open a file via shell with "emacsclient -q -c a.txt"
- open a file via shell with "emacsclient -q b.txt"
- when being in buffer a.txt, executing "C-x #" closes buffer a.txt AND KILLS the frame, but buffer b.txt remains open (runnig afterwards "emacsclient -q -c" and checking Ibuffer will show buffer b.txt as available.)
the same holds when executing "C-x C-c", a.txt is closed, b.txt remains open
only when running "C-x #" first in buffer b.txt and then in buffer a.txt will keep the frame open until both buffers are closed
The second question is therefore similar to the first: how can I close all buffers associated to a frame by executing "C-x C-c", and, in case I use "C-x #" how can I keep the frame alive until the last buffer associated to it is close.
Any idea or suggestions.
Thanks a lot.
Cheers