ebook img

GNU Emacs Manual PDF

2012·2.4 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview GNU Emacs Manual

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 (cid:13)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-5-4 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 ....................... 11 3 Entering and Exiting Emacs ........................... 14 4 Basic Editing Commands.............................. 16 5 The Minibuffer ...................................... 26 6 Running Commands by Name.......................... 36 7 Help............................................... 37 8 The Mark and the Region ............................. 45 9 Killing and Moving Text .............................. 52 10 Registers ........................................... 64 11 Controlling the Display ............................... 69 12 Searching and Replacement............................ 90 13 Commands for Fixing Typos .......................... 109 14 Keyboard Macros ................................... 114 15 File Handling ...................................... 122 16 Using Multiple Buffers ............................... 147 17 Multiple Windows................................... 156 18 Frames and Graphical Displays ........................ 162 19 International Character Set Support.................... 177 20 Major and Minor Modes.............................. 199 21 Indentation ........................................ 205 22 Commands for Human Languages...................... 208 23 Editing Programs ................................... 240 24 Compiling and Testing Programs....................... 261 25 Maintaining Large Programs .......................... 281 26 Abbrevs........................................... 309 27 Dired, the Directory Editor ........................... 315 28 The Calendar and the Diary .......................... 331 29 Sending Mail....................................... 350 30 Reading Mail with Rmail............................. 359 31 Miscellaneous Commands............................. 379 32 Emacs Lisp Packages ................................ 408 ii 33 Customization...................................... 412 34 Dealing with Common Problems....................... 443 A GNU GENERAL PUBLIC LICENSE................... 459 B GNU Free Documentation License...................... 470 C Command Line Arguments for Emacs Invocation.......... 478 D X Options and Resources............................. 493 E Emacs 23 Antinews.................................. 500 F Emacs and Mac OS / GNUstep........................ 502 G Emacs and Microsoft Windows/MS-DOS ................ 505 The GNU Manifesto..................................... 515 Glossary .............................................. 523 Key (Character) Index................................... 546 Command and Function Index ............................ 555 Variable Index ......................................... 568 Concept Index ......................................... 575 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................................................. 8 1.4 The Menu Bar................................................. 9 2 Characters, Keys and Commands............ 11 2.1 Kinds of User Input........................................... 11 2.2 Keys.......................................................... 11 2.3 Keys and Commands.......................................... 12 3 Entering and Exiting Emacs.................. 14 3.1 Entering Emacs............................................... 14 3.2 Exiting Emacs................................................ 15 4 Basic Editing Commands..................... 16 4.1 Inserting Text................................................. 16 4.2 Changing the Location of Point............................... 17 4.3 Erasing Text.................................................. 19 4.4 Undoing Changes............................................. 20 4.5 Files.......................................................... 20 4.6 Help.......................................................... 21 4.7 Blank Lines................................................... 21 4.8 Continuation Lines............................................ 22 4.9 Cursor Position Information................................... 22 4.10 Numeric Arguments.......................................... 23 4.11 Repeating a Command....................................... 25 iv 5 The Minibuffer ................................ 26 5.1 Using the Minibuffer.......................................... 26 5.2 Minibuffers for File Names.................................... 26 5.3 Editing in the Minibuffer...................................... 27 5.4 Completion................................................... 28 5.4.1 Completion Example..................................... 28 5.4.2 Completion Commands................................... 29 5.4.3 Completion Exit ......................................... 30 5.4.4 How Completion Alternatives Are Chosen................ 31 5.4.5 Completion Options...................................... 32 5.5 Minibuffer History............................................ 32 5.6 Repeating Minibuffer Commands.............................. 34 5.7 Entering passwords ........................................... 34 5.8 Yes or No Prompts............................................ 35 6 Running Commands by Name ............... 36 7 Help ............................................ 37 7.1 Documentation for a Key ..................................... 39 7.2 Help by Command or Variable Name.......................... 39 7.3 Apropos...................................................... 40 7.4 Help Mode Commands........................................ 41 7.5 Keyword Search for Packages.................................. 42 7.6 Help for International Language Support...................... 42 7.7 Other Help Commands........................................ 43 7.8 Help Files..................................................... 43 7.9 Help on Active Text and Tooltips ............................. 44 8 The Mark and the Region .................... 45 8.1 Setting the Mark.............................................. 45 8.2 Commands to Mark Textual Objects.......................... 47 8.3 Operating on the Region...................................... 47 8.4 The Mark Ring............................................... 48 8.5 The Global Mark Ring........................................ 49 8.6 Shift Selection................................................ 49 8.7 Disabling Transient Mark Mode............................... 50 v 9 Killing and Moving Text...................... 52 9.1 Deletion and Killing........................................... 52 9.1.1 Deletion ................................................. 52 9.1.2 Killing by Lines.......................................... 53 9.1.3 Other Kill Commands.................................... 54 9.1.4 Options for Killing....................................... 54 9.2 Yanking ...................................................... 55 9.2.1 The Kill Ring............................................ 55 9.2.2 Yanking Earlier Kills..................................... 55 9.2.3 Appending Kills.......................................... 56 9.3 “Cut and Paste” Operations on Graphical Displays............ 57 9.3.1 Using the Clipboard...................................... 57 9.3.2 Cut and Paste with Other Window Applications.......... 58 9.3.3 Secondary Selection...................................... 58 9.4 Accumulating Text............................................ 59 9.5 Rectangles.................................................... 60 9.6 CUA Bindings................................................ 62 10 Registers...................................... 64 10.1 Saving Positions in Registers................................. 64 10.2 Saving Text in Registers..................................... 64 10.3 Saving Rectangles in Registers............................... 65 10.4 Saving Window Configurations in Registers................... 66 10.5 Keeping Numbers in Registers................................ 66 10.6 Keeping File Names in Registers............................. 66 10.7 Keyboard Macro Registers................................... 67 10.8 Bookmarks .................................................. 67 11 Controlling the Display...................... 69 11.1 Scrolling..................................................... 69 11.2 Recentering.................................................. 70 11.3 Automatic Scrolling.......................................... 71 11.4 Horizontal Scrolling.......................................... 72 11.5 Narrowing................................................... 73 11.6 View Mode.................................................. 73 11.7 Follow Mode................................................. 74 11.8 Text Faces................................................... 74 11.9 Colors for Faces.............................................. 75 11.10 Standard Faces............................................. 75 11.11 Text Scale.................................................. 78 11.12 Font Lock mode............................................ 78 11.13 Interactive Highlighting..................................... 80 11.14 Window Fringes ............................................ 81 11.15 Displaying Boundaries...................................... 82 11.16 Useless Whitespace......................................... 82 11.17 Selective Display............................................ 83 11.18 Optional Mode Line Features............................... 84 vi 11.19 How Text Is Displayed...................................... 85 11.20 Displaying the Cursor....................................... 86 11.21 Line Truncation ............................................ 87 11.22 Visual Line Mode........................................... 87 11.23 Customization of Display................................... 88 12 Searching and Replacement ................. 90 12.1 Incremental Search........................................... 90 12.1.1 Basics of Incremental Search............................ 90 12.1.2 Repeating Incremental Search........................... 91 12.1.3 Errors in Incremental Search............................ 91 12.1.4 Special Input for Incremental Search .................... 92 12.1.5 Isearch Yanking......................................... 93 12.1.6 Not Exiting Incremental Search......................... 93 12.1.7 Searching the Minibuffer................................ 94 12.2 Nonincremental Search....................................... 95 12.3 Word Search................................................. 95 12.4 Symbol Search............................................... 96 12.5 Regular Expression Search................................... 96 12.6 Syntax of Regular Expressions ............................... 97 12.7 Backslash in Regular Expressions ........................... 100 12.8 Regular Expression Example................................ 102 12.9 Searching and Case......................................... 102 12.10 Replacement Commands................................... 103 12.10.1 Unconditional Replacement........................... 103 12.10.2 Regexp Replacement.................................. 103 12.10.3 Replace Commands and Case......................... 104 12.10.4 Query Replace........................................ 105 12.11 Other Search-and-Loop Commands ........................ 107 13 Commands for Fixing Typos............... 109 13.1 Undo....................................................... 109 13.2 Transposing Text........................................... 110 13.3 Case Conversion............................................ 111 13.4 Checking and Correcting Spelling........................... 111 14 Keyboard Macros........................... 114 14.1 Basic Use................................................... 114 14.2 The Keyboard Macro Ring.................................. 115 14.3 The Keyboard Macro Counter .............................. 116 14.4 Executing Macros with Variations........................... 118 14.5 Naming and Saving Keyboard Macros....................... 118 14.6 Editing a Keyboard Macro.................................. 119 14.7 Stepwise Editing a Keyboard Macro......................... 120

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.