I use Emacs 29.1.
When I open Emacsclient, I do it with the following command:
emacsclient -a -c --create-frame --no-wait
This is bounded to a key combination to start the Emacsclient.
To kill a Emacsclient window, this is bounded to the 'kill' command in a keybinding.
When I open Emacsclient, and visit a file
foobar.txt. A buffer is created in the first client.
Then I open a second client, without closing the first client.And in the second client I open the same buffer
foobar.txt. Then I close the second client window.
When I open a new Emacsclient window, I can see the buffer
foobar.txt is still open in background.
When closing the second and the first one Emacsclient, then the buffer
foobar.txt will disappear.
I want to keep the buffer
foobar.txt, regardless if the client windows are open or not. The buffer
foobar.txt should be staying in the Emacs daemon.
When looking for a solution, I found another this thread: Kill buffer when closing emacs with emacsclient
server-kill-new-buffers, this is set on
Then I visit the file
foobar.txt again, and close the Emacsclient.
When open another Emacsclient instance, I see the buffer
foobar.txt is not saved in memory.
TLDR: How can I keep the buffer sticking to Emacs daemon, when closing the only Emacsdaemon window with