3 @setfilename ../../info/emacs
4 @settitle GNU Emacs Manual
6 @c The edition number appears in several places in this file
11 This is the @value{EDITION} edition of the @cite{GNU Emacs Manual},@*
12 updated for Emacs version @value{EMACSVER}.
14 Copyright @copyright{} 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997,
15 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
16 Free Software Foundation, Inc.
19 Permission is granted to copy, distribute and/or modify this document
20 under the terms of the GNU Free Documentation License, Version 1.3 or
21 any later version published by the Free Software Foundation; with the
22 Invariant Sections being ``The GNU Manifesto,'' ``Distribution'' and
23 ``GNU GENERAL PUBLIC LICENSE,'' with the Front-Cover texts being ``A GNU
24 Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the
25 license is included in the section entitled ``GNU Free Documentation
28 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
29 modify this GNU manual. Buying copies from the FSF supports it in
30 developing GNU and promoting software freedom.''
36 * Emacs: (emacs). The extensible self-documenting text editor.
39 @c in general, keep the following line commented out, unless doing a
40 @c copy of this manual that will be published. The manual should go
41 @c onto the distribution in the full, 8.5 x 11" size.
48 @c per rms and peterb, use 10pt fonts for the main text, mostly to
49 @c save on paper cost.
50 @c Do this inside @tex for now, so current makeinfo does not complain.
55 \global\let\urlcolor=\Black % don't print links in grayscale
56 \global\let\linkcolor=\Black
58 \global\hbadness=6666 % don't worry about not-too-underfull boxes
67 @shorttitlepage GNU Emacs Manual
72 @center @titlefont{GNU Emacs Manual}
74 @center @value{EDITION} Edition, Updated for Emacs Version @value{EMACSVER}.
76 @center Richard Stallman
78 @vskip 0pt plus 1filll
82 Published by the Free Software Foundation @*
83 51 Franklin Street, Fifth Floor @*
84 Boston, MA 02110-1301 USA @*
88 Cover art by Etienne Suvasa.
98 @node Top, Distrib, (dir), (dir)
101 Emacs is the extensible, customizable, self-documenting real-time
102 display editor. This Info file describes how to edit with Emacs and
103 some of how to customize it; it corresponds to GNU Emacs version
107 To learn more about the Info documentation system, type @kbd{h},
108 to visit a programmed instruction sequence for the Info commands.
111 For information on extending Emacs, see @ref{Top, Emacs Lisp,, elisp, The
112 Emacs Lisp Reference Manual}.
118 These subcategories have been deleted for simplicity
119 and to avoid conflicts.
122 Auto-Saving: Protection Against Disasters
128 Shell Command History
130 The ones for Dired and Rmail have had the items turned into :: items
132 Also Running Shell Commands from Emacs
133 and Sending Mail and Registers and Minibuffer.
137 * Distrib:: How to get the latest Emacs distribution.
138 * Intro:: An introduction to Emacs concepts.
139 @c Note that in the printed manual, the glossary and indices come last.
140 * Glossary:: Terms used in this manual.
142 Indexes (each index contains a large menu)
143 * Key Index:: An item for each standard Emacs key sequence.
144 * Option Index:: An item for every command-line option.
145 * Command Index:: An item for each command name.
146 * Variable Index:: An item for each documented variable.
147 * Concept Index:: An item for each concept.
149 * Acknowledgments:: Major contributors to GNU Emacs.
151 Important General Concepts
152 * Screen:: How to interpret what you see on the screen.
153 * User Input:: Kinds of input events (characters, buttons,
155 * Keys:: Key sequences: what you type to request one
157 * Commands:: Named functions run by key sequences to do editing.
158 * Entering Emacs:: Starting Emacs from the shell.
159 * Exiting:: Stopping or killing Emacs.
161 Fundamental Editing Commands
162 * Basic:: The most basic editing commands.
163 * Minibuffer:: Entering arguments that are prompted for.
164 * M-x:: Invoking commands by their names.
165 * Help:: Commands for asking Emacs about its commands.
167 Important Text-Changing Commands
168 * Mark:: The mark: how to delimit a ``region'' of text.
169 * Killing:: Killing (cutting) text.
170 * Yanking:: Recovering killed text. Moving text. (Pasting.)
171 * Accumulating Text:: Other ways of copying text.
172 * Rectangles:: Operating on the text inside a rectangle on the screen.
173 * CUA Bindings:: Using @kbd{C-x}, @kbd{C-c}, @kbd{C-v} for copy
174 and paste, with enhanced rectangle support.
175 * Registers:: Saving a text string or a location in the buffer.
176 * Display:: Controlling what text is displayed.
177 * Search:: Finding or replacing occurrences of a string.
178 * Fixit:: Commands especially useful for fixing typos.
179 * Keyboard Macros:: A keyboard macro records a sequence of
180 keystrokes to be replayed with a single command.
182 Major Structures of Emacs
183 * Files:: All about handling files.
184 * Buffers:: Multiple buffers; editing several files at once.
185 * Windows:: Viewing two pieces of text at once.
186 * Frames:: Running the same Emacs session in multiple X windows.
187 * International:: Using non-@acronym{ASCII} character sets.
190 * Major Modes:: Text mode vs. Lisp mode vs. C mode...
191 * Indentation:: Editing the white space at the beginnings of lines.
192 * Text:: Commands and modes for editing English.
193 * Programs:: Commands and modes for editing programs.
194 * Building:: Compiling, running and debugging programs.
195 * Maintaining:: Features for maintaining large programs.
196 * Abbrevs:: How to define text abbreviations to reduce
197 the number of characters you must type.
198 @c AFAICS, the tex stuff generates its own index and does not use this one.
200 * Picture Mode:: Editing pictures made up of characters using
201 the quarter-plane screen model.
203 * Sending Mail:: Sending mail in Emacs.
204 * Rmail:: Reading mail in Emacs.
205 * Dired:: You can ``edit'' a directory to manage files in it.
206 * Calendar/Diary:: The calendar and diary facilities.
207 * Document View:: Viewing PDF, PS and DVI files.
208 * Gnus:: How to read netnews with Emacs.
209 * Shell:: Executing shell commands from Emacs.
210 * Emacs Server:: Using Emacs as an editing server for @code{mail}, etc.
211 * Printing:: Printing hardcopies of buffers or regions.
212 * Sorting:: Sorting lines, paragraphs or pages within Emacs.
213 * Narrowing:: Restricting display and editing to a portion
215 * Two-Column:: Splitting apart columns to edit them
216 in side-by-side windows.
217 * Editing Binary Files::Using Hexl mode to edit binary files.
218 * Saving Emacs Sessions:: Saving Emacs state from one session to the next.
219 * Recursive Edit:: A command can allow you to do editing
220 "within the command". This is called a
221 "recursive editing level".
222 * Emulation:: Emulating some other editors with Emacs.
223 * Hyperlinking:: Following links in buffers.
224 * Dissociated Press:: Dissociating text for fun.
225 * Amusements:: Various games and hacks.
226 * Customization:: Modifying the behavior of Emacs.
228 Recovery from Problems
229 * Quitting:: Quitting and aborting.
230 * Lossage:: What to do if Emacs is hung or malfunctioning.
231 * Bugs:: How and when to report a bug.
232 * Contributing:: How to contribute improvements to Emacs.
233 * Service:: How to get help for your own Emacs needs.
236 * Copying:: The GNU General Public License gives you permission
237 to redistribute GNU Emacs on certain terms;
238 it also explains that there is no warranty.
239 * GNU Free Documentation License:: The license for this documentation.
240 * Emacs Invocation:: Hairy startup options.
241 * X Resources:: X resources for customizing Emacs.
242 * Antinews:: Information about Emacs version 22.
243 * Mac OS / GNUstep:: Using Emacs under Mac OS and GNUstep.
244 * Microsoft Windows:: Using Emacs on Microsoft Windows and MS-DOS.
245 * Manifesto:: What's GNU? Gnu's Not Unix!
247 @c Do NOT modify the following 3 lines! They must have this form to
248 @c be correctly identified by `texinfo-multiple-files-update'. In
249 @c particular, the detailed menu header line MUST be identical to the
250 @c value of `texinfo-master-menu-header'. See texnfo-upd.el.
253 --- The Detailed Node Listing ---
254 ---------------------------------
256 Here are some other nodes which are really inferiors of the ones
257 already listed, mentioned here so you can get to them in one step:
259 The Organization of the Screen
261 * Point:: The place in the text where editing commands operate.
262 * Echo Area:: Short messages appear at the bottom of the screen.
263 * Mode Line:: Interpreting the mode line.
264 * Menu Bar:: How to use the menu bar.
266 Basic Editing Commands
268 * Inserting Text:: Inserting text by simply typing it.
269 * Moving Point:: Moving the cursor to the place where you want to
271 * Erasing:: Deleting and killing text.
272 * Basic Undo:: Undoing recent changes in the text.
273 * Basic Files:: Visiting, creating, and saving files.
274 * Basic Help:: Asking what a character does.
275 * Blank Lines:: Making and deleting blank lines.
276 * Continuation Lines:: How Emacs displays lines too wide for the screen.
277 * Position Info:: What page, line, row, or column is point on?
278 * Arguments:: Numeric arguments for repeating a command N times.
279 * Repeating:: Repeating the previous command quickly.
283 * Minibuffer File:: Entering file names with the minibuffer.
284 * Minibuffer Edit:: How to edit in the minibuffer.
285 * Completion:: An abbreviation facility for minibuffer input.
286 * Minibuffer History:: Reusing recent minibuffer arguments.
287 * Repetition:: Re-executing commands that used the minibuffer.
288 * Passwords:: Entering passwords in the echo area.
292 * Completion Example:: Examples of using completion.
293 * Completion Commands:: A list of completion commands.
294 * Strict Completion:: Different types of completion.
295 * Completion Options:: Options for completion.
299 * Help Summary:: Brief list of all Help commands.
300 * Key Help:: Asking what a key does in Emacs.
301 * Name Help:: Asking about a command, variable or function name.
302 * Apropos:: Asking what pertains to a given topic.
303 * Help Mode:: Special features of Help mode and Help buffers.
304 * Library Keywords:: Finding Lisp libraries by keywords (topics).
305 * Language Help:: Help relating to international language support.
306 * Misc Help:: Other help commands.
307 * Help Files:: Commands to display pre-written help files.
308 * Help Echo:: Help on active text and tooltips (`balloon help').
310 The Mark and the Region
312 * Setting Mark:: Commands to set the mark.
313 * Marking Objects:: Commands to put region around textual units.
314 * Using Region:: Summary of ways to operate on contents of the region.
315 * Mark Ring:: Previous mark positions saved so you can go back there.
316 * Global Mark Ring:: Previous mark positions in various buffers.
317 * Shift Selection:: Using shifted cursor motion keys.
318 * Persistent Mark:: Keeping the mark active all the time.
320 Killing and Moving Text
322 * Deletion:: Commands for deleting small amounts of text and
324 * Killing by Lines:: How to kill entire lines of text at one time.
325 * Other Kill Commands:: Commands to kill large regions of text and
326 syntactic units such as words and sentences.
330 * Kill Ring:: Where killed text is stored. Basic yanking.
331 * Appending Kills:: Several kills in a row all yank together.
332 * Earlier Kills:: Yanking something killed some time ago.
336 * RegPos:: Saving positions in registers.
337 * RegText:: Saving text in registers.
338 * RegRect:: Saving rectangles in registers.
339 * RegConfig:: Saving window configurations in registers.
340 * RegNumbers:: Numbers in registers.
341 * RegFiles:: File names in registers.
342 * Bookmarks:: Bookmarks are like registers, but persistent.
344 Controlling the Display
346 * Scrolling:: Commands to move text up and down in a window.
347 * Auto Scrolling:: Redisplay scrolls text automatically when needed.
348 * Horizontal Scrolling:: Moving text left and right in a window.
349 * Follow Mode:: Follow mode lets two windows scroll as one.
350 * Faces:: How to change the display style using faces.
351 * Standard Faces:: Emacs' predefined faces.
352 * Temporary Face Changes:: Commands to temporarily modify the default text face
353 * Font Lock:: Minor mode for syntactic highlighting using faces.
354 * Highlight Interactively:: Tell Emacs what text to highlight.
355 * Fringes:: Enabling or disabling window fringes.
356 * Displaying Boundaries:: Displaying top and bottom of the buffer.
357 * Useless Whitespace:: Showing possibly-spurious trailing whitespace.
358 * Selective Display:: Hiding lines with lots of indentation.
359 * Optional Mode Line:: Optional mode line display features.
360 * Text Display:: How text characters are normally displayed.
361 * Cursor Display:: Features for displaying the cursor.
362 * Line Truncation:: Truncating lines to fit the screen width instead
363 of continuing them to multiple screen lines.
364 * Visual Line Mode:: Word wrap and screen line-based editing.
365 * Display Custom:: Information on variables for customizing display.
367 Searching and Replacement
369 * Incremental Search:: Search happens as you type the string.
370 * Nonincremental Search:: Specify entire string and then search.
371 * Word Search:: Search for sequence of words.
372 * Regexp Search:: Search for match for a regexp.
373 * Regexps:: Syntax of regular expressions.
374 * Regexp Backslash:: Regular expression constructs starting with `\'.
375 * Regexp Example:: A complex regular expression explained.
376 * Search Case:: To ignore case while searching, or not.
377 * Replace:: Search, and replace some or all matches.
378 * Other Repeating Search:: Operating on all matches for some regexp.
382 * Basic Isearch:: Basic incremental search commands.
383 * Repeat Isearch:: Searching for the same string again.
384 * Error in Isearch:: When your string is not found.
385 * Special Isearch:: Special input in incremental search.
386 * Isearch Yank:: Commands that grab text into the search string
387 or else edit the search string.
388 * Isearch Scroll:: Scrolling during an incremental search.
389 * Isearch Minibuffer:: Incremental search of the minibuffer history.
390 * Slow Isearch:: Incremental search features for slow terminals.
394 * Unconditional Replace:: Replacing all matches for a string.
395 * Regexp Replace:: Replacing all matches for a regexp.
396 * Replacement and Case:: How replacements preserve case of letters.
397 * Query Replace:: How to use querying.
399 Commands for Fixing Typos
401 * Undo:: The Undo commands.
402 * Transpose:: Exchanging two characters, words, lines, lists...
403 * Fixing Case:: Correcting case of last word entered.
404 * Spelling:: Apply spelling checker to a word, or a whole file.
408 * Basic Keyboard Macro:: Defining and running keyboard macros.
409 * Keyboard Macro Ring:: Where previous keyboard macros are saved.
410 * Keyboard Macro Counter:: Inserting incrementing numbers in macros.
411 * Keyboard Macro Query:: Making keyboard macros do different things each time.
412 * Save Keyboard Macro:: Giving keyboard macros names; saving them in files.
413 * Edit Keyboard Macro:: Editing keyboard macros.
414 * Keyboard Macro Step-Edit:: Interactively executing and editing a keyboard
419 * File Names:: How to type and edit file-name arguments.
420 * Visiting:: Visiting a file prepares Emacs to edit the file.
421 * Saving:: Saving makes your changes permanent.
422 * Reverting:: Reverting cancels all the changes not saved.
423 * Autorevert:: Auto Reverting non-file buffers.
424 * Auto Save:: Auto Save periodically protects against loss of data.
425 * File Aliases:: Handling multiple names for one file.
426 * Directories:: Creating, deleting, and listing file directories.
427 * Comparing Files:: Finding where two files differ.
428 * Diff Mode:: Mode for editing file differences.
429 * Misc File Ops:: Other things you can do on files.
430 * Compressed Files:: Accessing compressed files.
431 * File Archives:: Operating on tar, zip, jar etc. archive files.
432 * Remote Files:: Accessing files on other sites.
433 * Quoted File Names:: Quoting special characters in file names.
434 * File Name Cache:: Completion against a list of files you often use.
435 * File Conveniences:: Convenience Features for Finding Files.
436 * Filesets:: Handling sets of files.
440 * Save Commands:: Commands for saving files.
441 * Backup:: How Emacs saves the old version of your file.
442 * Customize Save:: Customizing the saving of files.
443 * Interlocking:: How Emacs protects against simultaneous editing
444 of one file by two users.
445 * File Shadowing:: Copying files to "shadows" automatically.
446 * Time Stamps:: Emacs can update time stamps on saved files.
450 * Backup Names:: How backup files are named.
451 * Backup Deletion:: Emacs deletes excess numbered backups.
452 * Backup Copying:: Backups can be made by copying or renaming.
454 Auto Reverting Non-File Buffers
456 * Auto Reverting the Buffer Menu:: Auto Revert of the Buffer Menu.
457 * Auto Reverting Dired:: Auto Revert of Dired buffers.
458 * Supporting additional buffers:: How to add more Auto Revert support.
460 Auto-Saving: Protection Against Disasters
462 * Auto Save Files:: The file where auto-saved changes are
463 actually made until you save the file.
464 * Auto Save Control:: Controlling when and how often to auto-save.
465 * Recover:: Recovering text from auto-save files.
467 Using Multiple Buffers
469 * Select Buffer:: Creating a new buffer or reselecting an old one.
470 * List Buffers:: Getting a list of buffers that exist.
471 * Misc Buffer:: Renaming; changing read-onlyness; copying text.
472 * Kill Buffer:: Killing buffers you no longer need.
473 * Several Buffers:: How to go through the list of all buffers
474 and operate variously on several of them.
475 * Indirect Buffers:: An indirect buffer shares the text of another buffer.
476 * Buffer Convenience:: Convenience and customization features for
479 Convenience Features and Customization of Buffer Handling
481 * Uniquify:: Making buffer names unique with directory parts.
482 * Iswitchb:: Switching between buffers with substrings.
483 * Buffer Menus:: Configurable buffer menu.
487 * Basic Window:: Introduction to Emacs windows.
488 * Split Window:: New windows are made by splitting existing windows.
489 * Other Window:: Moving to another window or doing something to it.
490 * Pop Up Window:: Finding a file or buffer in another window.
491 * Force Same Window:: Forcing certain buffers to appear in the selected
492 window rather than in another window.
493 * Change Window:: Deleting windows and changing their sizes.
494 * Window Convenience:: Convenience functions for window handling.
496 Frames and Graphical Displays
498 * Cut and Paste:: Mouse commands for cut and paste.
499 * Mouse References:: Using the mouse to select an item from a list.
500 * Menu Mouse Clicks:: Mouse clicks that bring up menus.
501 * Mode Line Mouse:: Mouse clicks on the mode line.
502 * Creating Frames:: Creating additional Emacs frames with various contents.
503 * Frame Commands:: Iconifying, deleting, and switching frames.
504 * Speedbar:: How to make and use a speedbar frame.
505 * Multiple Displays:: How one Emacs job can talk to several displays.
506 * Special Buffer Frames:: You can make certain buffers have their own frames.
507 * Frame Parameters:: Changing the colors and other modes of frames.
508 * Scroll Bars:: How to enable and disable scroll bars; how to use them.
509 * Wheeled Mice:: Using mouse wheels for scrolling.
510 * Drag and Drop:: Using drag and drop to open files and insert text.
511 * Menu Bars:: Enabling and disabling the menu bar.
512 * Tool Bars:: Enabling and disabling the tool bar.
513 * Dialog Boxes:: Controlling use of dialog boxes.
514 * Tooltips:: Displaying information at the current mouse position.
515 * Mouse Avoidance:: Moving the mouse pointer out of the way.
516 * Non-Window Terminals:: Multiple frames on terminals that show only one.
517 * Text-Only Mouse:: Using the mouse in text-only terminals.
519 Killing and Yanking on Graphical Displays
521 * Mouse Commands:: Moving, cutting, and pasting, with the mouse.
522 * Word and Line Mouse:: Mouse commands for selecting whole words or lines.
523 * Cut/Paste Other App:: Transfering text between Emacs and other apps.
524 * Secondary Selection:: Cutting without altering point and mark.
525 * Clipboard:: Using the clipboard for selections.
527 International Character Set Support
529 * International Chars:: Basic concepts of multibyte characters.
530 * Enabling Multibyte:: Controlling whether to use multibyte characters.
531 * Language Environments:: Setting things up for the language you use.
532 * Input Methods:: Entering text characters not on your keyboard.
533 * Select Input Method:: Specifying your choice of input methods.
534 * Coding Systems:: Character set conversion when you read and
535 write files, and so on.
536 * Recognize Coding:: How Emacs figures out which conversion to use.
537 * Specify Coding:: Specifying a file's coding system explicitly.
538 * Output Coding:: Choosing coding systems for output.
539 * Text Coding:: Choosing conversion to use for file text.
540 * Communication Coding:: Coding systems for interprocess communication.
541 * File Name Coding:: Coding systems for file @emph{names}.
542 * Terminal Coding:: Specifying coding systems for converting
543 terminal input and output.
544 * Fontsets:: Fontsets are collections of fonts
545 that cover the whole spectrum of characters.
546 * Defining Fontsets:: Defining a new fontset.
547 * Modifying Fontsets:: Modifying an existing fontset.
548 * Undisplayable Characters::When characters don't display.
549 * Unibyte Mode:: You can pick one European character set
550 to use without multibyte characters.
551 * Charsets:: How Emacs groups its internal character codes.
555 * Choosing Modes:: How major modes are specified or chosen.
559 * Indentation Commands:: Various commands and techniques for indentation.
560 * Tab Stops:: You can set arbitrary "tab stops" and then
561 indent to the next tab stop when you want to.
562 * Just Spaces:: You can request indentation using just spaces.
564 Commands for Human Languages
566 * Words:: Moving over and killing words.
567 * Sentences:: Moving over and killing sentences.
568 * Paragraphs:: Moving over paragraphs.
569 * Pages:: Moving over pages.
570 * Filling:: Filling or justifying text.
571 * Case:: Changing the case of text.
572 * Text Mode:: The major modes for editing text files.
573 * Outline Mode:: Editing outlines.
574 * TeX Mode:: Editing input to the formatter TeX.
575 * HTML Mode:: Editing HTML, SGML, and XML files.
576 * Nroff Mode:: Editing input to the formatter nroff.
577 * Formatted Text:: Editing formatted text directly in WYSIWYG fashion.
578 * Text Based Tables:: Editing text-based tables in WYSIWYG fashion.
582 * Auto Fill:: Auto Fill mode breaks long lines automatically.
583 * Fill Commands:: Commands to refill paragraphs and center lines.
584 * Fill Prefix:: Filling paragraphs that are indented
585 or in a comment, etc.
586 * Adaptive Fill:: How Emacs can determine the fill prefix automatically.
587 * Refill:: Keeping paragraphs filled.
588 * Longlines:: Editing text with very long lines.
592 * Outline Format:: What the text of an outline looks like.
593 * Outline Motion:: Special commands for moving through
595 * Outline Visibility:: Commands to control what is visible.
596 * Outline Views:: Outlines and multiple views.
597 * Foldout:: Folding means zooming in on outlines.
601 * TeX Editing:: Special commands for editing in TeX mode.
602 * LaTeX Editing:: Additional commands for LaTeX input files.
603 * TeX Print:: Commands for printing part of a file with TeX.
604 * TeX Misc:: Customization of TeX mode, and related features.
606 Editing Formatted Text
608 * Requesting Formatted Text:: Entering and exiting Enriched mode.
609 * Hard and Soft Newlines:: There are two different kinds of newlines.
610 * Editing Format Info:: How to edit text properties.
611 * Format Faces:: Bold, italic, underline, etc.
612 * Format Colors:: Changing the color of text.
613 * Format Indentation:: Changing the left and right margins.
614 * Format Justification:: Centering, setting text flush with the
615 left or right margin, etc.
616 * Format Properties:: The "special" text properties submenu.
617 * Forcing Enriched Mode:: How to force use of Enriched mode.
619 @c The automatic texinfo menu update inserts some duplicate items here
620 @c (faces, colors, indentation, justification, properties), because
621 @c they are listed in two menus. But we already have them above, no
622 @c need to list them twice.
624 Editing Text-based Tables
626 * Table Definition:: What is a text based table.
627 * Table Creation:: How to create a table.
628 * Table Recognition:: How to activate and deactivate tables.
629 * Cell Commands:: Cell-oriented commands in a table.
630 * Cell Justification:: Justifying cell contents.
631 * Row Commands:: Manipulating rows of table cell.
632 * Column Commands:: Manipulating columns of table cell.
633 * Fixed Width Mode:: Fixing cell width.
634 * Table Conversion:: Converting between plain text and tables.
635 * Measuring Tables:: Analyzing table dimension.
636 * Table Misc:: Table miscellany.
640 * Program Modes:: Major modes for editing programs.
641 * Defuns:: Commands to operate on major top-level parts
643 * Program Indent:: Adjusting indentation to show the nesting.
644 * Parentheses:: Commands that operate on parentheses.
645 * Comments:: Inserting, killing, and aligning comments.
646 * Documentation:: Getting documentation of functions you plan to call.
647 * Hideshow:: Displaying blocks selectively.
648 * Symbol Completion:: Completion on symbol names of your program or language.
649 * Glasses:: Making identifiersLikeThis more readable.
650 * Misc for Programs:: Other Emacs features useful for editing programs.
651 * C Modes:: Special commands of C, C++, Objective-C,
652 Java, and Pike modes.
653 * Asm Mode:: Asm mode and its special features.
654 * Fortran:: Fortran mode and its special features.
656 Top-Level Definitions, or Defuns
658 * Left Margin Paren:: An open-paren or similar opening delimiter
659 starts a defun if it is at the left margin.
660 * Moving by Defuns:: Commands to move over or mark a major definition.
661 * Imenu:: Making buffer indexes as menus.
662 * Which Function:: Which Function mode shows which function you are in.
664 Indentation for Programs
666 * Basic Indent:: Indenting a single line.
667 * Multi-line Indent:: Commands to reindent many lines at once.
668 * Lisp Indent:: Specifying how each Lisp function should be indented.
669 * C Indent:: Extra features for indenting C and related modes.
670 * Custom C Indent:: Controlling indentation style for C and related modes.
672 Commands for Editing with Parentheses
674 * Expressions:: Expressions with balanced parentheses.
675 * Moving by Parens:: Commands for moving up, down and across
676 in the structure of parentheses.
677 * Matching:: Insertion of a close-delimiter flashes matching open.
679 Manipulating Comments
681 * Comment Commands:: Inserting, killing, and aligning comments.
682 * Multi-Line Comments:: Commands for adding and editing multi-line comments.
683 * Options for Comments::Customizing the comment features.
687 * Info Lookup:: Looking up library functions and commands
689 * Man Page:: Looking up man pages of library functions and commands.
690 * Lisp Doc:: Looking up Emacs Lisp functions, etc.
694 * Motion in C:: Commands to move by C statements, etc.
695 * Electric C:: Colon and other chars can automatically reindent.
696 * Hungry Delete:: A more powerful DEL command.
697 * Other C Commands:: Filling comments, viewing expansion of macros,
698 and other neat features.
702 * Fortran Motion:: Moving point by statements or subprograms.
703 * Fortran Indent:: Indentation commands for Fortran.
704 * Fortran Comments:: Inserting and aligning comments.
705 * Fortran Autofill:: Auto fill support for Fortran.
706 * Fortran Columns:: Measuring columns for valid Fortran.
707 * Fortran Abbrev:: Built-in abbrevs for Fortran keywords.
711 * ForIndent Commands:: Commands for indenting and filling Fortran.
712 * ForIndent Cont:: How continuation lines indent.
713 * ForIndent Num:: How line numbers auto-indent.
714 * ForIndent Conv:: Conventions you must obey to avoid trouble.
715 * ForIndent Vars:: Variables controlling Fortran indent style.
717 Compiling and Testing Programs
719 * Compilation:: Compiling programs in languages other
720 than Lisp (C, Pascal, etc.).
721 * Compilation Mode:: The mode for visiting compiler errors.
722 * Compilation Shell:: Customizing your shell properly
723 for use in the compilation buffer.
724 * Grep Searching:: Searching with grep.
725 * Flymake:: Finding syntax errors on the fly.
726 * Debuggers:: Running symbolic debuggers for non-Lisp programs.
727 * Executing Lisp:: Various modes for editing Lisp programs,
728 with different facilities for running
730 * Lisp Libraries:: Creating Lisp programs to run in Emacs.
731 * Lisp Eval:: Executing a single Lisp expression in Emacs.
732 * Lisp Interaction:: Executing Lisp in an Emacs buffer.
733 * External Lisp:: Communicating through Emacs with a separate Lisp.
735 Running Debuggers Under Emacs
737 * Starting GUD:: How to start a debugger subprocess.
738 * Debugger Operation:: Connection between the debugger and source buffers.
739 * Commands of GUD:: Key bindings for common commands.
740 * GUD Customization:: Defining your own commands for GUD.
741 * GDB Graphical Interface:: An enhanced mode that uses GDB features to
742 implement a graphical debugging environment through
745 GDB Graphical Interface
747 * GDB-UI Layout:: Control the number of displayed buffers.
748 * Source Buffers:: Use the mouse in the fringe/margin to
749 control your program.
750 * Breakpoints Buffer:: A breakpoint control panel.
751 * Threads Buffer:: Displays your threads.
752 * Stack Buffer:: Select a frame from the call stack.
753 * Other GDB-UI Buffers:: Input/output, locals, registers,
754 assembler, threads and memory buffers.
755 * Watch Expressions:: Monitor variable values in the speedbar.
756 * Multithreaded Debugging:: Debugging programs with several threads.
758 Maintaining Large Programs
760 * Version Control:: Using version control systems.
761 * Change Log:: Maintaining a change history for your program.
762 * Tags:: Go directly to any function in your program in one
763 command. Tags remembers which file it is in.
764 * Emerge:: A convenient way of merging two versions of a program.
768 * Introduction to VC:: How version control works in general.
769 * VC Mode Line:: How the mode line shows version control status.
770 * Basic VC Editing:: How to edit a file under version control.
771 * Old Revisions:: Examining and comparing old versions.
772 * Secondary VC Commands:: The commands used a little less frequently.
773 * VC Directory Mode:: Listing files managed by version control.
774 * Branches:: Multiple lines of development.
775 * Remote Repositories:: Efficient access to remote CVS servers.
776 * Revision Tags:: Symbolic names for revisions.
777 * Miscellaneous VC:: Various other commands and features of VC.
778 * Customizing VC:: Variables that change VC's behavior.
780 Introduction to Version Control
782 * Why Version Control?:: Understanding the problems it addresses.
783 * Version Control Systems:: Supported version control back-end systems.
784 * VCS Concepts:: Words and concepts related to version control.
785 * Types of Log File:: The VCS log in contrast to the ChangeLog.
787 Basic Editing under Version Control
789 * VC With A Merging VCS:: Without locking: default mode for CVS.
790 * VC With A Locking VCS:: RCS in its default mode, SCCS, and optionally CVS.
791 * Advanced C-x v v:: Advanced features available with a prefix argument.
792 * Log Buffer:: Features available in log entry buffers.
794 The Secondary Commands of VC
796 * Registering:: Putting a file under version control.
797 * VC Status:: Viewing the VC status of files.
798 * VC Undo:: Canceling changes before or after check-in.
802 * VC Directory Buffer:: What the buffer looks like and means.
803 * VC Directory Commands:: Commands to use in a VC directory buffer.
805 Multiple Branches of a File
807 * Switching Branches:: How to get to another existing branch.
808 * Creating Branches:: How to start a new branch.
809 * Merging:: Transferring changes between branches.
810 * Multi-User Branching:: Multiple users working at multiple branches
815 * Version Backups:: Keeping local copies of repository versions.
816 * Local Version Control:: Using another version system for local editing.
820 * Making Revision Tags:: The tag facilities.
821 * Revision Tag Caveats:: Things to be careful of when using tags.
823 Miscellaneous Commands and Features of VC
825 * Change Logs and VC:: Generating a change log file from log entries.
826 * Renaming and VC:: A command to rename both the source and master
828 * Version Headers:: Inserting version control headers into working files.
832 * General VC Options:: Options that apply to multiple back ends.
833 * RCS and SCCS:: Options for RCS and SCCS.
834 * CVS Options:: Options for CVS.
838 * Change Log Commands:: Commands for editing change log files.
839 * Format of ChangeLog:: What the change log file looks like.
843 * Tag Syntax:: Tag syntax for various types of code and text files.
844 * Create Tags Table:: Creating a tags table with @code{etags}.
845 * Etags Regexps:: Create arbitrary tags using regular expressions.
846 * Select Tags Table:: How to visit a tags table.
847 * Find Tag:: Commands to find the definition of a specific tag.
848 * Tags Search:: Using a tags table for searching and replacing.
849 * List Tags:: Listing and finding tags defined in a file.
851 Merging Files with Emerge
853 * Overview of Emerge:: How to start Emerge. Basic concepts.
854 * Submodes of Emerge:: Fast mode vs. Edit mode.
855 Skip Prefers mode and Auto Advance mode.
856 * State of Difference:: You do the merge by specifying state A or B
858 * Merge Commands:: Commands for selecting a difference,
859 changing states of differences, etc.
860 * Exiting Emerge:: What to do when you've finished the merge.
861 * Combining in Emerge:: How to keep both alternatives for a difference.
862 * Fine Points of Emerge:: Miscellaneous issues.
866 * Abbrev Concepts:: Fundamentals of defined abbrevs.
867 * Defining Abbrevs:: Defining an abbrev, so it will expand when typed.
868 * Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.
869 * Editing Abbrevs:: Viewing or editing the entire list of defined abbrevs.
870 * Saving Abbrevs:: Saving the entire list of abbrevs for another session.
871 * Dynamic Abbrevs:: Abbreviations for words already in the buffer.
872 * Dabbrev Customization:: What is a word, for dynamic abbrevs. Case handling.
877 * Basic Picture:: Basic concepts and simple commands of Picture Mode.
878 * Insert in Picture:: Controlling direction of cursor motion
879 after "self-inserting" characters.
880 * Tabs in Picture:: Various features for tab stops and indentation.
881 * Rectangles in Picture:: Clearing and superimposing rectangles.
886 * Mail Format:: Format of the mail being composed.
887 * Mail Headers:: Details of some standard mail header fields.
888 * Mail Aliases:: Abbreviating and grouping mail addresses.
889 * Mail Mode:: Special commands for editing mail being composed.
890 * Mail Amusements:: Distracting the NSA; adding fortune messages.
891 * Mail Methods:: Using alternative mail-composition methods.
895 * Mail Sending:: Commands to send the message.
896 * Header Editing:: Commands to move to header fields and edit them.
897 * Citing Mail:: Copying all or part of a message you are replying to.
898 * Mail Mode Misc:: Spell checking, signatures, etc.
900 Reading Mail with Rmail
902 * Rmail Basics:: Basic concepts of Rmail, and simple use.
903 * Rmail Scrolling:: Scrolling through a message.
904 * Rmail Motion:: Moving to another message.
905 * Rmail Deletion:: Deleting and expunging messages.
906 * Rmail Inbox:: How mail gets into the Rmail file.
907 * Rmail Files:: Using multiple Rmail files.
908 * Rmail Output:: Copying message out to files.
909 * Rmail Labels:: Classifying messages by labeling them.
910 * Rmail Attributes:: Certain standard labels, called attributes.
911 * Rmail Reply:: Sending replies to messages you are viewing.
912 * Rmail Summary:: Summaries show brief info on many messages.
913 * Rmail Sorting:: Sorting messages in Rmail.
914 * Rmail Display:: How Rmail displays a message; customization.
915 * Rmail Coding:: How Rmail handles decoding character sets.
916 * Rmail Editing:: Editing message text and headers in Rmail.
917 * Rmail Digest:: Extracting the messages from a digest message.
918 * Rmail Rot13:: Reading messages encoded in the rot13 code.
919 * Movemail:: More details of fetching new mail.
920 * Remote Mailboxes:: Retrieving mail from remote mailboxes.
921 * Other Mailbox Formats:: Retrieving mail from local mailboxes in
926 * Rmail Make Summary:: Making various sorts of summaries.
927 * Rmail Summary Edit:: Manipulating messages from the summary.
929 Dired, the Directory Editor
931 * Dired Enter:: How to invoke Dired.
932 * Dired Navigation:: Special motion commands in the Dired buffer.
933 * Dired Deletion:: Deleting files with Dired.
934 * Flagging Many Files:: Flagging files based on their names.
935 * Dired Visiting:: Other file operations through Dired.
936 * Marks vs Flags:: Flagging for deletion vs marking.
937 * Operating on Files:: How to copy, rename, print, compress, etc.
938 either one file or several files.
939 * Shell Commands in Dired:: Running a shell command on the marked files.
940 * Transforming File Names:: Using patterns to rename multiple files.
941 * Comparison in Dired:: Running `diff' by way of Dired.
942 * Subdirectories in Dired:: Adding subdirectories to the Dired buffer.
943 * Subdir Switches:: Subdirectory switches in Dired.
944 * Subdirectory Motion:: Moving across subdirectories, and up and down.
945 * Hiding Subdirectories:: Making subdirectories visible or invisible.
946 * Dired Updating:: Discarding lines for files of no interest.
947 * Dired and Find:: Using `find' to choose the files for Dired.
948 * Wdired:: Operating on files by editing the Dired buffer.
949 * Image-Dired:: Viewing image thumbnails in Dired.
950 * Misc Dired Features:: Various other features.
952 The Calendar and the Diary
954 * Calendar Motion:: Moving through the calendar; selecting a date.
955 * Scroll Calendar:: Bringing earlier or later months onto the screen.
956 * Counting Days:: How many days are there between two dates?
957 * General Calendar:: Exiting or recomputing the calendar.
958 * Writing Calendar Files:: Writing calendars to files of various formats.
959 * Holidays:: Displaying dates of holidays.
960 * Sunrise/Sunset:: Displaying local times of sunrise and sunset.
961 * Lunar Phases:: Displaying phases of the moon.
962 * Other Calendars:: Converting dates to other calendar systems.
963 * Diary:: Displaying events from your diary.
964 * Appointments:: Reminders when it's time to do something.
965 * Importing Diary:: Converting diary events to/from other formats.
966 * Daylight Saving:: How to specify when daylight saving time is active.
967 * Time Intervals:: Keeping track of time intervals.
968 * Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization.
970 Movement in the Calendar
972 * Calendar Unit Motion:: Moving by days, weeks, months, and years.
973 * Move to Beginning or End:: Moving to start/end of weeks, months, and years.
974 * Specified Dates:: Moving to the current date or another
977 Conversion To and From Other Calendars
979 * Calendar Systems:: The calendars Emacs understands
980 (aside from Gregorian).
981 * To Other Calendar:: Converting the selected date to various calendars.
982 * From Other Calendar:: Moving to a date specified in another calendar.
983 * Mayan Calendar:: Moving to a date specified in a Mayan calendar.
987 * Displaying the Diary:: Viewing diary entries and associated calendar dates.
988 * Format of Diary File:: Entering events in your diary.
989 * Date Formats:: Various ways you can specify dates.
990 * Adding to Diary:: Commands to create diary entries.
991 * Special Diary Entries:: Anniversaries, blocks of dates, cyclic entries, etc.
993 Customizing the Calendar and Diary
995 * Calendar Customizing:: Calendar layout and hooks.
996 * Holiday Customizing:: Defining your own holidays.
997 * Date Display Format:: Changing the format.
998 * Time Display Format:: Changing the format.
999 * Diary Customizing:: Defaults you can set.
1000 * Non-Gregorian Diary:: Diary entries based on other calendars.
1001 * Fancy Diary Display:: Enhancing the diary display, sorting entries,
1002 using included diary files.
1003 * Sexp Diary Entries:: Fancy things you can do.
1007 * Navigation:: Navigation inside DocView buffers.
1008 * Searching:: Searching inside documents.
1009 * Slicing:: Specifying which part of pages should be displayed.
1010 * Conversion:: Influencing and triggering conversion.
1014 * Buffers of Gnus:: The group, summary, and article buffers.
1015 * Gnus Startup:: What you should know about starting Gnus.
1016 * Summary of Gnus:: A short description of the basic Gnus commands.
1018 Running Shell Commands from Emacs
1020 * Single Shell:: How to run one shell command and return.
1021 * Interactive Shell:: Permanent shell taking input via Emacs.
1022 * Shell Mode:: Special Emacs commands used with permanent shell.
1023 * Shell Prompts:: Two ways to recognize shell prompts.
1024 * Shell History:: Repeating previous commands in a shell buffer.
1025 * Directory Tracking:: Keeping track when the subshell changes directory.
1026 * Shell Options:: Options for customizing Shell mode.
1027 * Terminal emulator:: An Emacs window as a terminal emulator.
1028 * Term Mode:: Special Emacs commands used in Term mode.
1029 * Paging in Term:: Paging in the terminal emulator.
1030 * Remote Host:: Connecting to another computer.
1031 * Serial Terminal:: Connecting to a serial port.
1033 Shell Command History
1035 * Shell Ring:: Fetching commands from the history list.
1036 * Shell History Copying::Moving to a command and then copying it.
1037 * History References:: Expanding @samp{!}-style history references.
1039 Using Emacs as a Server
1041 * Invoking emacsclient:: Connecting to the Emacs server.
1042 * emacsclient Options:: Emacs client startup options.
1044 Printing Hard Copies
1046 * PostScript:: Printing buffers or regions as PostScript.
1047 * PostScript Variables:: Customizing the PostScript printing commands.
1048 * Printing Package:: An optional advanced printing interface.
1050 Hyperlinking and Navigation Features
1052 * Browse-URL:: Following URLs.
1053 * Goto Address mode:: Activating URLs.
1054 * FFAP:: Finding files etc. at point.
1058 * Minor Modes:: Each minor mode is a feature you can turn on
1059 independently of any others.
1060 * Easy Customization:: Convenient way to browse and change settings.
1061 * Variables:: Many Emacs commands examine Emacs variables
1062 to decide what to do; by setting variables,
1063 you can control their functioning.
1064 * Key Bindings:: The keymaps say what command each key runs.
1065 By changing them, you can "redefine keys".
1066 * Syntax:: The syntax table controls how words and
1067 expressions are parsed.
1068 * Init File:: How to write common customizations in the
1071 Easy Customization Interface
1073 * Customization Groups:: How settings are classified in a structure.
1074 * Browsing Custom:: Browsing and searching for settings.
1075 * Changing a Variable:: How to edit an option's value and set the option.
1076 * Saving Customizations:: Specifying the file for saving customizations.
1077 * Face Customization:: How to edit the attributes of a face.
1078 * Specific Customization:: Making a customization buffer for specific
1079 variables, faces, or groups.
1080 * Custom Themes:: How to define collections of customized options
1081 that can be loaded and unloaded together.
1085 * Examining:: Examining or setting one variable's value.
1086 * Hooks:: Hook variables let you specify programs for parts
1087 of Emacs to run on particular occasions.
1088 * Locals:: Per-buffer values of variables.
1089 * File Variables:: How files can specify variable values.
1090 * Directory Variables:: How variable values can be specified by directory.
1092 Local Variables in Files
1094 * Specifying File Variables:: Specifying file local variables.
1095 * Safe File Variables:: Making sure file local variables are safe.
1097 Customizing Key Bindings
1099 * Keymaps:: Generalities. The global keymap.
1100 * Prefix Keymaps:: Keymaps for prefix keys.
1101 * Local Keymaps:: Major and minor modes have their own keymaps.
1102 * Minibuffer Maps:: The minibuffer uses its own local keymaps.
1103 * Rebinding:: How to redefine one key's meaning conveniently.
1104 * Init Rebinding:: Rebinding keys with your init file, @file{.emacs}.
1105 * Modifier Keys:: Using modifier keys in key bindings.
1106 * Function Keys:: Rebinding terminal function keys.
1107 * Named ASCII Chars:: Distinguishing @key{TAB} from @kbd{C-i}, and so on.
1108 * Mouse Buttons:: Rebinding mouse buttons in Emacs.
1109 * Disabling:: Disabling a command means confirmation is required
1110 before it can be executed. This is done to protect
1111 beginners from surprises.
1113 The Init File, @file{~/.emacs}
1115 * Init Syntax:: Syntax of constants in Emacs Lisp.
1116 * Init Examples:: How to do some things with an init file.
1117 * Terminal Init:: Each terminal type can have an init file.
1118 * Find Init:: How Emacs finds the init file.
1119 * Init Non-ASCII:: Using non-@acronym{ASCII} characters in an init file.
1121 Dealing with Emacs Trouble
1123 * DEL Does Not Delete:: What to do if @key{DEL} doesn't delete.
1124 * Stuck Recursive:: `[...]' in mode line around the parentheses.
1125 * Screen Garbled:: Garbage on the screen.
1126 * Text Garbled:: Garbage in the text.
1127 * Memory Full:: How to cope when you run out of memory.
1128 * After a Crash:: Recovering editing in an Emacs session that crashed.
1129 * Emergency Escape:: Emergency escape---
1130 What to do if Emacs stops responding.
1131 * Total Frustration:: When you are at your wits' end.
1135 * Bug Criteria:: Have you really found a bug?
1136 * Understanding Bug Reporting:: How to report a bug effectively.
1137 * Checklist:: Steps to follow for a good bug report.
1138 * Sending Patches:: How to send a patch for GNU Emacs.
1140 Command Line Arguments for Emacs Invocation
1142 * Action Arguments:: Arguments to visit files, load libraries,
1144 * Initial Options:: Arguments that take effect while starting Emacs.
1145 * Command Example:: Examples of using command line arguments.
1146 * Resume Arguments:: Specifying arguments when you resume a running Emacs.
1147 * Environment:: Environment variables that Emacs uses.
1148 * Display X:: Changing the default display and using remote login.
1149 * Font X:: Choosing a font for text, under X.
1150 * Colors:: Choosing display colors.
1151 * Window Size X:: Start-up window size, under X.
1152 * Borders X:: Internal and external borders, under X.
1153 * Title X:: Specifying the initial frame's title.
1154 * Icons X:: Choosing what sort of icon to use, under X.
1155 * Misc X:: Other display options.
1157 Environment Variables
1159 * General Variables:: Environment variables that all versions of Emacs use.
1160 * Misc Variables:: Certain system-specific variables.
1161 * MS-Windows Registry:: An alternative to the environment on MS-Windows.
1163 X Options and Resources
1165 * Resources:: Using X resources with Emacs (in general).
1166 * Table of Resources:: Table of specific X resources that affect Emacs.
1167 * Face Resources:: X resources for customizing faces.
1168 * Lucid Resources:: X resources for Lucid menus.
1169 * LessTif Resources:: X resources for LessTif and Motif menus.
1170 * GTK resources:: Resources for GTK widgets.
1174 * GTK widget names:: How widgets in GTK are named in general.
1175 * GTK Names in Emacs:: GTK widget names in Emacs.
1176 * GTK styles:: What can be customized in a GTK widget.
1178 Emacs and Mac OS / GNUstep
1180 * Mac / GNUstep Basics:: Basic Emacs usage under GNUstep or Mac OS.
1181 * Mac / GNUstep Customization:: Customizations under GNUstep or Mac OS.
1182 * Mac / GNUstep Events:: How window system events are handled.
1183 * GNUstep Support:: Details on status of GNUstep support.
1185 Emacs and Microsoft Windows/MS-DOS
1187 * Text and Binary:: Text files use CRLF to terminate lines.
1188 * Windows Files:: File-name conventions on Windows.
1189 * ls in Lisp:: Emulation of @code{ls} for Dired.
1190 * Windows HOME:: Where Emacs looks for your @file{.emacs}.
1191 * Windows Keyboard:: Windows-specific keyboard features.
1192 * Windows Mouse:: Windows-specific mouse features.
1193 * Windows Processes:: Running subprocesses on Windows.
1194 * Windows Printing:: How to specify the printer on MS-Windows.
1195 * Windows Fonts:: Specifying fonts on MS-Windows.
1196 * Windows Misc:: Miscellaneous Windows features.
1197 * MS-DOS:: Using Emacs on MS-DOS (otherwise known as @dfn{MS-DOG}).
1201 * MS-DOS Keyboard:: Keyboard conventions on MS-DOS.
1202 * MS-DOS Mouse:: Mouse conventions on MS-DOS.
1203 * MS-DOS Display:: Fonts, frames and display size on MS-DOS.
1204 * MS-DOS File Names:: File name conventions on MS-DOS.
1205 * MS-DOS Printing:: Printing specifics on MS-DOS.
1206 * MS-DOS and MULE:: Support for internationalization on MS-DOS.
1207 * MS-DOS Processes:: Running subprocesses on MS-DOS.
1215 This manual documents the use and simple customization of the Emacs
1216 editor. Simple Emacs customizations do not require you to be a
1217 programmer, but if you are not interested in customizing, you can
1218 ignore the customization hints.
1220 This is primarily a reference manual, but can also be used as a
1221 primer. If you are new to Emacs, we recommend you start with
1222 the integrated, learn-by-doing tutorial, before reading the manual. To
1223 run the tutorial, start Emacs and type @kbd{C-h t}. The tutorial
1224 describes commands, tells you when to try them, and explains the
1227 On first reading, just skim chapters 1 and 2, which describe the
1228 notational conventions of the manual and the general appearance of the
1229 Emacs display screen. Note which questions are answered in these
1230 chapters, so you can refer back later. After reading chapter 4, you
1231 should practice the commands shown there. The next few chapters
1232 describe fundamental techniques and concepts that are used constantly.
1233 You need to understand them thoroughly, so experiment with them
1234 until you are fluent.
1236 Chapters 14 through 19 describe intermediate-level features that are
1237 useful for many kinds of editing. Chapter 20 and following chapters
1238 describe optional but useful features; read those chapters when you
1241 Read the Common Problems chapter if Emacs does not seem to be
1242 working properly. It explains how to cope with several common
1243 problems (@pxref{Lossage}), as well as when and how to report Emacs
1244 bugs (@pxref{Bugs}).
1246 To find the documentation of a particular command, look in the index.
1247 Keys (character commands) and command names have separate indexes.
1248 There is also a glossary, with a cross reference for each term.
1250 This manual is available as a printed book and also as an Info file.
1251 The Info file is for use with the Info program, which is the principal
1252 means of accessing on-line documentation in the GNU system. Both the
1253 Emacs Info file and an Info reader are included with GNU Emacs. The
1254 Info file and the printed book contain substantially the same text and
1255 are generated from the same source files, which are also distributed
1258 GNU Emacs is a member of the Emacs editor family. There are many
1259 Emacs editors, all sharing common principles of organization. For
1260 information on the underlying philosophy of Emacs and the lessons
1261 learned from its development, see @cite{Emacs, the Extensible,
1262 Customizable Self-Documenting Display Editor}, available from
1263 @url{ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-519A.pdf}.
1265 This edition of the manual is intended for use with GNU Emacs
1266 installed on GNU and Unix systems. GNU Emacs can also be used on
1267 MS-DOS (also called MS-DOG), Microsoft Windows, and Macintosh systems.
1268 Those systems use different file name syntax; in addition
1269 MS-DOS does not support all GNU Emacs features. @xref{Microsoft
1270 Windows}, for information about using Emacs on Windows.
1271 @xref{Mac OS / GNUstep}, for information about using Emacs on
1272 Macintosh (and GNUstep).
1275 @node Distrib, Intro, Top, Top
1276 @unnumbered Distribution
1278 GNU Emacs is @dfn{free software}; this means that everyone is free to
1279 use it and free to redistribute it on certain conditions. GNU Emacs
1280 is not in the public domain; it is copyrighted and there are
1281 restrictions on its distribution, but these restrictions are designed
1282 to permit everything that a good cooperating citizen would want to do.
1283 What is not allowed is to try to prevent others from further sharing
1284 any version of GNU Emacs that they might get from you. The precise
1285 conditions are found in the GNU General Public License that comes with
1286 Emacs and also appears in this manual@footnote{This manual is itself
1287 covered by the GNU Free Documentation License (see the reverse title
1288 page in the printed manual or view the full source for online formats
1289 to see the precise conditions). This license is similar in spirit to
1290 the General Public License, but is more suitable for documentation.
1291 @xref{GNU Free Documentation License}.}. @xref{Copying}.
1293 One way to get a copy of GNU Emacs is from someone else who has it.
1294 You need not ask for our permission to do so, or tell any one else;
1295 just copy it. If you have access to the Internet, you can get the
1296 latest distribution version of GNU Emacs by anonymous FTP; see
1297 @url{http://www.gnu.org/software/emacs} on our website for more
1300 You may also receive GNU Emacs when you buy a computer. Computer
1301 manufacturers are free to distribute copies on the same terms that apply to
1302 everyone else. These terms require them to give you the full sources,
1303 including whatever changes they may have made, and to permit you to
1304 redistribute the GNU Emacs received from them under the usual terms of the
1305 General Public License. In other words, the program must be free for you
1306 when you get it, not just free for the manufacturer.
1308 @c FIXME no longer true?
1309 You can also order copies of GNU Emacs from the Free Software
1310 Foundation. This is a convenient and reliable way to get a copy; it is
1311 also a good way to help fund our work. We also sell hardcopy versions
1312 of this manual and @cite{An Introduction to Programming in Emacs Lisp},
1313 by Robert J. Chassell. You can visit our online store at
1314 @url{http://shop.fsf.org/}. For further information,
1318 Free Software Foundation
1319 51 Franklin Street, Fifth Floor
1320 Boston, MA 02110-1301
1324 The income from sales goes to support the foundation's purpose: the
1325 development of new free software, and improvements to our existing
1326 programs including GNU Emacs.
1328 @c FIXME you can't order a CD any more.
1329 If you find GNU Emacs useful, please @strong{send a donation} to the
1330 Free Software Foundation to support our work. Donations to the Free
1331 Software Foundation are tax deductible in the US. If you use GNU Emacs
1332 at your workplace, please suggest that the company make a donation. If
1333 company policy is unsympathetic to the idea of donating to charity, you
1334 might instead suggest ordering a CD-ROM from the Foundation
1335 occasionally, or subscribing to periodic updates.
1338 @node Acknowledgments, Intro, Distrib, Top
1339 @unnumberedsec Acknowledgments
1341 Contributors to GNU Emacs include Jari Aalto, Per Abrahamsen, Tomas
1342 Abrahamsson, Jay K.@: Adams, Michael Albinus, Nagy Andras, Ralf Angeli,
1343 Joe Arceneaux, Miles Bader, David Bakhash, Juanma Barranquero, Eli
1344 Barzilay, Thomas Baumann, Steven L.@: Baur, Jay Belanger, Alexander L.@:
1345 Belikoff, Boaz Ben-Zvi, Karl Berry, Anna M.@: Bigatti, Ray Blaak, Jim
1346 Blandy, Johan Bockg@aa{}rd, Lennart Borgman, Per Bothner, Terrence
1347 Brannon, Frank Bresz, Peter Breton, Emmanuel Briot, Kevin Broadey,
1348 Vincent Broman, David M.@: Brown, Georges Brun-Cottan, Joe Buehler,
1349 W@l{}odek Bzyl, Bill Carpenter, Per Cederqvist, Hans Chalupsky, Chong
1350 Yidong, Chris Chase, Bob Chassell, Andrew Choi, Sacha Chua, James Clark,
1351 Mike Clarkson, Glynn Clements, Daniel Colascione, Andrew Csillag, Baoqiu
1352 Cui, Doug Cutting, Mathias Dahl, Satyaki Das, Michael DeCorte, Gary
1353 Delp, Matthieu Devin, Eri Ding, Jan Dj@"{a}rv, Carsten Dominik, Scott
1354 Draves, Benjamin Drieu, Viktor Dukhovni, Dmitry Dzhus, John Eaton, Rolf
1355 Ebert, Paul Eggert, Stephen Eglen, Torbj@"orn Einarsson, Tsugutomo
1356 Enami, Hans Henrik Eriksen, Michael Ernst, Ata Etemadi, Frederick
1357 Farnbach, Oscar Figueiredo, Fred Fish, Karl Fogel, Gary Foster, Romain
1358 Francoise, Noah Friedman, Andreas Fuchs, Hallvard Furuseth, Keith
1359 Gabryelski, Peter S.@: Galbraith, Kevin Gallagher, Kevin Gallo, Juan
1360 Le@'{o}n Lahoz Garc@'{@dotless{i}}a, Howard Gayle, Daniel German,
1361 Stephen Gildea, Julien Gilles, David Gillespie, Bob Glickstein, Deepak
1362 Goel, Boris Goldowsky, Michelangelo Grigni, Odd Gripenstam, Kai
1363 Gro@ss{}johann, Michael Gschwind, Bastien Guerry, Henry Guillaume, Doug
1364 Gwyn, Ken'ichi Handa, Lars Hansen, Chris Hanson, K. Shane Hartman, John
1365 Heidemann, Jon K.@: Hellan, Jesper Harder, Magnus Henoch, Markus
1366 Heritsch, Karl Heuer, Manabu Higashida, Anders Holst, Jeffrey C.@:
1367 Honig, Tassilo Horn, Kurt Hornik, Tom Houlder, Joakim Hove, Denis Howe,
1368 Lars Ingebrigtsen, Andrew Innes, Seiichiro Inoue, Philip Jackson, Pavel
1369 Janik, Paul Jarc, Ulf Jasper, Michael K. Johnson, Kyle Jones, Terry
1370 Jones, Simon Josefsson, Arne J@o{}rgensen, Tomoji Kagatani, Brewster
1371 Kahle, Tokuya Kameshima, Lute Kamstra, David Kastrup, David Kaufman,
1372 Henry Kautz, Taichi Kawabata, Howard Kaye, Michael Kifer, Richard King,
1373 Peter Kleiweg, Shuhei Kobayashi, Pavel Kobiakov, Larry K.@: Kolodney,
1374 David M.@: Koppelman, Koseki Yoshinori, Robert Krawitz, Sebastian
1375 Kremer, Ryszard Kubiak, Geoff Kuenning, David K@aa{}gedal, Daniel
1376 LaLiberte, Karl Landstrom, Mario Lang, Aaron Larson, James R.@: Larus,
1377 Vinicius Jose Latorre, Werner Lemberg, Frederic Lepied, Peter
1378 Liljenberg, Lars Lindberg, Chris Lindblad, Anders Lindgren, Thomas Link,
1379 Juri Linkov, Francis Litterio, Emilio C. Lopes, K@'{a}roly L@H{o}rentey,
1380 Dave Love, Sascha L@"{u}decke, Eric Ludlam, Alan Mackenzie, Christopher
1381 J.@: Madsen, Neil M.@: Mager, Ken Manheimer, Bill Mann, Brian Marick,
1382 Simon Marshall, Bengt Martensson, Charlie Martin, Thomas May, Roland
1383 McGrath, Will Mengarini, David Megginson, Ben A. Mesander, Wayne Mesard,
1384 Brad Miller, Lawrence Mitchell, Richard Mlynarik, Gerd Moellmann, Stefan
1385 Monnier, Morioka Tomohiko, Keith Moore, Jan Moringen, Glenn Morris,
1386 Diane Murray, Sen Nagata, Erik Naggum, Thomas Neumann, Thien-Thi Nguyen,
1387 Mike Newton, Jurgen Nickelsen, Dan Nicolaescu, Hrvoje Niksic, Jeff
1388 Norden, Andrew Norman, Alexandre Oliva, Bob Olson, Michael Olson,
1389 Takaaki Ota, Pieter E.@: J.@: Pareit, Ross Patterson, David Pearson,
1390 Jeff Peck, Damon Anton Permezel, Tom Perrine, William M.@: Perry, Per
1391 Persson, Jens Petersen, Daniel Pfeiffer, Richard L.@: Pieri, Fred
1392 Pierresteguy, Christian Plaunt, David Ponce, Francesco A.@: Potorti,
1393 Michael D. Prange, Mukesh Prasad, Ken Raeburn, Marko Rahamaa, Ashwin
1394 Ram, Eric S. Raymond, Paul Reilly, Edward M. Reingold, Alex Rezinsky,
1395 Rob Riepel, David Reitter, Adrian Robert, Nick Roberts, Roland B.@:
1396 Roberts, John Robinson, Danny Roozendaal, Sebastian Rose, William
1397 Rosenblatt, Guillermo J.@: Rozas, Martin Rudalics, Ivar Rummelhoff,
1398 Jason Rumney, Wolfgang Rupprecht, Kevin Ryde, James B. Salem, Masahiko
1399 Sato, Jorgen Schaefer, Holger Schauer, William Schelter, Ralph
1400 Schleicher, Gregor Schmid, Michael Schmidt, Ronald S. Schnell, Philippe
1401 Schnoebelen, Jan Schormann, Alex Schroeder, Stephen Schoef, Raymond
1402 Scholz, Eric Schulte, Andreas Schwab, Randal Schwartz, Oliver Seidel,
1403 Manuel Serrano, Hovav Shacham, Stanislav Shalunov, Marc Shapiro, Richard
1404 Sharman, Olin Shivers, Espen Skoglund, Rick Sladkey, Lynn Slater, Chris
1405 Smith, David Smith, Paul D.@: Smith, Andre Spiegel, Michael Staats,
1406 William Sommerfeld, Michael Staats, Reiner Steib, Sam Steingold, Ake
1407 Stenhoff, Peter Stephenson, Ken Stevens, Andy Stewart, Jonathan
1408 Stigelman, Martin Stjernholm, Kim F.@: Storm, Steve Strassman, Olaf
1409 Sylvester, Naoto Takahashi, Steven Tamm, Jean-Philippe Theberge, Jens
1410 T.@: Berger Thielemann, Spencer Thomas, Jim Thompson, Luc Teirlinck,
1411 David O'Toole, Tom Tromey, Enami Tsugutomo, Eli Tziperman, Daiki Ueno,
1412 Masanobu Umeda, Rajesh Vaidheeswarran, Neil W.@: Van Dyke, Didier Verna,
1413 Joakim Verona, Ulrik Vieth, Geoffrey Voelker, Johan Vromans, Inge
1414 Wallin, John Paul Wallington, Colin Walters, Barry Warsaw, Morten
1415 Welinder, Joseph Brian Wells, Rodney Whitby, John Wiegley, Ed Wilkinson,
1416 Mike Williams, Bill Wohler, Steven A. Wood, Dale R.@: Worley, Francis
1417 J.@: Wright, Felix S. T. Wu, Tom Wurgler, Katsumi Yamaoka, Yamamoto
1418 Mitsuharu, Masatake Yamato, Jonathan Yavner, Ryan Yeske, Ilya
1419 Zakharevich, Milan Zamazal, Victor Zandy, Eli Zaretskii, Jamie Zawinski,
1420 Shenghuo Zhu, Piotr Zielinski, Ian T.@: Zimmermann, Reto Zimmermann,
1421 Neal Ziring, Teodor Zlatanov, and Detlev Zundel.
1424 @node Intro, Glossary, Distrib, Top
1425 @unnumbered Introduction
1427 You are reading about GNU Emacs, the GNU incarnation of the
1428 advanced, self-documenting, customizable, extensible editor Emacs.
1429 (The `G' in `GNU' is not silent.)
1431 We call Emacs @dfn{advanced} because it can do much more than simple
1432 insertion and deletion of text. It can control subprocesses, indent
1433 programs automatically, show multiple files at once, and more.
1434 Emacs editing commands operate in terms of characters, words, lines,
1435 sentences, paragraphs, and pages, as well as expressions and comments
1436 in various programming languages.
1438 @dfn{Self-documenting} means that at any time you can use special
1439 commands, known as @dfn{help commands}, to find out what your options
1440 are, or to find out what any command does, or to find all the
1441 commands that pertain to a given topic. @xref{Help}.
1443 @dfn{Customizable} means that you can easily alter the behavior of
1444 Emacs commands in simple ways. For instance, if you use a programming
1445 language in which comments start with @samp{<**} and end with
1446 @samp{**>}, you can tell the Emacs comment manipulation commands to
1447 use those strings (@pxref{Comments}). To take another example, you
1448 can rebind the basic cursor motion commands (up, down, left and right)
1449 to any keys on the keyboard that you find comfortable.
1450 @xref{Customization}.
1452 @dfn{Extensible} means that you can go beyond simple customization
1453 and create entirely new commands. New commands are simply programs
1454 written in the Lisp language, which are run by Emacs's own Lisp
1455 interpreter. Existing commands can even be redefined in the middle of
1456 an editing session, without having to restart Emacs. Most of the
1457 editing commands in Emacs are written in Lisp; the few exceptions
1458 could have been written in Lisp but use C instead for efficiency.
1459 Writing an extension is programming, but non-programmers can use it
1460 afterwards. @xref{Top, Emacs Lisp Intro, Preface, eintr, An
1461 Introduction to Programming in Emacs Lisp}, if you want to learn Emacs
1464 @include screen.texi
1465 @include commands.texi
1466 @include entering.texi
1472 @include killing.texi
1474 @include display.texi
1475 @include search.texi
1477 @include kmacro.texi
1478 @c Includes arevert-xtra.
1480 @include buffers.texi
1481 @include windows.texi
1482 @include frames.texi
1485 @include indent.texi
1487 @c Includes fortran-xtra.
1488 @include programs.texi
1489 @include building.texi
1490 @c Includes vc1-xtra, emerge-xtra.
1491 @include maintaining.texi
1492 @include abbrevs.texi
1494 @include picture-xtra.texi
1496 @include sending.texi
1498 @c Includes dired-xtra.
1500 @c Includes cal-xtra.
1501 @include calendar.texi
1503 @include custom.texi
1504 @include trouble.texi
1506 @node Copying, GNU Free Documentation License, Service, Top
1507 @appendix GNU GENERAL PUBLIC LICENSE
1510 @node GNU Free Documentation License, Emacs Invocation, Copying, Top
1511 @appendix GNU Free Documentation License
1512 @include doclicense.texi
1514 @include cmdargs.texi
1515 @include xresources.texi
1519 @c Includes msdog-xtra.
1522 @include glossary.texi
1527 @c The Option Index is produced only in the on-line version,
1528 @c because the index entries related to command-line options
1529 @c tend to point to the same pages and all begin with a dash.
1530 @c This, and the need to keep the node links consistent, are
1531 @c the reasons for the funky @iftex/@ifnottex dance below.
1532 @c The Option Index is _not_ before Key Index, because that
1533 @c would require changes in the glossary.texi's @node line.
1534 @c It is not after Concept Index for similar reasons.
1537 @node Key Index, Command Index, Glossary, Top
1538 @unnumbered Key (Character) Index
1543 @node Key Index, Option Index, Glossary, Top
1544 @unnumbered Key (Character) Index
1547 @node Option Index, Command Index, Key Index, Top
1548 @unnumbered Command-Line Options Index
1551 @node Command Index, Variable Index, Option Index, Top
1552 @unnumbered Command and Function Index
1557 @node Command Index, Variable Index, Key Index, Top
1558 @unnumbered Command and Function Index
1562 @node Variable Index, Concept Index, Command Index, Top
1563 @unnumbered Variable Index
1566 @node Concept Index, Acknowledgments, Variable Index, Top
1567 @unnumbered Concept Index
1573 arch-tag: ed48740a-410b-46ea-9387-c9a9252a3392