I have the misfortune of having been issued a Mac for work. It crashes regularly. To add insult to injury, Emacs doesn't seem to be very good at recovering from these crashes.

There is a recover-session command, but Emacs considers itself to have many "sessions", each with a separate session-file with a name beginning with .saves-. To get all the files back that you had open before the ghost of Steve Jobs walked up and pressed the power button for you while working, you have to recover each of these separately.

But that isn't all. Then, you must answer a prompt asking if you want to recover each file:

Recover /Foo/bar/baz.txt? (y, n, !, ., q, or C-h)

to which you can answer "!" get rid of that particular prompt for the files in that particular saves file, but then you get prompted for each file's auto save file-- individually:

Recover auto save file /foo/bar/baz? (yes or no)

This time there is no "!" shortcut. You have to spell out yes for each one.

And even after all that, I only have a fraction of the files open that I had before the crash.

Isn't there a command that can just recover all the files you had open with no prompts, and a way to get Emacs to actually recover the whole session and not just a small part of it?

  • 2
    My recollection is that desktop.el has an optional timer, and you might want to look into using that library to save as you go -- you can also save manually, or put it on a hook -- e.g., when saving a file, when opening a new file, etc. In terms of Mac crashing, this should not be happening regularly. Try and find out what is causing it and don't do that any more. If necessary, reinstall the OS. – lawlist May 27 '17 at 8:21

Your Answer

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

Browse other questions tagged or ask your own question.