Add multi-session (by project) desktop write/read.
This commit is contained in:
parent
33fa8c56d8
commit
f19c62f75a
@ -41,6 +41,16 @@
|
||||
))
|
||||
)
|
||||
|
||||
(use-package desktop
|
||||
:straight t
|
||||
:config
|
||||
(setq desktop-path (list (concat temp-dir)))
|
||||
(defun desktop-write()
|
||||
"Llama a desktop save de manera que no pregunte nada."
|
||||
(interactive)
|
||||
(desktop-save temp-dir))
|
||||
)
|
||||
|
||||
;; Mover líneas o regiones
|
||||
(use-package drag-stuff
|
||||
:defer t
|
||||
@ -206,7 +216,6 @@
|
||||
(setq projectile-project-search-path (append
|
||||
projectile-project-search-path
|
||||
'("~/mnt/Nginx"))))
|
||||
(setq projectile-switch-project-action #'projectile-dired) ; Usar dired cuando se elija un proyecto.
|
||||
|
||||
;; Cambiar el título de la ventana de emacs
|
||||
(setq frame-title-format
|
||||
@ -218,7 +227,20 @@
|
||||
"%b"
|
||||
" - Emacs")
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defun projectile-desktop-save-hook ()
|
||||
"Nombres de los archivos de desktop-save según el nombre del proyecto."
|
||||
(setq desktop-hash
|
||||
(secure-hash 'md5 (concat (projectile-project-root))))
|
||||
|
||||
(setq
|
||||
desktop-base-file-name (concat ".emacs-" desktop-hash ".desktop")
|
||||
desktop-base-lock-name (concat ".emacs-" desktop-hash ".desktop" ".lock"))
|
||||
)
|
||||
|
||||
(add-hook 'projectile-after-switch-project-hook #'projectile-desktop-save-hook)
|
||||
)
|
||||
|
||||
;; Recentf - Guarda registro de los archivos abiertos recientemente
|
||||
(use-package recentf
|
||||
|
Loading…
Reference in New Issue
Block a user