Make session persistence module agnostic
They've been removed from feature/workspaces and moved into core/autoload/sessions, which falls back to desktop.el if persp-mode isn't present. This also offers a substantial speed up to restart+restoring and restoring sessions in general. Also fixes #1210, where the newly spawned frame after doom/restart wasn't focused. Introduces the following commands: - doom/restart - doom/restart-and-restore - doom/quickload-session - doom/quicksave-session - doom/load-session - doom/save-session - +workspace/restore-last-session (alias for doom/quickload-session) And removes - +workspace/load-session - +workspace/save-session - +workspace/load-last-session (renamed to +workspace/restore-last-session) - +workspace/restart-emacs-then-restore (replaced by doom/restart-and-restore) - :ss (ex command) - :sl (ex command)
This commit is contained in:
parent
735ec58b36
commit
8a90f29c91
10 changed files with 181 additions and 143 deletions
|
@ -44,11 +44,12 @@ Possible values:
|
|||
(defvar +doom-dashboard-menu-sections
|
||||
'(("Reload last session"
|
||||
:icon (all-the-icons-octicon "history" :face 'font-lock-keyword-face)
|
||||
:when (and (bound-and-true-p persp-mode)
|
||||
(file-exists-p (expand-file-name persp-auto-save-fname
|
||||
persp-save-dir)))
|
||||
:when (cond ((require 'persp-mode nil t)
|
||||
(file-exists-p (expand-file-name persp-auto-save-fname persp-save-dir)))
|
||||
((require 'desktop nil t)
|
||||
(file-exists-p (desktop-full-file-name))))
|
||||
:face (:inherit (font-lock-keyword-face bold))
|
||||
:action +workspace/load-last-session)
|
||||
:action doom/quickload-session)
|
||||
("Open org-agenda"
|
||||
:icon (all-the-icons-octicon "calendar" :face 'font-lock-keyword-face)
|
||||
:when (fboundp 'org-agenda)
|
||||
|
@ -107,8 +108,9 @@ PLIST can have the following properties:
|
|||
initial-buffer-choice
|
||||
(when (or (daemonp)
|
||||
(not (cl-loop for arg in (cdr command-line-args)
|
||||
if (and (string-match-p "^[^-]" arg)
|
||||
(file-exists-p arg))
|
||||
if (or (equal arg "--restore")
|
||||
(and (string-match-p "^[^-]" arg)
|
||||
(file-exists-p arg)))
|
||||
return t)))
|
||||
#'+doom-dashboard-initial-buffer))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue