I have the following in my .emacs
:
(desktop-save-mode 1)
(setq desktop-restore-eager 10)
(setq desktop-save t)
Often I have a lot of buffers open (100 or so), then this really helps - as emacs is loading buffers only when not beeing busy with something else.
Now, sometimes the following happens: I close emacs before I want to shut down my laptop. Then I realize - I need to edit one more file quickly - so I open emacs again, perform the editing, and then close it. If this happens within a short amount of time, then desktop-save-mode
was not able to restore all previously saved buffers. In this case, when I now close emacs again, only the buffers that were restored are saved and the state before the initial shutdown is lost.
Is there a way to make the desktop-save
only happening, if the previously saved desktop has been completely restored?