Emacs: Reduce desktop-auto-save-timeout to 5 and disable lazy loading
parent
8d832a412d
commit
24d2f1883b
|
@ -237,28 +237,31 @@
|
||||||
;;; Comint mode
|
;;; Comint mode
|
||||||
(setq comint-prompt-read-only t)
|
(setq comint-prompt-read-only t)
|
||||||
|
|
||||||
(defadvice desktop-owner (after pry-from-cold-dead-hands activate)
|
|
||||||
"Don't allow dead emacsen to own the desktop file."
|
|
||||||
(when (not (emacs-process-p ad-return-value))
|
|
||||||
(setq ad-return-value nil)))
|
|
||||||
|
|
||||||
;;; Desktop-mode
|
;;; Desktop-mode
|
||||||
;;; Let Emacs auto-load/save sessions only when running the daemon.
|
;;; REVIEW: Desktop does not get saved when Emacs quits.
|
||||||
;;; `server-running-p' is only useful once the daemon is started and cannot be
|
;;; See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28945.
|
||||||
;;; used for initialization. We use `daemonp' instead.
|
|
||||||
;;; TODO: Desktop does not get saved when Emacs quits. When does it get saved?
|
|
||||||
;;; TODO: `desktop-kill' should not query the user in `kill-emacs-hook'.
|
;;; TODO: `desktop-kill' should not query the user in `kill-emacs-hook'.
|
||||||
;;; TODO: Desktop mode does not save window registers properly.
|
;;; TODO: Desktop mode does not save window registers properly.
|
||||||
;;; See https://groups.google.com/forum/#!topic/gnu.emacs.help/64aO_O43530
|
;;; See https://groups.google.com/forum/#!topic/gnu.emacs.help/64aO_O43530
|
||||||
;;; and https://www.reddit.com/r/emacs/comments/4q38s1/save_register_between_sessions/?st=j419vc7r&sh=2617ffb4
|
;;; and https://www.reddit.com/r/emacs/comments/4q38s1/save_register_between_sessions/?st=j419vc7r&sh=2617ffb4
|
||||||
;;; and http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27422
|
;;; and http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27422
|
||||||
;;; and https://stackoverflow.com/questions/5830494/windows-configuration-to-registers#5830928.
|
;;; and https://stackoverflow.com/questions/5830494/windows-configuration-to-registers#5830928.
|
||||||
|
(defadvice desktop-owner (after pry-from-cold-dead-hands activate)
|
||||||
|
"Don't allow dead emacsen to own the desktop file."
|
||||||
|
(when (not (emacs-process-p ad-return-value))
|
||||||
|
(setq ad-return-value nil)))
|
||||||
(when (daemonp)
|
(when (daemonp)
|
||||||
|
;; Let Emacs auto-load/save sessions only when running the daemon.
|
||||||
|
;; `server-running-p' is only useful once the daemon is started and cannot be
|
||||||
|
;; used for initialization. We use `daemonp' instead.
|
||||||
(setq history-length 250
|
(setq history-length 250
|
||||||
|
;; TODO: Default timer (30) is way to high: for somebody too frenzy, the
|
||||||
|
;; timer might never be saved. Report.
|
||||||
|
desktop-auto-save-timeout 5
|
||||||
desktop-dirname (concat emacs-cache-folder "desktop")
|
desktop-dirname (concat emacs-cache-folder "desktop")
|
||||||
desktop-path (list desktop-dirname)
|
desktop-path (list desktop-dirname)
|
||||||
desktop-save t
|
;; desktop-restore-eager 4 ; Can be annoying as you don't have your last-loaded buffers immediately.
|
||||||
desktop-restore-eager 4)
|
desktop-save t)
|
||||||
(unless (file-directory-p desktop-dirname)
|
(unless (file-directory-p desktop-dirname)
|
||||||
(make-directory desktop-dirname t))
|
(make-directory desktop-dirname t))
|
||||||
;; TODO: `compile-history' should be buffer local but that does not work.
|
;; TODO: `compile-history' should be buffer local but that does not work.
|
||||||
|
|
Loading…
Reference in New Issue