I want to save a session (open buffers) and then restore it at a later date, how can I do this easily in Emacs? I'm using version 24.2.1.


This is explained in the Emacs manual.

Basically, you call

(desktop-save-mode 1)

in your init file. After that, the current directory where emacs starts determines which session is saved/loaded.

  • I always start Emacs from the Linux dash, so I don't really know what you're suggesting here. – bug Sep 27 '13 at 9:36
  • Then you're probably always running emacs from your home directory. Meaning that the file describing your session will be stored there, and you will always start emacs with the same session. Now, that doesn't prevent you from saving/loading other sessions. As explained in the documentation linked above, you can type M-x desktop-change-dir to switch to the session saved in a particular directory. – Francesco Sep 27 '13 at 18:46

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.