First I ran emacs --daemon
.
Then in one shell, I ran emacsclient -nw
and open several files in the buffer.
Then in another shell, I did the same thing. At the same time I found that the file buffers I opened in the second client also appear in the first client.
When I exit the second client with ctrl-x ctrl-c
, the buffers created in the second client also disappear from the first client.
Can I exit the second client without closing the first client's buffers that were opened in the second client?
Thanks.
My init.el
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 1. markdown.el for markdown languages
;; place `markdown-mode.el` somewhere in the load-path and add
(add-to-list 'load-path "~/.emacs.d/elisp/markdown/") ;; added by me
;; autoload the el file
(autoload 'markdown-mode "markdown-mode"
"Major mode for editing Markdown files" t)
;; the following lines to your `.emacs` file to associate markdown-mode
;; with `.text`, `.markdown`, and `.md` files:
(add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Added by me
;; 2. ESS for R language,
;; (require 'ess-site) ;; TODO: not working
;;;;;;;;;;;;;;;;;;;;
;; 3. go-mode for go language
(add-to-list 'load-path "~/.emacs.d/elisp/go-mode/")
(require 'go-mode-autoloads)
;;;;;;;;;;;;;;;;;;;;
; 4. Enable installation of packages from MELPA
(require 'package) ;; You might already have this line
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize) ;; You might already have this line
;;;;;;;;;;;;;;;;
; 5. for saving emacs sessions
(desktop-save-mode 1)
-Q
?emacs -daemon -Q
? Or do you mean I just runemacsclient -nw -Q
?emacsclient
.C-x C-c
shouldn't kill buffers under any circumstance according to docstrings, anddesktop-mode
doesn't mention changing how that key behaves.