0

How do I ask Emacs (Aquamacs, in my case) to make backups not only of the documents I work on, but also of customization files such as customizations.el?

incandescentman
  • 6,168
  • 3
  • 46
  • 86

2 Answers2

4

In addition to the backup configuration that Dualinity has described, I'd suggest you put all your emacs customizations under version control (git, hg, bzr, etc.). Many times I've needed to revert my customizations due to unintended side-effects. Reviewing changes you made from six months ago is trivial if you check in all your changes as you make them.

Jeff Bauer
  • 13,890
  • 9
  • 51
  • 73
  • 1
    I can't recommend this highly enough. Even if version-control is alien to you at present, it's *such* a valuable thing to learn, it will be well worth your while. – phils Feb 25 '13 at 20:23
  • What files should I put under version control? Looking at my ~ directory I see that there's not only .emacs, but also a directory called .emacs.d and a bunch of others. – incandescentman Feb 26 '13 at 17:31
  • 1
    What I don't get is how this is the answer to your question. It provides an answer to a different question; something along the line "What could be improvements over simply backing up customization file?". It is weird 4 people showed up here, upvoted this, and got the vote. Can anyone explain to me on what basis something like that works? – PascalVKooten Feb 26 '13 at 17:49
1

For example by putting (setq custom-file "~/.emacs-custom.el") in your .emacs file designating it as a custom file (of course, another name will do), followed by (load custom-file) which loads it.

Taken from: http://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Customizations.html

It also talks about different customizations for different versions.

PascalVKooten
  • 20,643
  • 17
  • 103
  • 160
  • I did this, and it broke a bunch of my customizations. My custom scratch file no longer loads in org-mode, my cursor customizations do not load... possibly others as well. My .emacs file consists of the lines `(setq custom-file "~/elisp/dotemacs.el") (load custom-file )`. Investigating the variable `custom-file` confirms that the custom file and its path are correct. What am I doing wrong? – incandescentman Mar 04 '13 at 19:37