Reputation: 19724
I followed some answers here, customizing a workspace, where I had several windows sized how I wanted them. I saved this session, as per instructions, here. While I see that I now have a .emacs.desktop file in that directory, I can't seem to understand how to load my desktop configuration. When I emacs .emacs.desktop or C-x c-f .emacs.desktop
, that only edits the file itself, rather than loading the configuration. How can I start with a restored configuration?
Upvotes: 11
Views: 8685
Reputation: 89
Maybe this answers your question
M-: (desktop-read DIRNAME)
or you can invoke the defaults with
M-x desktop-read
or with
M-: (desktop-read)
finally, you can also run the help:
C-h f desktop-read
Upvotes: 1
Reputation: 6960
The .emacs.desktop
file is ~/.emacs.d
directory by default.
You just need to have (desktop-save-mode t)
in your init.el
, to load the saved emacs configuration from the previous session.
Everytime you make changes to the buffer and save it, all of it is going to reloaded the next time you reopen emacs.
This setting is going to remember things like cursor position, buffers, etc.
Upvotes: 4
Reputation: 15854
I have a similar setup, and M-x desktop-change-dir
works for me. You will then be prompted to enter the path to your .emacs.desktop
file, or you can create a new one. After that, your desktop/workspace should be loaded.
Also, each desktop configuration will have its own .emacs.desktop
file.
Upvotes: 17
Reputation: 30718
The same doc you pointed to (your second link -- the Emacs manual) tells you how to restore a desktop that has been saved: Customize option desktop-save-mode
to non-nil
(or put (desktop-save-mode 1)
in your init file). That should be all you need to do. Did you try that?
M-x customize-option desktop-save-mode
Upvotes: 2