-
Notifications
You must be signed in to change notification settings - Fork 0
/
desktop-config-paddy.el
54 lines (40 loc) · 1.63 KB
/
desktop-config-paddy.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
(require 'desktop)
(setq desktop-save t)
(setq history-length 250)
(add-to-list 'desktop-globals-to-save 'file-name-history)
(setq desktop-dirname (expand-file-name "~/.emacs.d/desktop"))
(defun paddy-load-desktop-later ()
(message "paddy-load-desktop-later")
(desktop-read desktop-dirname))
; (run-with-timer 5 nil 'paddy-load-desktop-later)
(desktop-read desktop-dirname)
(defun paddy-desktop-save-in-desktop-dir ()
"Save the desktop in directory `desktop-dirname'.
Like desktop-save-in-desktop-dir, but without the messaging"
(interactive)
(if desktop-dirname
(desktop-save desktop-dirname)
(call-interactively 'desktop-save)))
(add-hook 'auto-save-hook 'paddy-desktop-save-in-desktop-dir)
;; ;; Customization goes between desktop-load-default and desktop-read
;; (setq history-length 2500)
;; (setq desktop-load-locked-desktop t)
;; ;(add-to-list 'desktop-globals-to-save 'file-name-history)
;; (setq desktop-lazy-idle-delay 0)
;; (setq desktop-dir (expand-file-name "~/.emacs.d/desktop"))
;; (setq desktop-dirname desktop-dir)
;; (defun desktop-save-in-desktop-dir ()
;; "Save the desktop in directory `desktop-dirname'."
;; (interactive)
;; (if desktop-dirname
;; (desktop-save desktop-dirname)
;; (call-interactively 'desktop-save)))
;; (desktop-save-mode 1) ;; Switch on desktop.el
;; (defun autosave-desktop ()
;; (desktop-save-in-desktop-dir))
;; ;; Can be switched off with (cancel-timer *foo-desktop-saver-timer*)
;;
;; ;; changed so that i no longer messages that the desktop was saved
;; ;; (message "Desktop saved in %s" (abbreviate-file-name desktop-dirname))
;; )
(provide 'desktop-config-paddy)