1.9. Leaving Emacs


To quit Emacs, type C-x C-c or close it like you would any other application. If you have made changes to a buffer, Emacs asks you if you want to save them.[5] If you type y, Emacs writes the file, then exits. If you type n, Emacs asks you to confirm that you want to abandon the changes you made by typing yes or no in full. If you type no, your normal Emacs session continues just as if you never attempted to exit. If you type yes, you exit Emacs and the changes you made during this session do not become permanent. Leaving without saving changes can be useful if you make changes you didn't intend to make.

[5] One exception to this rule is the *scratch* buffer. It's a scratchpad and Emacs assumes you were doodling, not doing serious artwork, so to speak. If you do any serious work in the *scratch* buffer, you must save it explicitly.

By the way, Emacs is picky about whether you type y or yes. Sometimes it wants one, sometimes the other. If it asks for a y, you can sometimes get away with typing yes but not vice versa. If it beeps and displays, Please answer yes or no, you didn't enter the whole word and it wants you to.



Learning GNU Emacs
Learning GNU Emacs, Third Edition
ISBN: 0596006489
EAN: 2147483647
Year: 2003
Pages: 161

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net