Thursday, February 7, 2008

emacs save your desktop with some commands history

... and load it on startup;

ecb was switched off;
placed following at the end of my .emacs:


%<-----------------------------
;; save a list of open files in ~/.emacs.desktop
;; save the desktop file automatically if it already exists
(setq desktop-save 'if-exists)
(desktop-save-mode 1)

;; save a bunch of variables to the desktop file
;; for lists specify the len of the maximal saved data also
(setq desktop-globals-to-save
(append '((extended-command-history . 50)
(file-name-history . 100)
(grep-history . 50)
(compile-history . 50)
(minibuffer-history . 50)
(query-replace-history . 50)
(read-expression-history . 50)
(regexp-history . 50)
(regexp-search-ring . 30)
(search-ring . 30)
(shell-command-history . 50)
tags-file-name
register-alist)))
------------------------------>%

No comments: