IT training GNU emacs manual

642 21 0
  • Loading ...
1/642 trang
Tải xuống

Thông tin tài liệu

Ngày đăng: 05/11/2019, 15:51

GNU Emacs Manual GNU Emacs Manual Fourteenth Edition, Updated for Emacs Version 21.3 Richard Stallman Copyright c 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc Fourteenth Edition Updated for Emacs Version 21.3, March 2002 ISBN 1-882114-06-X Published by the Free Software Foundation 59 Temple Place, Suite 330 Boston, MA 02111-1307 USA Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 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 freedom to copy and modify this GNU Manual, like GNU software Copies published by the Free Software Foundation raise funds for GNU development.” Cover art by Etienne Suvasa Preface Preface This manual documents the use and simple customization of the Emacs editor The reader is not expected to be a programmer; simple customizations not require programming skill But the user who is not interested in customizing can ignore the scattered customization hints This is primarily a reference manual, but can also be used as a primer For complete beginners, it is a good idea to start with the on-line, learn-by-doing tutorial, before reading the manual To run the tutorial, start Emacs and type C-h t This way you can learn Emacs by using Emacs on a specially designed file which describes commands, tells you when to try them, and then explains the results you see On first reading, just skim chapters and 2, which describe the notational conventions of the manual and the general appearance of the Emacs display screen Note which questions are answered in these chapters, so you can refer back later After reading chapter 4, you should practice the commands there The next few chapters describe fundamental techniques and concepts that are used constantly You need to understand them thoroughly, experimenting with them if necessary Chapters 14 through 19 describe intermediate-level features that are useful for all kinds of editing Chapter 20 and following chapters describe features that you may or may not want to use; read those chapters when you need them Read the Trouble chapter if Emacs does not seem to be working properly It explains how to cope with some common problems (see Section 33.9 [Lossage], page 482), as well as when and how to report Emacs bugs (see Section 33.10 [Bugs], page 487) To find the documentation on a particular command, look in the index Keys (character commands) and command names have separate indexes There is also a glossary, with a cross reference for each term This manual is available as a printed book and also as an Info file The Info file is for on-line perusal with the Info program, which will be the principal way of viewing documentation on-line in the GNU system Both the Info file and the Info program itself are distributed along with GNU Emacs The Info file and the printed book contain substantially the same text and are generated from the same source files, which are also distributed along with GNU Emacs GNU Emacs is a member of the Emacs editor family There are many Emacs editors, all sharing common principles of organization For information on the underlying philosophy of Emacs and the lessons learned from its development, write for a copy of AI memo 519a, “Emacs, the Extensible, Customizable Self-Documenting Display Editor,” to Publications Department, Artificial Intelligence Lab, 545 Tech Square, Cambridge, MA 02139, USA At last report they charge $2.25 per copy Another useful publication is LCS TM-165, “A Cookbook for an Emacs,” by Craig Finseth, available GNU Emacs Manual from Publications Department, Laboratory for Computer Science, 545 Tech Square, Cambridge, MA 02139, USA The price today is $3 This edition of the manual is intended for use with GNU Emacs installed on GNU and Unix systems GNU Emacs can also be used on VMS, MSDOS (also called MS-DOG), Windows NT, and Windows 95 systems Those systems use different file name syntax; in addition, VMS and MS-DOS not support all GNU Emacs features We don’t try to describe VMS usage in this manual See Appendix E [MS-DOS], page 531, for information about using Emacs on MS-DOS Distribution Distribution GNU Emacs is free software; this means that everyone is free to use it and free to redistribute it on certain conditions GNU Emacs is not in the public domain; it is copyrighted and there are restrictions on its distribution, but these restrictions are designed to permit everything that a good cooperating citizen would want to What is not allowed is to try to prevent others from further sharing any version of GNU Emacs that they might get from you The precise conditions are found in the GNU General Public License that comes with Emacs and also appears following this section One way to get a copy of GNU Emacs is from someone else who has it You need not ask for our permission to so, or tell any one else; just copy it If you have access to the Internet, you can get the latest distribution version of GNU Emacs by anonymous FTP; see the file ‘etc/FTP’ in the Emacs distribution for more information You may also receive GNU Emacs when you buy a computer Computer manufacturers are free to distribute copies on the same terms that apply to everyone else These terms require them to give you the full sources, including whatever changes they may have made, and to permit you to redistribute the GNU Emacs received from them under the usual terms of the General Public License In other words, the program must be free for you when you get it, not just free for the manufacturer You can also order copies of GNU Emacs from the Free Software Foundation on CD-ROM This is a convenient and reliable way to get a copy; it is also a good way to help fund our work (The Foundation has always received most of its funds in this way.) An order form is included in the file ‘etc/ORDERS’ in the Emacs distribution, and on our web site in http://www.gnu.org/order/order.html For further information, write to Free Software Foundation 59 Temple Place, Suite 330 Boston, MA 02111-1307 USA USA The income from distribution fees goes to support the foundation’s purpose: the development of new free software, and improvements to our existing programs including GNU Emacs If you find GNU Emacs useful, please send a donation to the Free Software Foundation to support our work Donations to the Free Software Foundation are tax deductible in the US If you use GNU Emacs at your workplace, please suggest that the company make a donation If company policy is unsympathetic to the idea of donating to charity, you might instead suggest ordering a CD-ROM from the Foundation occasionally, or subscribing to periodic updates Contributors to GNU Emacs include Per Abrahamsen, Jay K Adams, Joe Arceneaux, Boaz Ben-Zvi, Jim Blandy, Terrence Brannon, Frank Bresz, GNU Emacs Manual Peter Breton, Kevin Broadey, Vincent Broman, David M Brown, Bill Carpenter, Hans Chalupsky, Bob Chassell, James Clark, Mike Clarkson, Glynn Clements, Andrew Csillag, Doug Cutting, Michael DeCorte, Gary Delp, Matthieu Devin, Eri Ding, Carsten Dominik, Scott Draves, Viktor Dukhovni, John Eaton, Rolf Ebert, Stephen Eglen, Torbjăorn Einarsson, Tsugumoto Enami, Hans Henrik Eriksen, Michael Ernst, Ata Etemadi, Frederick Farnback, Fred Fish, Karl Fogel, Gary Foster, Noah Friedman, Keith Gabryelski, Kevin Gallagher, Kevin Gallo, Howard Gayle, Stephen Gildea, David Gillespie, Bob Glickstein, Boris Goldowsky, Michelangelo Grigni, Michael Gschwind, Henry Guillaume, Doug Gwyn, Ken’ichi Handa, Chris Hanson, K Shane Hartman, John Heidemann, Markus Heritsch, Karl Heuer, Manabu Higashida, Anders Holst, Kurt Hornik, Tom Houlder, Lars Ingebrigtsen, Andrew Innes, Michael K Johnson, Kyle Jones, Tomoji Kagatani, Brewster Kahle, David Kaufman, Henry Kautz, Howard Kaye, Michael Kifer, Richard King, Larry K Kolodney, Robert Krawitz, Sebastian Kremer, Geoff Kuenning, David K˚ agedal, Daniel LaLiberte, Aaron Larson, James R Larus, Frederic Lepied, Lars Lindberg, Eric Ludlam, Neil M Mager, Ken Manheimer, Bill Mann, Brian Marick, Simon Marshall, Bengt Martensson, Charlie Martin, Thomas May, Roland McGrath, David Megginson, Wayne Mesard, Richard Mlynarik, Keith Moore, Erik Naggum, Thomas Neumann, Mike Newton, Jurgen Nickelsen, Jeff Norden, Andrew Norman, Jeff Peck, Damon Anton Permezel, Tom Perrine, Jens Petersen, Daniel Pfeiffer, Fred Pierresteguy, Christian Plaunt, Francesco A Potorti, Michael D Prange, Ashwin Ram, Eric S Raymond, Paul Reilly, Edward M Reingold, Rob Riepel, Roland B Roberts, John Robinson, Danny Roozendaal, William Rosenblatt, Guillermo J Rozas, Ivar Rummelhoff, Wolfgang Rupprecht, James B Salem, Masahiko Sato, William Schelter, Ralph Schleicher, Gregor Schmid, Michael Schmidt, Ronald S Schnell, Philippe Schnoebelen, Stephen Schoef, Randal Schwartz, Manuel Serrano, Stanislav Shalunov, Mark Shapiro, Richard Sharman, Olin Shivers, Espen Skoglund, Rick Sladkey, Lynn Slater, Chris Smith, David Smith, Paul D Smith, William Sommerfeld, Michael Staats, Sam Steingold, Ake Stenhoff, Peter Stephenson, Jonathan Stigelman, Steve Strassman, Jens T Berger Thielemann, Spencer Thomas, Jim Thompson, Masanobu Umeda, Neil W Van Dyke, Ulrik Vieth, Geoffrey Voelker, Johan Vromans, Barry Warsaw, Morten Welinder, Joseph Brian Wells, Rodney Whitby, Ed Wilkinson, Mike Williams, Steven A Wood, Dale R Worley, Felix S T Wu, Tom Wurgler, Eli Zaretskii, Jamie Zawinski, Ian T Zimmermann, Reto Zimmermann, and Neal Ziring GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright c 1989, 1991 Free Software Foundation, Inc 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed Preamble The licenses for most software are designed to take away your freedom to share and change it By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software—to make sure the software is free for all its users This General Public License applies to most of the Free Software Foundation’s software and to any other program whose authors commit to using it (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too When we speak of free software, we are referring to freedom, not price Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can these things To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have You must make sure that they, too, receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software Also, for each author’s protection and ours, we want to make certain that everyone understands that there is no warranty for this free software If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors’ reputations Finally, any free program is threatened constantly by software patents We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary GNU Emacs Manual To prevent this, we have made it clear that any patent must be licensed for everyone’s free use or not licensed at all The precise terms and conditions for copying, distribution and modification follow TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License The “Program,” below, refers to any such program or work, and a “work based on the Program” means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language (Hereinafter, translation is included without limitation in the term “modification.”) Each licensee is addressed as “you.” Activities other than copying, distribution and modification are not covered by this License; they are outside its scope The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program) Whether that is true depends on what the Program does You may copy and distribute verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section above, provided that you also meet all of these conditions: a You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change b You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License c If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an an- iv GNU Emacs Manual Basic Editing Commands 39 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 Inserting Text Changing the Location of Point Erasing Text Undoing Changes Files Help Blank Lines Continuation Lines Cursor Position Information Numeric Arguments Repeating a Command 39 40 42 43 44 45 45 46 46 48 50 The Minibuffer 51 5.1 Minibuffers for File Names 5.2 Editing in the Minibuffer 5.3 Completion 5.3.1 Completion Example 5.3.2 Completion Commands 5.3.3 Strict Completion 5.3.4 Completion Options 5.4 Minibuffer History 5.5 Repeating Minibuffer Commands 51 52 53 53 54 55 55 56 58 Running Commands by Name 59 Help 61 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 Documentation for a Key Help by Command or Variable Name Apropos Keyword Search for Lisp Libraries Help for International Language Support Help Mode Commands Other Help Commands Help on Active Text and Tooltips 63 64 65 66 67 67 68 69 The Mark and the Region 71 8.1 8.2 8.3 8.4 8.5 8.6 Setting the Mark Transient Mark Mode Operating on the Region Commands to Mark Textual Objects The Mark Ring The Global Mark Ring 71 72 74 74 75 76 v Killing and Moving Text 77 9.7 Deletion and Killing 9.7.1 Deletion 9.7.2 Killing by Lines 9.7.3 Other Kill Commands 9.8 Yanking 9.8.1 The Kill Ring 9.8.2 Appending Kills 9.8.3 Yanking Earlier Kills 9.9 Accumulating Text 9.10 Rectangles 10 Registers 87 10.1 10.2 10.3 10.4 10.5 10.6 10.7 11 77 78 79 79 80 81 81 82 83 84 Saving Positions in Registers Saving Text in Registers Saving Rectangles in Registers Saving Window Configurations in Registers Keeping Numbers in Registers Keeping File Names in Registers Bookmarks 87 87 88 88 89 89 90 Controlling the Display 93 11.1 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.10 11.11 11.12 11.13 Using Multiple Typefaces 93 Font Lock mode 95 Highlight Changes Mode 97 Interactive Highlighting by Matching 97 Trailing Whitespace 98 Scrolling 99 Horizontal Scrolling 101 Follow Mode 102 Selective Display 102 Optional Mode Line Features 103 How Text Is Displayed 104 Customization of Display 104 Displaying the Cursor 106 vi 12 GNU Emacs Manual Searching and Replacement 107 12.1 12.2 12.3 12.4 12.5 12.6 12.7 12.8 13 Incremental Search 12.1.1 Slow Terminal Incremental Search Nonincremental Search Word Search Regular Expression Search Syntax of Regular Expressions Searching and Case Replacement Commands 12.7.1 Unconditional Replacement 12.7.2 Regexp Replacement 12.7.3 Replace Commands and Case 12.7.4 Query Replace Other Search-and-Loop Commands Commands for Fixing Typos 123 13.1 Killing Your Mistakes 13.2 Transposing Text 13.3 Case Conversion 13.4 Checking and Correcting Spelling 14 107 110 110 111 111 112 118 118 119 119 119 120 122 123 123 124 124 File Handling 129 14.1 File Names 14.2 Visiting Files 14.3 Saving Files 14.3.1 Backup Files 14.3.1.1 Single or Numbered Backups 14.3.1.2 Automatic Deletion of Backups 14.3.1.3 Copying vs.Renaming 14.3.2 Protection against Simultaneous Editing 14.3.3 Shadowing Files 14.3.4 Updating Time Stamps Automatically 14.4 Reverting a Buffer 14.5 Auto-Saving: Protection Against Disasters 14.5.1 Auto-Save Files 14.5.2 Controlling Auto-Saving 14.5.3 Recovering Data from Auto-Saves 14.6 File Name Aliases 14.7 Version Control 14.7.1 Introduction to Version Control 14.7.1.1 Supported Version Control Systems 14.7.1.2 Concepts of Version Control 14.7.2 Version Control and the Mode Line 14.7.3 Basic Editing under Version Control 14.7.3.1 Basic Version Control with Locking 129 130 134 136 136 137 138 139 140 141 141 142 142 143 144 145 145 145 146 146 147 147 148 vii 14.8 14.9 14.10 14.11 14.12 14.13 14.14 14.15 14.16 14.7.3.2 Basic Version Control without Locking 148 14.7.3.3 Advanced Control in C-x C-q 149 14.7.3.4 Features of the Log Entry Buffer 149 14.7.4 Examining And Comparing Old Versions 150 14.7.5 The Secondary Commands of VC 151 14.7.5.1 Registering a File for Version Control 151 14.7.5.2 VC Status Commands 152 14.7.5.3 Undoing Version Control Actions 152 14.7.5.4 Dired under VC 153 14.7.5.5 VC Dired Commands 154 14.7.6 Multiple Branches of a File 154 14.7.6.1 Switching between Branches 155 14.7.6.2 Creating New Branches 155 14.7.6.3 Merging Branches 156 14.7.6.4 Multi-User Branching 157 14.7.7 Remote Repositories 157 14.7.7.1 Version Backups 158 14.7.7.2 Local Version Control 158 14.7.8 Snapshots 160 14.7.8.1 Making and Using Snapshots 160 14.7.8.2 Snapshot Caveats 161 14.7.9 Miscellaneous Commands and Features of VC 161 14.7.9.1 Change Logs and VC 162 14.7.9.2 Renaming VC Work Files and Master Files 163 14.7.9.3 Inserting Version Control Headers 163 14.7.10 Customizing VC 165 14.7.10.1 General Options 165 14.7.10.2 Options for RCS and SCCS 166 14.7.10.3 Options specific for CVS 166 File Directories 167 Comparing Files 168 Miscellaneous File Operations 169 Accessing Compressed Files 170 File Archives 171 Remote Files 172 Quoted File Names 172 File Name Cache 173 Convenience Features for Finding Files 174 viii GNU Emacs Manual 15 Using Multiple Buffers 175 15.1 15.2 15.3 15.4 15.5 15.6 15.7 16 Multiple Windows 185 16.1 16.2 16.3 16.4 16.5 16.6 16.7 17 Creating and Selecting Buffers 175 Listing Existing Buffers 176 Miscellaneous Buffer Operations 177 Killing Buffers 178 Operating on Several Buffers 179 Indirect Buffers 181 Convenience Features and Customization of Buffer Handling 182 15.7.1 Making Buffer Names Unique 182 15.7.2 Switching Between Buffers using Substrings 183 15.7.3 Customizing Buffer Menus 183 Concepts of Emacs Windows 185 Splitting Windows 186 Using Other Windows 186 Displaying in Another Window 187 Forcing Display in the Same Window 188 Deleting and Rearranging Windows 189 Window Handling Convenience Features and Customization 190 Frames and X Windows 193 17.1 17.2 17.3 17.4 17.5 17.6 17.7 17.8 17.9 17.10 17.11 17.12 17.13 17.14 17.15 17.16 17.17 17.18 17.19 17.20 17.21 Mouse Commands for Editing Secondary Selection Using the Clipboard Following References with the Mouse Mouse Clicks for Menus Mode Line Mouse Commands Creating Frames Frame Commands Making and Using a Speedbar Frame Multiple Displays Special Buffer Frames Setting Frame Parameters Scroll Bars Scrolling With “Wheeled” Mice Menu Bars Tool Bars Using Dialog Boxes Tooltips (or “Balloon Help”) Mouse Avoidance Non-Window Terminals Using a Mouse in Terminal Emulators 193 195 196 196 197 197 198 199 200 200 201 201 203 204 204 204 205 205 205 206 206 ix 18 International Character Set Support 207 18.1 18.2 18.3 18.4 18.5 18.6 18.7 18.8 18.9 18.10 18.11 18.12 18.13 19 207 208 209 211 213 214 215 217 220 222 223 225 225 Major Modes 229 19.1 20 Introduction to International Character Sets Enabling Multibyte Characters Language Environments Input Methods Selecting an Input Method Unibyte and Multibyte Non-ASCII characters Coding Systems Recognizing Coding Systems Specifying a Coding System Fontsets Defining fontsets Undisplayable Characters Single-byte Character Set Support How Major Modes are Chosen 229 Indentation 233 20.1 Indentation Commands and Techniques 233 20.2 Tab Stops 235 20.3 Tabs vs Spaces 235 21 Commands for Human Languages 237 21.1 21.2 21.3 21.4 21.5 Words Sentences Paragraphs Pages Filling Text 21.5.1 Auto Fill Mode 21.5.2 Refill Mode 21.5.3 Explicit Fill Commands 21.5.4 The Fill Prefix 21.5.5 Adaptive Filling 21.6 Case Conversion Commands 21.7 Text Mode 21.8 Outline Mode 21.8.1 Format of Outlines 21.8.2 Outline Motion Commands 21.8.3 Outline Visibility Commands 21.8.4 Viewing One Outline in Multiple Views 21.8.5 Folding Editing 21.9 TEX Mode 21.9.1 TEX Editing Commands 237 238 239 240 241 242 243 243 244 246 246 247 248 249 250 250 252 252 254 254 x GNU Emacs Manual 21.9.2 LaTEX Editing Commands 21.9.3 TEX Printing Commands 21.9.4 TEX Mode Miscellany 21.10 Nroff Mode 21.11 Editing Formatted Text 21.11.1 Requesting to Edit Formatted Text 21.11.2 Hard and Soft Newlines 21.11.3 Editing Format Information 21.11.4 Faces in Formatted Text 21.11.5 Colors in Formatted Text 21.11.6 Indentation in Formatted Text 21.11.7 Justification in Formatted Text 21.11.8 Setting Other Text Properties 21.11.9 Forcing Enriched Mode 22 255 256 258 259 259 260 260 261 262 263 263 264 265 266 Editing Programs 267 22.1 Major Modes for Programming Languages 22.2 Top-Level Definitions, or Defuns 22.2.1 Left Margin Convention 22.2.2 Moving by Defuns 22.2.3 Imenu 22.2.4 Which Function Mode 22.3 Indentation for Programs 22.3.1 Basic Program Indentation Commands 22.3.2 Indenting Several Lines 22.3.3 Customizing Lisp Indentation 22.3.4 Commands for C Indentation 22.3.5 Customizing C Indentation 22.4 Commands for Editing with Parentheses 22.4.1 Expressions with Balanced Parentheses 22.4.2 Moving in the Parenthesis Structure 22.4.3 Automatic Display Of Matching Parentheses 22.5 Manipulating Comments 22.5.1 Comment Commands 22.5.2 Multiple Lines of Comments 22.5.3 Options Controlling Comments 22.6 Documentation Lookup 22.6.1 Info Documentation Lookup 22.6.2 Man Page Lookup 22.6.3 Emacs Lisp Documentation Lookup 22.7 Hideshow minor mode 22.8 Completion for Symbol Names 22.9 Glasses minor mode 22.10 Other Features Useful for Editing Programs 22.11 C and Related Modes 22.11.1 C Mode Motion Commands 267 268 268 269 270 270 270 271 272 272 274 274 275 275 277 278 278 278 280 280 282 282 282 284 284 285 286 286 287 287 xi 22.11.2 Electric C Characters 22.11.3 Hungry Delete Feature in C 22.11.4 Other Commands for C Mode 22.11.5 Comments in C Modes 22.12 Fortran Mode 22.12.1 Motion Commands 22.12.2 Fortran Indentation 22.12.2.1 Fortran Indentation and Filling Commands 22.12.2.2 Continuation Lines 22.12.2.3 Line Numbers 22.12.2.4 Syntactic Conventions 22.12.2.5 Variables for Fortran Indentation 22.12.3 Fortran Comments 22.12.4 Fortran Auto Fill Mode 22.12.5 Checking Columns in Fortran 22.12.6 Fortran Keyword Abbrevs 22.13 Asm Mode 23 288 290 290 292 292 293 293 293 293 294 295 295 296 297 298 299 299 Compiling and Testing Programs 301 23.1 23.2 23.3 23.4 23.5 23.6 23.7 23.8 23.9 23.10 Running Compilations under Emacs Searching with Grep under Emacs Compilation Mode Subshells for Compilation Running Debuggers Under Emacs 23.5.1 Starting GUD 23.5.2 Debugger Operation 23.5.3 Commands of GUD 23.5.4 GUD Customization 23.5.5 GUD Tooltips Executing Lisp Expressions Libraries of Lisp Code for Emacs Evaluating Emacs-Lisp Expressions Lisp Interaction Buffers Running an External Lisp 301 302 302 304 304 304 305 306 307 308 308 309 310 312 312 xii 24 GNU Emacs Manual Maintaining Programs 315 24.1 Change Logs 24.2 Tags Tables 24.2.1 Source File Tag Syntax 24.2.2 Creating Tags Tables 24.2.3 Etags Regexps 24.2.4 Selecting a Tags Table 24.2.5 Finding a Tag 24.2.6 Searching and Replacing with Tags Tables 24.2.7 Tags Table Inquiries 24.3 Merging Files with Emerge 24.3.1 Overview of Emerge 24.3.2 Submodes of Emerge 24.3.3 State of a Difference 24.3.4 Merge Commands 24.3.5 Exiting Emerge 24.3.6 Combining the Two Versions 24.3.7 Fine Points of Emerge 25 Abbrevs 333 25.1 25.2 25.3 25.4 25.5 25.6 25.7 26 Abbrev Concepts Defining Abbrevs Controlling Abbrev Expansion Examining and Editing Abbrevs Saving Abbrevs Dynamic Abbrev Expansion Customizing Dynamic Abbreviation 333 333 334 336 336 337 338 Editing Pictures 341 26.1 Basic Editing in Picture Mode 26.2 Controlling Motion after Insert 26.3 Picture Mode Tabs 26.4 Picture Mode Rectangle Commands 27 315 316 317 319 320 322 322 324 325 325 326 327 328 329 330 330 331 341 342 343 343 Sending Mail 345 27.1 The Format of the Mail Buffer 27.2 Mail Header Fields 27.3 Mail Aliases 27.4 Mail Mode 27.4.1 Mail Sending 27.4.2 Mail Header Editing 27.4.3 Citing Mail 27.4.4 Mail Mode Miscellany 27.5 Mail Amusements 27.6 Mail-Composition Methods 345 346 348 349 350 350 351 352 353 354 xiii 28 Reading Mail with Rmail 355 28.1 28.2 28.3 28.4 28.5 28.6 28.7 28.8 28.9 28.10 28.11 28.12 28.13 28.14 28.15 28.16 28.17 28.18 28.19 29 Basic Concepts of Rmail Scrolling Within a Message Moving Among Messages Deleting Messages Rmail Files and Inboxes Multiple Rmail Files Copying Messages Out to Files Labels Rmail Attributes Sending Replies Summaries 28.11.1 Making Summaries 28.11.2 Editing in Summaries Sorting the Rmail File Display of Messages Rmail and Coding Systems Editing Within a Message Digest Messages Converting an Rmail File to Inbox Format Reading Rot13 Messages movemail and POP 355 355 356 357 358 359 360 362 363 363 365 366 367 368 369 369 370 371 371 372 372 Dired, the Directory Editor 375 29.1 29.2 29.3 29.4 29.5 29.6 29.7 29.8 29.9 29.10 29.11 29.12 29.13 29.14 29.15 Entering Dired Navigation in the Dired Buffer Deleting Files with Dired Flagging Many Files at Once Visiting Files in Dired Dired Marks vs Flags Operating on Files Shell Commands in Dired Transforming File Names in Dired File Comparison with Dired Subdirectories in Dired Moving Over Subdirectories Hiding Subdirectories Updating the Dired Buffer Dired and find 375 375 375 376 377 378 380 382 383 384 385 385 386 386 387 xiv GNU Emacs Manual 30 The Calendar and the Diary 389 30.1 30.2 30.3 30.4 30.5 30.6 30.7 30.8 30.9 30.10 30.11 30.12 30.13 31 Movement in the Calendar 30.1.1 Motion by Standard Lengths of Time 30.1.2 Beginning or End of Week, Month or Year 30.1.3 Specified Dates Scrolling in the Calendar Counting Days Miscellaneous Calendar Commands LaTeX Calendar Holidays Times of Sunrise and Sunset Phases of the Moon Conversion To and From Other Calendars 30.9.1 Supported Calendar Systems 30.9.2 Converting To Other Calendars 30.9.3 Converting From Other Calendars 30.9.4 Converting from the Mayan Calendar The Diary 30.10.1 Commands Displaying Diary Entries 30.10.2 The Diary File 30.10.3 Date Formats 30.10.4 Commands to Add to the Diary 30.10.5 Special Diary Entries Appointments Daylight Savings Time Summing Time Intervals 389 389 390 390 391 391 392 392 393 394 396 396 396 398 399 399 401 401 403 404 404 405 407 408 409 Miscellaneous Commands 411 31.14 31.15 Gnus 31.14.1 Gnus Buffers 31.14.2 When Gnus Starts Up 31.14.3 Summary of Gnus Commands Running Shell Commands from Emacs 31.15.1 Single Shell Commands 31.15.2 Interactive Inferior Shell 31.15.3 Shell Mode 31.15.4 Shell Command History 31.15.4.1 Shell History Ring 31.15.4.2 Shell History Copying 31.15.4.3 Shell History References 31.15.5 Directory Tracking 31.15.6 Shell Mode Options 31.15.7 Emacs Terminal Emulator 31.15.8 Term Mode 31.15.9 Page-At-A-Time Output 411 411 411 412 413 414 415 416 419 419 420 420 421 421 422 423 423 xv 31.15.10 Remote Host Shell Using Emacs as a Server Invoking emacsclient Hardcopy Output PostScript Hardcopy Variables for PostScript Hardcopy Sorting Text Narrowing Two-Column Editing Editing Binary Files Saving Emacs Sessions Recursive Editing Levels Emulation Hyperlinking and Navigation Features 31.28.1 Following URLs 31.28.2 Activating URLs 31.28.3 Finding Files and URLs at Point 31.28.4 Finding Function and Variable Definitions 31.29 Dissociated Press 31.30 Other Amusements 31.16 31.17 31.18 31.19 31.20 31.21 31.22 31.23 31.24 31.25 31.26 31.27 31.28 32 424 424 425 426 427 428 429 431 432 433 434 434 436 437 438 438 439 439 440 441 Customization 443 32.1 Minor Modes 32.2 Variables 32.2.1 Examining and Setting Variables 32.2.2 Easy Customization Interface 32.2.2.1 Customization Groups 32.2.2.2 Changing an Option 32.2.2.3 Customizing Faces 32.2.2.4 Customizing Specific Items 32.2.3 Hooks 32.2.4 Local Variables 32.2.5 Local Variables in Files 32.3 Keyboard Macros 32.3.1 Basic Use 32.3.2 Naming and Saving Keyboard Macros 32.3.3 Executing Macros with Variations 32.4 Customizing Key Bindings 32.4.1 Keymaps 32.4.2 Prefix Keymaps 32.4.3 Local Keymaps 32.4.4 Minibuffer Keymaps 32.4.5 Changing Key Bindings Interactively 32.4.6 Rebinding Keys in Your Init File 32.4.7 Rebinding Function Keys 32.4.8 Named ASCII Control Characters 443 445 446 446 447 448 451 452 453 454 456 458 459 460 461 461 462 463 464 465 465 466 468 469 xvi GNU Emacs Manual 32.4.9 Non-ASCII Characters on the Keyboard 32.4.10 Rebinding Mouse Buttons 32.4.11 Disabling Commands 32.5 Keyboard Translations 32.6 The Syntax Table 32.7 The Init File, ‘~/.emacs’ 32.7.1 Init File Syntax 32.7.2 Init File Examples 32.7.3 Terminal-specific Initialization 32.7.4 How Emacs Finds Your Init File 33 469 470 472 473 473 474 474 476 478 478 Dealing with Common Problems 481 33.8 Quitting and Aborting 33.9 Dealing with Emacs Trouble 33.9.1 If DEL Fails to Delete 33.9.2 Recursive Editing Levels 33.9.3 Garbage on the Screen 33.9.4 Garbage in the Text 33.9.5 Spontaneous Entry to Incremental Search 33.9.6 Running out of Memory 33.9.7 Recovery After a Crash 33.9.8 Emergency Escape 33.9.9 Help for Total Frustration 33.10 Reporting Bugs 33.10.1 When Is There a Bug 33.10.2 Understanding Bug Reporting 33.10.3 Checklist for Bug Reports 33.10.4 Sending Patches for GNU Emacs 33.11 Contributing to Emacs Development 33.12 How To Get Help with GNU Emacs Appendix B B.1 B.2 B.3 B.4 B.5 B.6 B.7 B.8 B.9 B.10 B.11 481 482 482 484 484 484 484 485 485 486 487 487 487 488 489 495 497 497 Command Line Arguments 499 Action Arguments Initial Options Command Argument Example Resuming Emacs with Arguments Environment Variables B.5.1 General Variables B.5.2 Miscellaneous Variables Specifying the Display Name Font Specification Options Window Color Options Options for Window Geometry Internal and External Borders Frame Titles 499 500 502 502 503 503 506 507 508 509 510 511 512 xvii B.12 Icons B.13 X Resources B.14 Lucid Menu X Resources B.15 LessTif Menu X Resources 512 513 517 518 Appendix C Emacs 20 Antinews 521 Appendix D Emacs and the Mac OS 527 D.1 D.2 D.3 D.4 D.5 D.6 Keyboard Input on the Mac International Character Set Support on the Mac Environment Variables and Command Line Arguments Volumes and Directories on the Mac Specifying Fonts on the Mac Mac-Specific Lisp Functions Appendix E 527 527 528 529 529 530 Emacs and MS-DOS 531 E.1 E.2 E.3 E.4 E.5 E.6 E.7 E.8 Keyboard and Mouse on MS-DOS Display on MS-DOS File Names on MS-DOS Text Files and Binary Files Printing and MS-DOS International Support on MS-DOS Subprocesses on MS-DOS Subprocesses on Windows 9X/ME and Windows NT/2K E.9 Using the System Menu on Windows 531 532 534 535 537 539 542 543 544 The GNU Manifesto 545 What’s GNU? Gnu’s Not Unix! Why I Must Write GNU Why GNU Will Be Compatible with Unix How GNU Will Be Available Why Many Other Programmers Want to Help How You Can Contribute Why All Computer Users Will Benefit Some Easily Rebutted Objections to GNU’s Goals 545 546 546 546 546 547 548 548 Glossary 555 Key (Character) Index 579 Command and Function Index 589 xviii GNU Emacs Manual Variable Index 601 Concept Index 607 ... along with GNU Emacs GNU Emacs is a member of the Emacs editor family There are many Emacs editors, all sharing common principles of organization For information on the underlying philosophy of Emacs. .. Distribution Distribution GNU Emacs is free software; this means that everyone is free to use it and free to redistribute it on certain conditions GNU Emacs is not in the public domain; it is copyrighted... license, such as the GNU General Public License, to permit their use in free software 20 GNU Emacs Manual Introduction 21 Introduction You are reading about GNU Emacs, the GNU incarnation of the
- Xem thêm -

Xem thêm: IT training GNU emacs manual , IT training GNU emacs manual

Mục lục

Xem thêm

Gợi ý tài liệu liên quan cho bạn