GNU Emacs Manual
Total Page:16
File Type:pdf, Size:1020Kb
GNU Emacs Manual GNU Emacs Manual Seventeenth Edition, Updated for Emacs Version 24.5. Richard Stallman et al. This is the Seventeenth edition of the GNU Emacs Manual, updated for Emacs version 24.5. Copyright c 1985{1987, 1993{2015 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being \The GNU Manifesto," \Distribution" and \GNU GENERAL PUBLIC LICENSE," with the Front-Cover Texts being \A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled \GNU Free Documentation License." (a) The FSF's Back-Cover Text is: \You have the freedom to copy and modify this GNU manual. Buying copies from the FSF supports it in developing GNU and promoting software freedom." Published by the Free Software Foundation 51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA ISBN 978-0-9831592-4-7 Cover art by Etienne Suvasa; cover design by Matt Lee. i Short Contents Preface :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 Distribution :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2 Introduction :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 5 1 The Organization of the Screen ::::::::::::::::::::::::::::::::::::::::: 6 2 Characters, Keys and Commands :::::::::::::::::::::::::::::::::::::: 10 3 Entering and Exiting Emacs :::::::::::::::::::::::::::::::::::::::::: 12 4 Basic Editing Commands ::::::::::::::::::::::::::::::::::::::::::::: 14 5 The Minibuffer ::::::::::::::::::::::::::::::::::::::::::::::::::::: 23 6 Running Commands by Name ::::::::::::::::::::::::::::::::::::::::: 32 7 Help:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 33 8 The Mark and the Region :::::::::::::::::::::::::::::::::::::::::::: 40 9 Killing and Moving Text ::::::::::::::::::::::::::::::::::::::::::::: 46 10 Registers :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 56 11 Controlling the Display :::::::::::::::::::::::::::::::::::::::::::::: 60 12 Searching and Replacement ::::::::::::::::::::::::::::::::::::::::::: 78 13 Commands for Fixing Typos :::::::::::::::::::::::::::::::::::::::::: 95 14 Keyboard Macros :::::::::::::::::::::::::::::::::::::::::::::::::: 100 15 File Handling ::::::::::::::::::::::::::::::::::::::::::::::::::::: 107 16 Using Multiple Buffers :::::::::::::::::::::::::::::::::::::::::::::: 128 17 Multiple Windows ::::::::::::::::::::::::::::::::::::::::::::::::: 136 18 Frames and Graphical Displays ::::::::::::::::::::::::::::::::::::::: 141 19 International Character Set Support ::::::::::::::::::::::::::::::::::: 154 20 Major and Minor Modes :::::::::::::::::::::::::::::::::::::::::::: 173 21 Indentation ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 178 22 Commands for Human Languages ::::::::::::::::::::::::::::::::::::: 181 23 Editing Programs :::::::::::::::::::::::::::::::::::::::::::::::::: 209 24 Compiling and Testing Programs ::::::::::::::::::::::::::::::::::::: 227 25 Maintaining Large Programs ::::::::::::::::::::::::::::::::::::::::: 244 26 Abbrevs :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 268 27 Dired, the Directory Editor :::::::::::::::::::::::::::::::::::::::::: 273 28 The Calendar and the Diary ::::::::::::::::::::::::::::::::::::::::: 287 29 Sending Mail :::::::::::::::::::::::::::::::::::::::::::::::::::::: 303 30 Reading Mail with Rmail :::::::::::::::::::::::::::::::::::::::::::: 311 31 Miscellaneous Commands:::::::::::::::::::::::::::::::::::::::::::: 328 32 Emacs Lisp Packages ::::::::::::::::::::::::::::::::::::::::::::::: 353 33 Customization ::::::::::::::::::::::::::::::::::::::::::::::::::::: 357 34 Dealing with Common Problems :::::::::::::::::::::::::::::::::::::: 384 A GNU GENERAL PUBLIC LICENSE :::::::::::::::::::::::::::::::::: 398 ii B GNU Free Documentation License :::::::::::::::::::::::::::::::::::: 408 C Command Line Arguments for Emacs Invocation :::::::::::::::::::::::: 415 D X Options and Resources :::::::::::::::::::::::::::::::::::::::::::: 428 E Emacs 23 Antinews :::::::::::::::::::::::::::::::::::::::::::::::: 435 F Emacs and Mac OS / GNUstep::::::::::::::::::::::::::::::::::::::: 437 G Emacs and Microsoft Windows/MS-DOS ::::::::::::::::::::::::::::::: 440 The GNU Manifesto:::::::::::::::::::::::::::::::::::::::::::::::::::: 449 Glossary ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 456 Key (Character) Index :::::::::::::::::::::::::::::::::::::::::::::::::: 476 Command and Function Index ::::::::::::::::::::::::::::::::::::::::::: 484 Variable Index :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 496 Concept Index :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 503 iii Table of Contents Preface ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 Distribution :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2 Acknowledgments::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2 Introduction ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 5 1 The Organization of the Screen :::::::::::::::::::::::::::::: 6 1.1 Point:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6 1.2 The Echo Area :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 7 1.3 The Mode Line :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 7 1.4 The Menu Bar :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 9 2 Characters, Keys and Commands::::::::::::::::::::::::::: 10 2.1 Kinds of User Input :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 10 2.2 Keys ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 10 2.3 Keys and Commands ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 11 3 Entering and Exiting Emacs::::::::::::::::::::::::::::::::: 12 3.1 Entering Emacs :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 12 3.2 Exiting Emacs ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 12 4 Basic Editing Commands :::::::::::::::::::::::::::::::::::: 14 4.1 Inserting Text :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 14 4.2 Changing the Location of Point::::::::::::::::::::::::::::::::::::::::::::::::::: 15 4.3 Erasing Text ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 17 4.4 Undoing Changes::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 18 4.5 Files ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 18 4.6 Help ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 18 4.7 Blank Lines :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 18 4.8 Continuation Lines ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 19 4.9 Cursor Position Information :::::::::::::::::::::::::::::::::::::::::::::::::::::: 19 4.10 Numeric Arguments ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 21 4.11 Repeating a Command :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 22 5 The Minibuffer ::::::::::::::::::::::::::::::::::::::::::::::: 23 5.1 Using the Minibuffer ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 23 5.2 Minibuffers for File Names ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 23 5.3 Editing in the Minibuffer ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 24 5.4 Completion :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 25 5.4.1 Completion Example :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 25 5.4.2 Completion Commands :::::::::::::::::::::::::::::::::::::::::::::::::::::: 25 5.4.3 Completion Exit::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 26 5.4.4 How Completion Alternatives Are Chosen:::::::::::::::::::::::::::::::::::: 27 5.4.5 Completion Options ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 28 iv 5.5 Minibuffer History:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 28 5.6 Repeating Minibuffer Commands ::::::::::::::::::::::::::::::::::::::::::::::::: 29 5.7 Entering passwords ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 30 5.8 Yes or No Prompts ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 30 6 Running Commands by Name :::::::::::::::::::::::::::::: 32 7 Help ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 33 7.1 Documentation for a Key ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 35 7.2 Help by Command or Variable Name ::::::::::::::::::::::::::::::::::::::::::::: 35 7.3 Apropos:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 36 7.4 Help Mode Commands ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 37 7.5 Keyword Search for Packages ::::::::::::::::::::::::::::::::::::::::::::::::::::: 37 7.6 Help for International Language Support ::::::::::::::::::::::::::::::::::::::::: 38 7.7 Other Help Commands ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 38 7.8 Help Files :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 39 7.9 Help on Active Text and Tooltips::::::::::::::::::::::::::::::::::::::::::::::::: 39 8 The Mark and the Region ::::::::::::::::::::::::::::::::::: 40 8.1 Setting the Mark ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 40 8.2 Commands to Mark Textual Objects :::::::::::::::::::::::::::::::::::::::::::::