I found old mail in my mailbox:

Date: 2010-09-13 17:41:21+0300 Mon
(require 'session)
(add-hook 'after-init-hook 'session-initialize)

Now I am using desktop mode:

(setq desktop-base-file-name ".emacs.desktop")
(setq desktop-base-lock-name ".emacs.desktop.lock")
(when (eq system-type 'cygwin)
  (setq desktop-base-file-name ".emacs.desktop-cygwin")
  (setq desktop-base-lock-name ".emacs.desktop-cygwin.lock")
(setq desktop-dirname user-emacs-directory)

(when (>= emacs-major-version 22)
  (require 'desktop)
  (add-to-list 'desktop-path desktop-dirname)
  (setq desktop-restore-frames nil)
  (desktop-save-mode 1)
    '((file-name-history . 100)
      (compile-history . 100)
      (command-history . 100)
      (extended-command-history . 100)
      (shell-command-history . 100)
      (query-replace-history . 100)
      (regexp-history . 100)
      (grep-history . 100)
      (minibuffer-history . 100))
    desktop-globals-to-save))    )

session is provided by /usr/share/emacs24/site-lisp/emacs-goodies-el/session.el so it is not built-in.

Do I get any benefits from session.el?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.