Session management

From WikEmacs
Revision as of 10:43, 10 May 2017 by Elvince (talk | contribs) (desktop: we can save multiple projets/file)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Session management allows session data such as buffers, cursor positions, global variables, windows, and frames to be saved and restored. This is often used to quickly restore a previous working environment. The particular session data which can be saved varies across session management packages.

Packages

  • desktop.el - Bundled with Emacs. Saves buffers, points, marks, history, and other variables in a desktop file, that we can load afterwards. Emacs 24.4 snapshots since June 2013 also store frames, including their desktop position and window arrangement. Works for many projects: we can save a desktop file in a given directory (desktop-save) and load it (optional argument to desktop-read).
  • savehist.el allows you to save many variables accross sessions. Activate it with (savehist-mode 1). By default it will only save your minibuffer history, but you can save other variables. For instance save your search strings by setting savehist-additional-variables to (search-ring regexp-search-ring).