0

I use emacs org mode + EVIL on MacOS.

I had a small part of my file visually selected last night when I wrote :wq and hit y to the prompt. To my shock and horror this morning only the visually selected part of that file remains.

I could find a backup from two months ago in emacs.d/.saves. I have no idea how emacs decides when to make these backups. So I haven't lost everything. I technically have everything in a git repo, but I wasn't making regular commits so unfortunately that doesn't help me in this case. I guess I should setup a cron task to make regular commits for me.

Are there any other tricks for recovering files in a unixy environment?

Here is the crontask I added after experiencing this, if anyone else has been foolish like me.

0 * * * * cd ~/org-files && git add --all && git commit -m "Automatic Hourly Commit"

  • I have a chronology of backups on a different disk: once a day over a seven day period, and then recycle using the oldest date; last two months, and then recycle using the oldest month; every year going back ten years ... I have an older backup of that same backup disk on a different computer, which I update every year or so. Whenever I leave the house, I have the most recent version of my important data with me; e.g., cell-phone, laptop computer, another laptop computer ... I have a backup of the absolute crucial data that I store in cyberspace on a shared server, which I update daily. – lawlist Oct 9 at 19:38

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.