刚好昨天整理了一下 desktop 相关的配置,供 lz 参考:
(use-package desktop
:commands restart-emacs-without-desktop
:init (desktop-save-mode)
:config
;; inhibit no-loaded prompt
(setq desktop-file-modtime (file-attribute-modification-time
(file-attributes
(desktop-full-file-name)))
desktop-lazy-verbose nil
desktop-load-locked-desktop t
desktop-restore-eager 1
desktop-restore-frames nil
desktop-save t)
(defun restart-emacs-without-desktop (&optional args)
"Restart emacs without desktop."
(interactive)
(restart-emacs (cons "--no-desktop" args))))