From d4e095e9df3dbc10d9aef4db94ea1cb01bfb458a Mon Sep 17 00:00:00 2001 From: jowj Date: Fri, 24 May 2019 15:25:19 -0500 Subject: [PATCH] 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. --- applicationConfiguration/.emacs/init.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/applicationConfiguration/.emacs/init.el b/applicationConfiguration/.emacs/init.el index 1c883af..778be1e 100644 --- a/applicationConfiguration/.emacs/init.el +++ b/applicationConfiguration/.emacs/init.el @@ -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)