If you enable the desktop feature, you can return to your previously open set of files when you exit and reenter Emacs. This doesn't seem to be a crash recovery feature however.
If Emacs crashes, there is a save list called "saves-PID-machine" that has a list of the files that had buffers. The list has the full path to both the file itself and the corresponding ~
backup file.
How do I use this save list to get back to the set of visited files in buffers that I had before the crash? None of the files had edits pending so recover-session and recover-file don't do anything.
You can download and install https://github.com/tripleee/recover-buffers which visits all the files in the auto-save file, and offers to recover any for which unsaved auto-save data exists.
;;; recover-buffers.el --- revisit all buffers from an auto-save file
;;
;;; Commentary:
;;
;; Works like `recover-session', but attempts to really recover all state
;; back to the way it was when Emacs quit or crashed. Concretely, it
;; revisits all buffers which were open, however skipping any which match
;; an ignore list.
There is an open Emacs bug about this, too; http://debbugs.gnu.org/889
I am the author of this code, and would appreciate any feedback (though not via this public forum).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With