I am using the Emacs editor, and every time I start Emacs, I lose my previous settings.
For example, every time I have to type:
- M-x
cua-mode
RET - M-x
auto-complete-mode
RET
How can I save my settings in Emacs?
Thanks.
In your emacs directory there is a site-lisp folder. Normally it will be empty. you could create a file default.el in this folder. Add these two lines (cua-mode t) (auto-complete-mode) and save it.This will be executed during Init. If you want to set environment variables for your emacs application only(not permanent) add a file called site-start.el in the site-lisp directory and define value for that variable ex:(setenv "VARIABLENAME" "value"). The site-lisp directory is in the standard search path for Lisp library.
The best answer I can think of is to point you at the manual:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Customization.html
In particular, see the sections on "Easy Customization" and the "Init File"; but I would recommend at least skimming over everything in this section.