Add lines for managing desktop-save-mode in init.el.

- this doesn't work great yet
- i think auto calling twit / znc would fix position/login issues for
- those buffers.
This commit is contained in:
jowj 2019-05-24 15:25:19 -05:00
parent 268331d634
commit d4e095e9df

View File

@ -89,3 +89,13 @@ jlj-Packages)
;; set some more keybindings
(global-set-key "\M-`" 'other-frame) ; mimic the way macosx switches between windows of the same application
;; look at https://www.emacswiki.org/emacs/Desktop
(require 'desktop)
(desktop-save-mode 1)
(defun jlj-desktop-save ()
(interactive)
;; Don't call desktop-save-in-desktop-dir, as it prints a message.
(if (eq (desktop-owner) (emacs-pid))
(desktop-save desktop-dirname)))
(add-hook 'auto-save-hook 'jlj-desktop-save)