Advertisement

Emacs -- save last session [SOLVED]

Started by November 13, 2005 11:36 PM
0 comments, last by Halsafar 18 years, 10 months ago
Is there anyway I can have Emacs load back up with the same buffers it closed down with. Simply so my project doesn't need re-opening EVERY time I gotta restart Emacs. [Edited by - Halsafar on November 14, 2005 9:53:49 AM]
Solved:
Add this to your .emacs:

(load "desktop")
(desktop-load-default)
(desktop-read)

Then during your next session type M-x desktop-save
From that point on and forever, all your sessions will auto-save when you exit emacs. However, you MUST open emacs from within the directory you saved the session in. The 'desktop-save' command will ask for a location. This way you technically can have multiple saved sessions based on projects for example.

This topic is closed to new replies.

Advertisement