Next: , Previous: Q1.3.9, Up: Introduction


1.4: Getting Started, Backing up & Recovery

Q1.4.1: What is an init.el or .emacs and is there a sample one?

The init.el or .emacs file is used to customise SXEmacs to your tastes. The preferred location for the init file is ~/.sxemacs/init.el. We still accept the older location ~/.emacs, but the first time you run it, it will ask to migrate your file to the new location. If you answer yes, the file will be moved, and a "compatibility" .emacs file will be placed in the old location so that you can still run older versions of XEmacs, or versions of GNU Emacs, which expect the old location. The .emacs file present is just a stub that loads the real file in ~/.sxemacs/init.el.

No two init files are alike, nor are they expected to be alike, but that's the point. The SXEmacs distribution contains an excellent starter example in the etc/ directory called sample.init.el. Copy this file from there to ~/.sxemacs/init.el, where ‘~’ means your home directory, of course. Then edit it to suit.

You may bring the sample.init.el file into a SXEmacs buffer from the menubar. The menu entry is always under the ‘Samples’ submenu in the ‘Help’ menu. To determine the location of the etc/ directory type the command C-h v data-directory <RET>.