Search code examples
emacsterminalautosavedata-recoveryfile-recovery

How to view content of emacs autosave file


How do I directly see the content of an emacs autosave file, without implementing a file recovery operation?

That is, suppose I created a file with 'emacs foo', then emacs crashed, so I'm left with no file named 'foo' (since it never was saved) but with a file '#foo#'. When I type 'more #foo#', I get "Missing filename", as though the more command doesn't even see the #foo# part of the command.

I just want to see the text in #foo# so I can copy it out by hand without risking something going wrong in the file recovery process (eg #foo# getting overwritten by a new autosave operation).

(I'm using Terminal on OSX.)


Solution

  • Bash or another shell use '#' as comment character, try :

    more "#foo#"