3 @setfilename ../info/emacs
4 @settitle GNU Emacs Manual
6 @c The edition number appears in several places in this file
7 @set EDITION Fourteenth
11 This is the @value{EDITION} edition of the @cite{GNU Emacs Manual},
12 updated for Emacs version @value{EMACSVER}.
14 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
15 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
18 Permission is granted to copy, distribute and/or modify this document
19 under the terms of the GNU Free Documentation License, Version 1.2 or
20 any later version published by the Free Software Foundation; with the
21 Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
22 ``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
23 Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the
24 license is included in the section entitled ``GNU Free Documentation
27 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
28 this GNU Manual, like GNU software. Copies published by the Free
29 Software Foundation raise funds for GNU development.''
35 * Emacs: (emacs). The extensible self-documenting text editor.
38 @c in general, keep the following line commented out, unless doing a
39 @c copy of this manual that will be published. the manual should go
40 @c onto the distribution in the full, 8.5 x 11" size.
44 @setchapternewpage odd
51 @shorttitlepage GNU Emacs Manual
56 @center @titlefont{GNU Emacs Manual}
58 @center @value{EDITION} Edition, Updated for Emacs Version @value{EMACSVER}.
60 @center Richard Stallman
62 @vskip 0pt plus 1filll
67 Published by the Free Software Foundation @*
68 51 Franklin Street, Fifth Floor @*
69 Boston, MA 02110-1301 USA
72 Cover art by Etienne Suvasa.
77 @node Top, Distrib, (dir), (dir)
80 Emacs is the extensible, customizable, self-documenting real-time
81 display editor. This Info file describes how to edit with Emacs and
82 some of how to customize it; it corresponds to GNU Emacs version
86 If you never before used the Info documentation system, type @kbd{h},
87 and Emacs will take you to a programmed instruction sequence for the
91 For information on extending Emacs, see @ref{Top, Emacs Lisp,, elisp, The
92 Emacs Lisp Reference Manual}.
96 These subcategories have been deleted for simplicity
97 and to avoid conflicts.
100 Auto-Saving: Protection Against Disasters
106 Shell Command History
108 The ones for Dired and Rmail have had the items turned into :: items
110 Also Running Shell Commands from Emacs
111 and Sending Mail and Registers and Minibuffer.
115 * Distrib:: How to get the latest Emacs distribution.
116 * Copying:: The GNU General Public License gives you permission
117 to redistribute GNU Emacs on certain terms;
118 it also explains that there is no warranty.
119 * GNU Free Documentation License:: The license for this documentation.
120 * Intro:: An introduction to Emacs concepts.
121 * Glossary:: The glossary.
122 * Antinews:: Information about Emacs version 21.
123 * Mac OS:: Using Emacs in the Mac.
124 * MS-DOS:: Using Emacs on MS-DOS and Microsoft Windows.
125 * Manifesto:: What's GNU? Gnu's Not Unix!
126 * Acknowledgments:: Major contributors to GNU Emacs.
128 Indexes (nodes containing large menus)
129 * Key Index:: An item for each standard Emacs key sequence.
130 * Option Index:: An item for every command-line option.
131 * Command Index:: An item for each command name.
132 * Variable Index:: An item for each documented variable.
133 * Concept Index:: An item for each concept.
135 Important General Concepts
136 * Screen:: How to interpret what you see on the screen.
137 * User Input:: Kinds of input events (characters, buttons,
139 * Keys:: Key sequences: what you type to request one
141 * Commands:: Named functions run by key sequences to do editing.
142 * Text Characters:: Character set for text (the contents of buffers
144 * Entering Emacs:: Starting Emacs from the shell.
145 * Exiting:: Stopping or killing Emacs.
146 * Emacs Invocation:: Hairy startup options.
148 Fundamental Editing Commands
149 * Basic:: The most basic editing commands.
150 * Minibuffer:: Entering arguments that are prompted for.
151 * M-x:: Invoking commands by their names.
152 * Help:: Commands for asking Emacs about its commands.
154 Important Text-Changing Commands
155 * Mark:: The mark: how to delimit a ``region'' of text.
156 * Killing:: Killing (cutting) text.
157 * Yanking:: Recovering killed text. Moving text. (Pasting.)
158 * Accumulating Text:: Other ways of copying text.
159 * Rectangles:: Operating on the text inside a rectangle on the screen.
160 * Registers:: Saving a text string or a location in the buffer.
161 * Display:: Controlling what text is displayed.
162 * Search:: Finding or replacing occurrences of a string.
163 * Fixit:: Commands especially useful for fixing typos.
164 * Keyboard Macros:: A keyboard macro records a sequence of
165 keystrokes to be replayed with a single command.
167 Major Structures of Emacs
168 * Files:: All about handling files.
169 * Buffers:: Multiple buffers; editing several files at once.
170 * Windows:: Viewing two pieces of text at once.
171 * Frames:: Running the same Emacs session in multiple X windows.
172 * International:: Using non-@acronym{ASCII} character sets (the MULE features).
175 * Major Modes:: Text mode vs. Lisp mode vs. C mode ...
176 * Indentation:: Editing the white space at the beginnings of lines.
177 * Text:: Commands and modes for editing English.
178 * Programs:: Commands and modes for editing programs.
179 * Building:: Compiling, running and debugging programs.
180 * Maintaining:: Features for maintaining large programs.
181 * Abbrevs:: How to define text abbreviations to reduce
182 the number of characters you must type.
183 * Sending Mail:: Sending mail in Emacs.
184 * Rmail:: Reading mail in Emacs.
185 * Dired:: You can ``edit'' a directory to manage files in it.
186 * Calendar/Diary:: The calendar and diary facilities.
187 * Gnus:: How to read netnews with Emacs.
188 * Shell:: Executing shell commands from Emacs.
189 * Emacs Server:: Using Emacs as an editing server for @code{mail}, etc.
190 * Printing:: Printing hardcopies of buffers or regions.
191 * Sorting:: Sorting lines, paragraphs or pages within Emacs.
192 * Narrowing:: Restricting display and editing to a portion
194 * Two-Column:: Splitting apart columns to edit them
195 in side-by-side windows.
196 * Editing Binary Files::Using Hexl mode to edit binary files.
197 * Saving Emacs Sessions:: Saving Emacs state from one session to the next.
198 * Recursive Edit:: A command can allow you to do editing
199 "within the command". This is called a
200 "recursive editing level".
201 * Emulation:: Emulating some other editors with Emacs.
202 * Hyperlinking:: Following links in buffers.
203 * Dissociated Press:: Dissociating text for fun.
204 * Amusements:: Various games and hacks.
205 * Customization:: Modifying the behavior of Emacs.
206 * X Resources:: X resources for customizing Emacs.
208 Recovery from Problems
209 * Quitting:: Quitting and aborting.
210 * Lossage:: What to do if Emacs is hung or malfunctioning.
211 * Bugs:: How and when to report a bug.
212 * Contributing:: How to contribute improvements to Emacs.
213 * Service:: How to get help for your own Emacs needs.
215 Detailed Node Listing
216 ---------------------
218 Here are some other nodes which are really inferiors of the ones
219 already listed, mentioned here so you can get to them in one step:
221 The Organization of the Screen
223 * Point:: The place in the text where editing commands operate.
224 * Echo Area:: Short messages appear at the bottom of the screen.
225 * Mode Line:: Interpreting the mode line.
226 * Menu Bar:: How to use the menu bar.
228 Basic Editing Commands
230 * Inserting Text:: Inserting text by simply typing it.
231 * Moving Point:: How to move the cursor to the place where you want to
233 * Erasing:: Deleting and killing text.
234 * Basic Undo:: Undoing recent changes in the text.
235 * Basic Files:: Visiting, creating, and saving files.
236 * Basic Help:: Asking what a character does.
237 * Blank Lines:: Commands to make or delete blank lines.
238 * Continuation Lines:: Lines too wide for the screen.
239 * Position Info:: What page, line, row, or column is point on?
240 * Arguments:: Numeric arguments for repeating a command.
241 * Repeating:: A short-cut for repeating the previous command.
245 * Minibuffer File:: Entering file names with the minibuffer.
246 * Minibuffer Edit:: How to edit in the minibuffer.
247 * Completion:: An abbreviation facility for minibuffer input.
248 * Minibuffer History:: Reusing recent minibuffer arguments.
249 * Repetition:: Re-executing commands that used the minibuffer.
253 * Help Summary:: Brief list of all Help commands.
254 * Key Help:: Asking what a key does in Emacs.
255 * Name Help:: Asking about a command, variable or function name.
256 * Apropos:: Asking what pertains to a given topic.
257 * Library Keywords:: Finding Lisp libraries by keywords (topics).
258 * Language Help:: Help relating to international language support.
259 * Help Mode:: Special features of Help mode and Help buffers.
260 * Misc Help:: Other help commands.
261 * Help Files:: Commands to display pre-written help files.
262 * Help Echo:: Help on active text and tooltips (`balloon help')
264 The Mark and the Region
266 * Setting Mark:: Commands to set the mark.
267 * Transient Mark:: How to make Emacs highlight the region--
269 * Momentary Mark:: Enabling Transient Mark mode momentarily.
270 * Using Region:: Summary of ways to operate on contents of the region.
271 * Marking Objects:: Commands to put region around textual units.
272 * Mark Ring:: Previous mark positions saved so you can go back there.
273 * Global Mark Ring:: Previous mark positions in various buffers.
275 Killing and Moving Text
277 * Deletion:: Commands for deleting small amounts of text and
279 * Killing by Lines:: How to kill entire lines of text at one time.
280 * Other Kill Commands:: Commands to kill large regions of text and
281 syntactic units such as words and sentences.
282 * Graphical Kill:: The kill ring on graphical terminals:
283 yanking between applications.
284 * CUA Bindings:: Using @kbd{C-x}, @kbd{C-c}, @kbd{C-v} for copy
285 and paste, with enhanced rectangle support.
289 * Kill Ring:: Where killed text is stored. Basic yanking.
290 * Appending Kills:: Several kills in a row all yank together.
291 * Earlier Kills:: Yanking something killed some time ago.
295 * RegPos:: Saving positions in registers.
296 * RegText:: Saving text in registers.
297 * RegRect:: Saving rectangles in registers.
298 * RegConfig:: Saving window configurations in registers.
299 * RegNumbers:: Numbers in registers.
300 * RegFiles:: File names in registers.
301 * Bookmarks:: Bookmarks are like registers, but persistent.
303 Controlling the Display
305 * Scrolling:: Moving text up and down in a window.
306 * Horizontal Scrolling:: Moving text left and right in a window.
307 * Follow Mode:: Follow mode lets two windows scroll as one.
308 * Faces:: How to change the display style using faces.
309 * Standard Faces:: Emacs' predefined faces.
310 * Font Lock:: Minor mode for syntactic highlighting using faces.
311 * Highlight Interactively:: Tell Emacs what text to highlight.
312 * Fringes:: Enabling or disabling window fringes.
313 * Useless Whitespace:: Showing possibly-spurious trailing whitespace.
314 * Selective Display:: Hiding lines with lots of indentation.
315 * Optional Mode Line:: Optional mode line display features.
316 * Text Display:: How text characters are normally displayed.
317 * Cursor Display:: Features for displaying the cursor.
318 * Display Custom:: Information on variables for customizing display.
320 Searching and Replacement
322 * Incremental Search:: Search happens as you type the string.
323 * Nonincremental Search:: Specify entire string and then search.
324 * Word Search:: Search for sequence of words.
325 * Regexp Search:: Search for match for a regexp.
326 * Regexps:: Syntax of regular expressions.
327 * Search Case:: To ignore case while searching, or not.
328 * Replace:: Search, and replace some or all matches.
329 * Other Repeating Search:: Operating on all matches for some regexp.
333 * Unconditional Replace:: Replacing all matches for a string.
334 * Regexp Replace:: Replacing all matches for a regexp.
335 * Replacement and Case:: How replacements preserve case of letters.
336 * Query Replace:: How to use querying.
338 Commands for Fixing Typos
340 * Undo:: Full details of Emacs undo commands.
341 * Kill Errors:: Commands to kill a batch of recently entered text.
342 * Transpose:: Exchanging two characters, words, lines, lists...
343 * Fixing Case:: Correcting case of last word entered.
344 * Spelling:: Apply spelling checker to a word or a whole buffer.
348 * Basic Keyboard Macro:: Defining and running keyboard macros.
349 * Keyboard Macro Ring:: Where previous keyboard macros are saved.
350 * Keyboard Macro Counter:: Inserting incrementing numbers in macros.
351 * Keyboard Macro Query:: Making keyboard macros do different things each time.
352 * Save Keyboard Macro:: Giving keyboard macros names; saving them in files.
353 * Edit Keyboard Macro:: Editing keyboard macros.
354 * Keyboard Macro Step-Edit:: Interactively executing and editing a keyboard
359 * File Names:: How to type and edit file-name arguments.
360 * Visiting:: Visiting a file prepares Emacs to edit the file.
361 * Saving:: Saving makes your changes permanent.
362 * Reverting:: Reverting cancels all the changes not saved.
363 * Auto Save:: Auto Save periodically protects against loss of data.
364 * File Aliases:: Handling multiple names for one file.
365 * Version Control:: Version control systems (RCS, CVS and SCCS).
366 * Directories:: Creating, deleting, and listing file directories.
367 * Comparing Files:: Finding where two files differ.
368 * Misc File Ops:: Other things you can do on files.
369 * Compressed Files:: Accessing compressed files.
370 * File Archives:: Operating on tar, zip, jar etc. archive files.
371 * Remote Files:: Accessing files on other sites.
372 * Quoted File Names:: Quoting special characters in file names.
373 * File Name Cache:: Completion against a list of files you often use.
374 * File Conveniences:: Convenience Features for Finding Files.
375 * Filesets:: Handling sets of files.
379 * Save Commands:: Commands for saving files.
380 * Backup:: How Emacs saves the old version of your file.
381 * Customize Save:: Customizing the saving of files.
382 * Interlocking:: How Emacs protects against simultaneous editing
383 of one file by two users.
384 * File Shadowing:: Copying files to "shadows" automatically.
385 * Time Stamps:: Emacs can update time stamps on saved files.
389 * Introduction to VC:: How version control works in general.
390 * VC Mode Line:: How the mode line shows version control status.
391 * Basic VC Editing:: How to edit a file under version control.
392 * Old Versions:: Examining and comparing old versions.
393 * Secondary VC Commands:: The commands used a little less frequently.
394 * Branches:: Multiple lines of development.
395 * Remote Repositories:: Efficient access to remote CVS servers.
396 * Snapshots:: Sets of file versions treated as a unit.
397 * Miscellaneous VC:: Various other commands and features of VC.
398 * Customizing VC:: Variables that change VC's behavior.
400 Using Multiple Buffers
402 * Select Buffer:: Creating a new buffer or reselecting an old one.
403 * List Buffers:: Getting a list of buffers that exist.
404 * Misc Buffer:: Renaming; changing read-onliness; copying text.
405 * Kill Buffer:: Killing buffers you no longer need.
406 * Several Buffers:: How to go through the list of all buffers
407 and operate variously on several of them.
408 * Indirect Buffers:: An indirect buffer shares the text of another buffer.
409 * Buffer Convenience:: Convenience and customization features for
414 * Basic Window:: Introduction to Emacs windows.
415 * Split Window:: New windows are made by splitting existing windows.
416 * Other Window:: Moving to another window or doing something to it.
417 * Pop Up Window:: Finding a file or buffer in another window.
418 * Force Same Window:: Forcing certain buffers to appear in the selected
419 window rather than in another window.
420 * Change Window:: Deleting windows and changing their sizes.
421 * Window Convenience:: Convenience functions for window handling.
425 * Mouse Commands:: Moving, cutting, and pasting, with the mouse.
426 * Secondary Selection:: Cutting without altering point and mark.
427 * Clipboard:: Using the clipboard for selections.
428 * Mouse References:: Using the mouse to select an item from a list.
429 * Menu Mouse Clicks:: Mouse clicks that bring up menus.
430 * Mode Line Mouse:: Mouse clicks on the mode line.
431 * Creating Frames:: Creating additional Emacs frames with various contents.
432 * Frame Commands:: Iconifying, deleting, and switching frames.
433 * Speedbar:: How to make and use a speedbar frame.
434 * Multiple Displays:: How one Emacs job can talk to several displays.
435 * Special Buffer Frames:: You can make certain buffers have their own frames.
436 * Frame Parameters:: Changing the colors and other modes of frames.
437 * Scroll Bars:: How to enable and disable scroll bars; how to use them.
438 * Wheeled Mice:: Using mouse wheels for scrolling.
439 * Drag and Drop:: Using drag and drop to open files and insert text.
440 * Menu Bars:: Enabling and disabling the menu bar.
441 * Tool Bars:: Enabling and disabling the tool bar.
442 * Dialog Boxes:: Controlling use of dialog boxes.
443 * Tooltips:: Showing "tooltips", AKA "balloon help" for active text.
444 * Mouse Avoidance:: Moving the mouse pointer out of the way.
445 * Non-Window Terminals:: Multiple frames on terminals that show only one.
446 * XTerm Mouse:: Using the mouse in an XTerm terminal emulator.
448 International Character Set Support
450 * International Chars:: Basic concepts of multibyte characters.
451 * Enabling Multibyte:: Controlling whether to use multibyte characters.
452 * Language Environments:: Setting things up for the language you use.
453 * Input Methods:: Entering text characters not on your keyboard.
454 * Select Input Method:: Specifying your choice of input methods.
455 * Multibyte Conversion:: How single-byte characters convert to multibyte.
456 * Coding Systems:: Character set conversion when you read and
457 write files, and so on.
458 * Recognize Coding:: How Emacs figures out which conversion to use.
459 * Text Coding:: Choosing conversion to use for file text.
460 * Communication Coding:: Coding systems for interprocess communication.
461 * File Name Coding:: Coding systems for file @emph{names}.
462 * Terminal Coding:: Specifying coding systems for converting
463 terminal input and output.
464 * Fontsets:: Fontsets are collections of fonts
465 that cover the whole spectrum of characters.
466 * Defining Fontsets:: Defining a new fontset.
467 * Undisplayable Characters::When characters don't display.
468 * Unibyte Mode:: You can pick one European character set
469 to use without multibyte characters.
470 * Charsets:: How Emacs groups its internal character codes.
474 * Choosing Modes:: How major modes are specified or chosen.
478 * Indentation Commands:: Various commands and techniques for indentation.
479 * Tab Stops:: You can set arbitrary "tab stops" and then
480 indent to the next tab stop when you want to.
481 * Just Spaces:: You can request indentation using just spaces.
483 Commands for Human Languages
485 * Words:: Moving over and killing words.
486 * Sentences:: Moving over and killing sentences.
487 * Paragraphs:: Moving over paragraphs.
488 * Pages:: Moving over pages.
489 * Filling:: Filling or justifying text.
490 * Case:: Changing the case of text.
491 * Text Mode:: The major modes for editing text files.
492 * Outline Mode:: Editing outlines.
493 * TeX Mode:: Editing input to the formatter TeX.
494 * HTML Mode:: Editing HTML, SGML, and XML files.
495 * Nroff Mode:: Editing input to the formatter nroff.
496 * Formatted Text:: Editing formatted text directly in WYSIWYG fashion.
497 * Text Based Tables:: Editing text-based tables in WYSIWYG fashion.
501 * Auto Fill:: Auto Fill mode breaks long lines automatically.
502 * Refill:: Keeping paragraphs filled.
503 * Fill Commands:: Commands to refill paragraphs and center lines.
504 * Fill Prefix:: Filling paragraphs that are indented
505 or in a comment, etc.
506 * Adaptive Fill:: How Emacs can determine the fill prefix automatically.
507 * Longlines:: Editing text with very long lines.
511 * Program Modes:: Major modes for editing programs.
512 * Defuns:: Commands to operate on major top-level parts
514 * Program Indent:: Adjusting indentation to show the nesting.
515 * Parentheses:: Commands that operate on parentheses.
516 * Comments:: Inserting, killing, and aligning comments.
517 * Documentation:: Getting documentation of functions you plan to call.
518 * Hideshow:: Displaying blocks selectively.
519 * Symbol Completion:: Completion on symbol names of your program or language.
520 * Glasses:: Making identifiersLikeThis more readable.
521 * Misc for Programs:: Other Emacs features useful for editing programs.
522 * C Modes:: Special commands of C, C++, Objective-C,
523 Java, and Pike modes.
524 * Asm Mode:: Asm mode and its special features.
526 Top-Level Definitions, or Defuns
528 * Left Margin Paren:: An open-paren or similar opening delimiter
529 starts a defun if it is at the left margin.
530 * Moving by Defuns:: Commands to move over or mark a major definition.
531 * Imenu:: Making buffer indexes as menus.
532 * Which Function:: Which Function mode shows which function you are in.
534 Indentation for Programs
536 * Basic Indent:: Indenting a single line.
537 * Multi-line Indent:: Commands to reindent many lines at once.
538 * Lisp Indent:: Specifying how each Lisp function should be indented.
539 * C Indent:: Extra features for indenting C and related modes.
540 * Custom C Indent:: Controlling indentation style for C and related modes.
542 Commands for Editing with Parentheses
544 * Expressions:: Expressions with balanced parentheses.
545 * Moving by Parens:: Commands for moving up, down and across
546 in the structure of parentheses.
547 * Matching:: Insertion of a close-delimiter flashes matching open.
549 Manipulating Comments
551 * Comment Commands:: Inserting, killing, and indenting comments.
552 * Multi-Line Comments:: Commands for adding and editing multi-line comments.
553 * Options for Comments::Customizing the comment features.
557 * Info Lookup:: Looking up library functions and commands
559 * Man Page:: Looking up man pages of library functions and commands.
560 * Lisp Doc:: Looking up Emacs Lisp functions, etc.
564 * Motion in C:: Commands to move by C statements, etc.
565 * Electric C:: Colon and other chars can automatically reindent.
566 * Hungry Delete:: A more powerful DEL command.
567 * Other C Commands:: Filling comments, viewing expansion of macros,
568 and other neat features.
570 Compiling and Testing Programs
572 * Compilation:: Compiling programs in languages other
573 than Lisp (C, Pascal, etc.).
574 * Compilation Mode:: The mode for visiting compiler errors.
575 * Compilation Shell:: Customizing your shell properly
576 for use in the compilation buffer.
577 * Grep Searching:: Searching with grep.
578 * Flymake:: Finding syntax errors on the fly.
579 * Debuggers:: Running symbolic debuggers for non-Lisp programs.
580 * Executing Lisp:: Various modes for editing Lisp programs,
581 with different facilities for running
583 * Lisp Libraries:: Creating Lisp programs to run in Emacs.
584 * Lisp Eval:: Executing a single Lisp expression in Emacs.
585 * Lisp Interaction:: Executing Lisp in an Emacs buffer.
586 * External Lisp:: Communicating through Emacs with a separate Lisp.
588 Running Debuggers Under Emacs
590 * Starting GUD:: How to start a debugger subprocess.
591 * Debugger Operation:: Connection between the debugger and source buffers.
592 * Commands of GUD:: Key bindings for common commands.
593 * GUD Customization:: Defining your own commands for GUD.
594 * GDB Graphical Interface:: An enhanced mode that uses GDB features to
595 implement a graphical debugging environment through
598 Maintaining Large Programs
600 * Change Log:: Maintaining a change history for your program.
601 * Format of ChangeLog:: What the change log file looks like.
602 * Tags:: Go direct to any function in your program in one
603 command. Tags remembers which file it is in.
607 * Tag Syntax:: Tag syntax for various types of code and text files.
608 * Create Tags Table:: Creating a tags table with @code{etags}.
609 * Etags Regexps:: Create arbitrary tags using regular expressions.
610 * Select Tags Table:: How to visit a tags table.
611 * Find Tag:: Commands to find the definition of a specific tag.
612 * Tags Search:: Using a tags table for searching and replacing.
613 * List Tags:: Listing and finding tags defined in a file.
617 * Abbrev Concepts:: Fundamentals of defined abbrevs.
618 * Defining Abbrevs:: Defining an abbrev, so it will expand when typed.
619 * Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.
620 * Editing Abbrevs:: Viewing or editing the entire list of defined abbrevs.
621 * Saving Abbrevs:: Saving the entire list of abbrevs for another session.
622 * Dynamic Abbrevs:: Abbreviations for words already in the buffer.
623 * Dabbrev Customization:: What is a word, for dynamic abbrevs. Case handling.
627 * Mail Format:: Format of the mail being composed.
628 * Mail Headers:: Details of permitted mail header fields.
629 * Mail Aliases:: Abbreviating and grouping mail addresses.
630 * Mail Mode:: Special commands for editing mail being composed.
631 * Mail Amusements:: Distract the NSA's attention; add a fortune to a msg.
632 * Mail Methods:: Using alternative mail-composition methods.
634 Reading Mail with Rmail
636 * Rmail Basics:: Basic concepts of Rmail, and simple use.
637 * Rmail Scrolling:: Scrolling through a message.
638 * Rmail Motion:: Moving to another message.
639 * Rmail Deletion:: Deleting and expunging messages.
640 * Rmail Inbox:: How mail gets into the Rmail file.
641 * Rmail Files:: Using multiple Rmail files.
642 * Rmail Output:: Copying message out to files.
643 * Rmail Labels:: Classifying messages by labeling them.
644 * Rmail Attributes:: Certain standard labels, called attributes.
645 * Rmail Reply:: Sending replies to messages you are viewing.
646 * Rmail Summary:: Summaries show brief info on many messages.
647 * Rmail Sorting:: Sorting messages in Rmail.
648 * Rmail Display:: How Rmail displays a message; customization.
649 * Rmail Coding:: How Rmail handles decoding character sets.
650 * Rmail Editing:: Editing message text and headers in Rmail.
651 * Rmail Digest:: Extracting the messages from a digest message.
652 * Out of Rmail:: Converting an Rmail file to mailbox format.
653 * Rmail Rot13:: Reading messages encoded in the rot13 code.
654 * Movemail:: More details of fetching new mail.
655 * Remote Mailboxes:: Retrieving Mail from Remote Mailboxes.
656 * Other Mailbox Formats:: Retrieving Mail from Local Mailboxes in
659 Dired, the Directory Editor
661 * Dired Enter:: How to invoke Dired.
662 * Dired Navigation:: How to move in the Dired buffer.
663 * Dired Deletion:: Deleting files with Dired.
664 * Flagging Many Files:: Flagging files based on their names.
665 * Dired Visiting:: Other file operations through Dired.
666 * Marks vs Flags:: Flagging for deletion vs marking.
667 * Operating on Files:: How to copy, rename, print, compress, etc.
668 either one file or several files.
669 * Shell Commands in Dired:: Running a shell command on the marked files.
670 * Transforming File Names:: Using patterns to rename multiple files.
671 * Comparison in Dired:: Running `diff' by way of Dired.
672 * Subdirectories in Dired:: Adding subdirectories to the Dired buffer.
673 * Subdirectory Motion:: Moving across subdirectories, and up and down.
674 * Hiding Subdirectories:: Making subdirectories visible or invisible.
675 * Dired Updating:: Discarding lines for files of no interest.
676 * Dired and Find:: Using `find' to choose the files for Dired.
677 * Wdired:: Operating on files by editing the Dired buffer.
678 * Misc Dired Features:: Various other features.
680 The Calendar and the Diary
682 * Calendar Motion:: Moving through the calendar; selecting a date.
683 * Scroll Calendar:: Bringing earlier or later months onto the screen.
684 * Counting Days:: How many days are there between two dates?
685 * General Calendar:: Exiting or recomputing the calendar.
686 * LaTeX Calendar:: Print a calendar using LaTeX.
687 * Holidays:: Displaying dates of holidays.
688 * Sunrise/Sunset:: Displaying local times of sunrise and sunset.
689 * Lunar Phases:: Displaying phases of the moon.
690 * Other Calendars:: Converting dates to other calendar systems.
691 * Diary:: Displaying events from your diary.
692 * Appointments:: Reminders when it's time to do something.
693 * Importing Diary:: Converting diary events to/from other formats.
694 * Daylight Savings:: How to specify when daylight savings time is active.
695 * Time Intervals:: Keeping track of time intervals.
697 Movement in the Calendar
699 * Calendar Unit Motion:: Moving by days, weeks, months, and years.
700 * Move to Beginning or End:: Moving to start/end of weeks, months, and years.
701 * Specified Dates:: Moving to the current date or another
704 Conversion To and From Other Calendars
706 * Calendar Systems:: The calendars Emacs understands
707 (aside from Gregorian).
708 * To Other Calendar:: Converting the selected date to various calendars.
709 * From Other Calendar:: Moving to a date specified in another calendar.
710 * Mayan Calendar:: Moving to a date specified in a Mayan calendar.
714 * Displaying the Diary:: Viewing diary entries and associated calendar dates.
715 * Format of Diary File:: Entering events in your diary.
716 * Date Formats:: Various ways you can specify dates.
717 * Adding to Diary:: Commands to create diary entries.
718 * Special Diary Entries:: Anniversaries, blocks of dates, cyclic entries, etc.
722 * Buffers of Gnus:: The group, summary, and article buffers.
723 * Gnus Startup:: What you should know about starting Gnus.
724 * Summary of Gnus:: A short description of the basic Gnus commands.
726 Running Shell Commands from Emacs
728 * Single Shell:: How to run one shell command and return.
729 * Interactive Shell:: Permanent shell taking input via Emacs.
730 * Shell Mode:: Special Emacs commands used with permanent shell.
731 * Shell Prompts:: Two ways to recognize shell prompts.
732 * Shell History:: Repeating previous commands in a shell buffer.
733 * Directory Tracking:: Keeping track when the subshell changes directory.
734 * Shell Options:: Options for customizing Shell mode.
735 * Terminal emulator:: An Emacs window as a terminal emulator.
736 * Term Mode:: Special Emacs commands used in Term mode.
737 * Paging in Term:: Paging in the terminal emulator.
738 * Remote Host:: Connecting to another computer.
740 Using Emacs as a Server
742 * Invoking emacsclient:: Emacs client startup options.
744 Hyperlinking and Navigation Features
746 * Browse-URL:: Following URLs.
747 * Goto-address:: Activating URLs.
748 * FFAP:: Finding files etc. at point.
752 * Minor Modes:: Each minor mode is one feature you can turn on
753 independently of any others.
754 * Easy Customization:: Convenient way to browse and change user options.
755 * Variables:: Many Emacs commands examine Emacs variables
756 to decide what to do; by setting variables,
757 you can control their functioning.
758 * Key Bindings:: The keymaps say what command each key runs.
759 By changing them, you can "redefine keys".
760 * Syntax:: The syntax table controls how words and
761 expressions are parsed.
762 * Init File:: How to write common customizations in the
767 * Examining:: Examining or setting one variable's value.
768 * Hooks:: Hook variables let you specify programs for parts
769 of Emacs to run on particular occasions.
770 * Locals:: Per-buffer values of variables.
771 * File Variables:: How files can specify variable values.
773 Customizing Key Bindings
775 * Keymaps:: Generalities. The global keymap.
776 * Prefix Keymaps:: Keymaps for prefix keys.
777 * Local Keymaps:: Major and minor modes have their own keymaps.
778 * Minibuffer Maps:: The minibuffer uses its own local keymaps.
779 * Rebinding:: How to redefine one key's meaning conveniently.
780 * Init Rebinding:: Rebinding keys with your init file, @file{.emacs}.
781 * Function Keys:: Rebinding terminal function keys.
782 * Named ASCII Chars:: Distinguishing @key{TAB} from @kbd{C-i}, and so on.
783 * Non-ASCII Rebinding:: Rebinding non-@acronym{ASCII} characters such as Latin-1.
784 * Mouse Buttons:: Rebinding mouse buttons in Emacs.
785 * Disabling:: Disabling a command means confirmation is required
786 before it can be executed. This is done to protect
787 beginners from surprises.
789 The Init File, @file{~/.emacs}
791 * Init Syntax:: Syntax of constants in Emacs Lisp.
792 * Init Examples:: How to do some things with an init file.
793 * Terminal Init:: Each terminal type can have an init file.
794 * Find Init:: How Emacs finds the init file.
796 Dealing with Emacs Trouble
798 * DEL Does Not Delete:: What to do if @key{DEL} doesn't delete.
799 * Stuck Recursive:: `[...]' in mode line around the parentheses.
800 * Screen Garbled:: Garbage on the screen.
801 * Text Garbled:: Garbage in the text.
802 * Unasked-for Search:: Spontaneous entry to incremental search.
803 * Memory Full:: How to cope when you run out of memory.
804 * After a Crash:: Recovering editing in an Emacs session that crashed.
805 * Emergency Escape:: Emergency escape---
806 What to do if Emacs stops responding.
807 * Total Frustration:: When you are at your wits' end.
811 * Bug Criteria:: Have you really found a bug?
812 * Understanding Bug Reporting:: How to report a bug effectively.
813 * Checklist:: Steps to follow for a good bug report.
814 * Sending Patches:: How to send a patch for GNU Emacs.
816 Command Line Arguments for Emacs Invocation
818 * Action Arguments:: Arguments to visit files, load libraries,
820 * Initial Options:: Arguments that take effect while starting Emacs.
821 * Command Example:: Examples of using command line arguments.
822 * Resume Arguments:: Specifying arguments when you resume a running Emacs.
823 * Environment:: Environment variables that Emacs uses.
824 * Display X:: Changing the default display and using remote login.
825 * Font X:: Choosing a font for text, under X.
826 * Colors:: Choosing display colors.
827 * Window Size X:: Start-up window size, under X.
828 * Borders X:: Internal and external borders, under X.
829 * Title X:: Specifying the initial frame's title.
830 * Icons X:: Choosing what sort of icon to use, under X.
831 * Misc X:: Other display options.
833 Environment Variables
835 * General Variables:: Environment variables that all versions of Emacs use.
836 * Misc Variables:: Certain system specific variables.
837 * MS-Windows Registry:: An alternative to the environment on MS-Windows.
839 X Options and Resources
841 * Resources:: Using X resources with Emacs (in general).
842 * Table of Resources:: Table of specific X resources that affect Emacs.
843 * Face Resources:: X resources for customizing faces.
844 * Lucid Resources:: X resources for Lucid menus.
845 * LessTif Resources:: X resources for LessTif and Motif menus.
846 * GTK resources:: Resources for GTK widgets.
850 * Mac Input:: Keyboard and mouse input on Mac.
851 * Mac International:: International character sets on Mac.
852 * Mac Environment Variables:: Setting environment variables for Emacs.
853 * Mac Directories:: Volumes and directories on Mac.
854 * Mac Font Specs:: Specifying fonts on Mac.
855 * Mac Functions:: Mac-specific Lisp functions.
857 MS-DOS and Windows 95/98/NT
859 * MS-DOS Keyboard:: Keyboard usage on MS-DOS.
860 * MS-DOS Mouse:: Mouse usage on MS-DOS.
861 * MS-DOS Display:: Fonts, frames and display size on MS-DOS.
862 * MS-DOS File Names:: File-name conventions on MS-DOS.
863 * Text and Binary:: Text files on MS-DOS use CRLF to separate lines.
864 * MS-DOS Printing:: How to specify the printer on MS-DOS.
865 * MS-DOS and MULE:: Support for internationalization on MS-DOS.
866 * MS-DOS Processes:: Running subprocesses on MS-DOS.
867 * Windows Processes:: Running subprocesses on Windows.
868 * Windows System Menu:: Controlling what the ALT key does.
874 This manual documents the use and simple customization of the Emacs
875 editor. The reader is not expected to be a programmer; simple
876 customizations do not require programming skill. The user who is not
877 interested in customizing can ignore the scattered customization hints.
879 This is primarily a reference manual, but can also be used as a
880 primer. For complete beginners, it is a good idea to start with the
881 on-line, learn-by-doing tutorial, before reading the manual. To run the
882 tutorial, start Emacs and type @kbd{C-h t}. This way you can learn
883 Emacs by using Emacs on a specially designed file which describes
884 commands, tells you when to try them, and then explains the results you
887 On first reading, just skim chapters 1 and 2, which describe the
888 notational conventions of the manual and the general appearance of the
889 Emacs display screen. Note which questions are answered in these
890 chapters, so you can refer back later. After reading chapter 4, you
891 should practice the commands there. The next few chapters describe
892 fundamental techniques and concepts that are used constantly. You need
893 to understand them thoroughly, experimenting with them if necessary.
895 Chapters 14 through 19 describe intermediate-level features that are
896 useful for all kinds of editing. Chapter 20 and following chapters
897 describe features that you may or may not want to use; read those
898 chapters when you need them.
900 Read the Trouble chapter if Emacs does not seem to be working
901 properly. It explains how to cope with some common problems
902 (@pxref{Lossage}), as well as when and how to report Emacs bugs
905 To find the documentation on a particular command, look in the index.
906 Keys (character commands) and command names have separate indexes. There
907 is also a glossary, with a cross reference for each term.
909 This manual is available as a printed book and also as an Info file.
910 The Info file is for on-line perusal with the Info program, which will
911 be the principal way of viewing documentation on-line in the GNU system.
912 Both the Info file and the Info program itself are distributed along
913 with GNU Emacs. The Info file and the printed book contain
914 substantially the same text and are generated from the same source
915 files, which are also distributed along with GNU Emacs.
917 GNU Emacs is a member of the Emacs editor family. There are many
918 Emacs editors, all sharing common principles of organization. For
919 information on the underlying philosophy of Emacs and the lessons
920 learned from its development, see @cite{Emacs, the Extensible,
921 Customizable Self-Documenting Display Editor}, available from
922 @url{ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-519A.pdf}.
924 This edition of the manual is intended for use with GNU Emacs
925 installed on GNU and Unix systems. GNU Emacs can also be used on VMS,
926 MS-DOS (also called MS-DOG), Microsoft Windows, and Macintosh systems.
927 Those systems use different file name syntax; in addition, VMS and
928 MS-DOS do not support all GNU Emacs features. @xref{MS-DOS}, for
929 information about using Emacs on MS-DOS and Windows. @xref{Mac OS},
930 for information about using Emacs on Macintosh. We don't try to
931 describe VMS usage in this manual.
934 @node Distrib, Intro, Top, Top
935 @unnumbered Distribution
937 GNU Emacs is @dfn{free software}; this means that everyone is free to
938 use it and free to redistribute it on certain conditions. GNU Emacs
939 is not in the public domain; it is copyrighted and there are
940 restrictions on its distribution, but these restrictions are designed
941 to permit everything that a good cooperating citizen would want to do.
942 What is not allowed is to try to prevent others from further sharing
943 any version of GNU Emacs that they might get from you. The precise
944 conditions are found in the GNU General Public License that comes with
945 Emacs and also appears in this manual@footnote{This manual is itself
946 covered by the GNU Free Documentation License. This license is
947 similar in spirit to the General Public License, but is more suitable
948 for documentation. @xref{GNU Free Documentation License}.}.
951 One way to get a copy of GNU Emacs is from someone else who has it.
952 You need not ask for our permission to do so, or tell any one else;
953 just copy it. If you have access to the Internet, you can get the
954 latest distribution version of GNU Emacs by anonymous FTP; see
955 @url{http://www.gnu.org/software/emacs} on our website for more
958 You may also receive GNU Emacs when you buy a computer. Computer
959 manufacturers are free to distribute copies on the same terms that apply to
960 everyone else. These terms require them to give you the full sources,
961 including whatever changes they may have made, and to permit you to
962 redistribute the GNU Emacs received from them under the usual terms of the
963 General Public License. In other words, the program must be free for you
964 when you get it, not just free for the manufacturer.
966 You can also order copies of GNU Emacs from the Free Software
967 Foundation. This is a convenient and reliable way to get a copy; it is
968 also a good way to help fund our work. We also sell hardcopy versions
969 of this manual and @cite{An Introduction to Programming in Emacs Lisp},
970 by Robert J. Chassell. You can find an order form on our web site at
971 @url{http://www.gnu.org/order/order.html}. For further information,
975 Free Software Foundation
976 51 Franklin Street, Fifth Floor
977 Boston, MA 02110-1301
981 The income from distribution fees goes to support the foundation's
982 purpose: the development of new free software, and improvements to our
983 existing programs including GNU Emacs.
985 If you find GNU Emacs useful, please @strong{send a donation} to the
986 Free Software Foundation to support our work. Donations to the Free
987 Software Foundation are tax deductible in the US. If you use GNU Emacs
988 at your workplace, please suggest that the company make a donation. If
989 company policy is unsympathetic to the idea of donating to charity, you
990 might instead suggest ordering a CD-ROM from the Foundation
991 occasionally, or subscribing to periodic updates.
994 @node Acknowledgments, Intro, Distrib, Top
995 @unnumberedsec Acknowledgments
997 Contributors to GNU Emacs include Per Abrahamsen, Tomas Abrahamsson,
998 Jay K.@: Adams, Joe Arceneaux, Miles Bader, David Bakhash, Eli
999 Barzilay, Steven L.@: Baur, Boaz Ben-Zvi, Ray Blaak, Jim Blandy, Per
1000 Bothner, Terrence Brannon, Frank Bresz, Peter Breton, Emmanuel Briot,
1001 Kevin Broadey, Vincent Broman, David M.@: Brown, Georges Brun-Cottan,
1002 W@l{}odek Bzyl, Bill Carpenter, Per Cederqvist, Hans Chalupsky, Chris
1003 Chase, Bob Chassell, Andrew Choi, James Clark, Mike Clarkson, Glynn
1004 Clements, Andrew Csillag, Doug Cutting, Michael DeCorte, Gary Delp,
1005 Matthieu Devin, Eri Ding, Jan Dj@"{a}rv, Carsten Dominik, Scott
1006 Draves, Benjamin Drieu, Viktor Dukhovni, John Eaton, Rolf Ebert,
1007 Stephen Eglen, Torbj@"orn Einarsson, Tsugutomo Enami, Hans Henrik
1008 Eriksen, Michael Ernst, Ata Etemadi, Frederick Farnbach, Oscar
1009 Figueiredo, Fred Fish, Karl Fogel, Gary Foster, Noah Friedman,
1010 Hallvard Furuseth, Keith Gabryelski, Kevin Gallagher, Kevin Gallo,
1011 Juan Le@'{o}n Lahoz Garc@'{i}a, Howard Gayle, Stephen Gildea, Julien
1012 Gilles, David Gillespie, Bob Glickstein, Boris Goldowsky, Michelangelo
1013 Grigni, Odd Gripenstam, Kai Gro@ss{}johann, Michael Gschwind, Henry
1014 Guillaume, Doug Gwyn, Ken'ichi Handa, Chris Hanson, K. Shane Hartman,
1015 John Heidemann, Jon K.@: Hellan, Markus Heritsch, Karl Heuer, Manabu
1016 Higashida, Anders Holst, Kurt Hornik, Tom Houlder, Denis Howe, Lars
1017 Ingebrigtsen, Andrew Innes, Seiichiro Inoue, Ulf Jasper, Michael
1018 K. Johnson, Kyle Jones, Terry Jones, Simon Josefsson, Tomoji Kagatani,
1019 Brewster Kahle, David Kaufman, Henry Kautz, Taichi Kawabata, Howard
1020 Kaye, Michael Kifer, Richard King, Peter Kleiweg, Larry K.@: Kolodney,
1021 Pavel Kobiakov, Larry K.@: Kolodney, David M.@: Koppelman, Koseki
1022 Yoshinori, Robert Krawitz, Sebastian Kremer, Ryszard Kubiak, Geoff
1023 Kuenning, David K@aa{}gedal, Daniel LaLiberte, Aaron Larson, James
1024 R.@: Larus, Vinicius Jose Latorre, Frederic Lepied, Peter Liljenberg,
1025 Lars Lindberg, Chris Lindblad, Anders Lindgren, Thomas Link, Dave
1026 Love, Eric Ludlam, Alan Mackenzie, Christopher J.@: Madsen,
1027 Neil M.@: Mager, Ken Manheimer, Bill Mann, Brian Marick, Simon
1028 Marshall, Bengt Martensson, Charlie Martin, Thomas May, Roland McGrath,
1029 Will Mengarini, David Megginson, Wayne Mesard, Brad Miller, Richard
1030 Mlynarik, Gerd Moellmann, Stefan Monnier, Morioka Tomohiko, Keith
1031 Moore, Sen Nagata, Erik Naggum, Thomas Neumann, Thien-Thi Nguyen, Mike
1032 Newton, Jurgen Nickelsen, Dan Nicolaescu, Jeff Norden, Andrew Norman,
1033 Alexandre Oliva, Bob Olson, Takaaki Ota, Pieter E.@: J.@: Pareit,
1034 David Pearson, Jeff Peck, Damon Anton Permezel, Tom Perrine, William
1035 M.@: Perry, Per Persson, Jens Petersen, Daniel Pfeiffer, Richard
1036 L.@: Pieri, Fred Pierresteguy, Christian Plaunt, David Ponce, Francesco
1037 A. Potorti, Michael D. Prange, Mukesh Prasad, Marko Rahamaa, Ashwin
1038 Ram, Eric S. Raymond, Paul Reilly, Edward M. Reingold, Alex Rezinsky,
1039 Rob Riepel, Nick Roberts, Roland B.@: Roberts, John Robinson, Danny
1040 Roozendaal, William Rosenblatt, Guillermo J.@: Rozas, Ivar Rummelhoff,
1041 Jason Rumney, Wolfgang Rupprecht, Kevin Ryde, James B. Salem, Masahiko
1042 Sato, Holger Schauer, William Schelter, Ralph Schleicher, Gregor
1043 Schmid, Michael Schmidt, Ronald S. Schnell, Philippe Schnoebelen, Jan
1044 Schormann, Alex Schroeder, Stephen Schoef, Randal Schwartz, Oliver
1045 Seidel, Manuel Serrano, Hovav Shacham, Stanislav Shalunov, Mark
1046 Shapiro, Richard Sharman, Olin Shivers, Espen Skoglund, Rick Sladkey,
1047 Lynn Slater, Chris Smith, David Smith, Paul D.@: Smith, Andre Spiegel,
1048 Michael Staats, William Sommerfeld, Michael Staats, Sam Steingold, Ake
1049 Stenhoff, Peter Stephenson, Ken Stevens, Jonathan Stigelman, Martin
1050 Stjernholm, Kim F.@: Storm, Steve Strassman, Olaf Sylvester, Naoto
1051 Takahashi, Jean-Philippe Theberge, Jens T.@: Berger Thielemann,
1052 Spencer Thomas, Jim Thompson, Tom Tromey, Daiki Ueno, Masanobu Umeda,
1053 Rajesh Vaidheeswarran, Neil W.@: Van Dyke, Didier Verna, Ulrik Vieth,
1054 Geoffrey Voelker, Johan Vromans, Inge Wallin, Colin Walters, Barry
1055 Warsaw, Morten Welinder, Joseph Brian Wells, Rodney Whitby, John
1056 Wiegley, Ed Wilkinson, Mike Williams, Bill Wohler, Steven A. Wood,
1057 Dale R.@: Worley, Francis J.@: Wright, Felix S. T. Wu, Tom Wurgler,
1058 Masatake Yamato, Jonathan Yavner, Ilya Zakharevich, Milan Zamazal,
1059 Victor Zandy, Eli Zaretskii, Jamie Zawinski, Shenghuo Zhu, Ian
1060 T.@: Zimmermann, Reto Zimmermann, Neal Ziring, and Detlev Zundel.
1063 @node Intro, Glossary, Distrib, Top
1064 @unnumbered Introduction
1066 You are reading about GNU Emacs, the GNU incarnation of the advanced,
1067 self-documenting, customizable, extensible real-time display editor Emacs.
1068 (The `G' in `GNU' is not silent.)
1070 We say that Emacs is a @dfn{display} editor because normally the text
1071 being edited is visible on the screen and is updated automatically as you
1072 type your commands. @xref{Screen,Display}.
1074 We call it a @dfn{real-time} editor because the display is updated very
1075 frequently, usually after each character or pair of characters you
1076 type. This minimizes the amount of information you must keep in your
1077 head as you edit. @xref{Basic,Real-time,Basic Editing}.
1079 We call Emacs advanced because it provides facilities that go beyond
1080 simple insertion and deletion: controlling subprocesses; automatic
1081 indentation of programs; viewing two or more files at once; editing
1082 formatted text; and dealing in terms of characters, words, lines,
1083 sentences, paragraphs, and pages, as well as expressions and comments in
1084 several different programming languages.
1086 @dfn{Self-documenting} means that at any time you can type a special
1087 character, @kbd{Control-h}, to find out what your options are. You can
1088 also use it to find out what any command does, or to find all the commands
1089 that pertain to a topic. @xref{Help}.
1091 @dfn{Customizable} means that you can change the definitions of Emacs
1092 commands in little ways. For example, if you use a programming language in
1093 which comments start with @samp{<**} and end with @samp{**>}, you can tell
1094 the Emacs comment manipulation commands to use those strings
1095 (@pxref{Comments}). Another sort of customization is rearrangement of the
1096 command set. For example, if you prefer the four basic cursor motion
1097 commands (up, down, left and right) on keys in a diamond pattern on the
1098 keyboard, you can rebind the keys that way. @xref{Customization}.
1100 @dfn{Extensible} means that you can go beyond simple customization and
1101 write entirely new commands, programs in the Lisp language to be run by
1102 Emacs's own Lisp interpreter. Emacs is an ``on-line extensible''
1103 system, which means that it is divided into many functions that call
1104 each other, any of which can be redefined in the middle of an editing
1105 session. Almost any part of Emacs can be replaced without making a
1106 separate copy of all of Emacs. Most of the editing commands of Emacs
1107 are written in Lisp; the few exceptions could have been written
1108 in Lisp but are written in C for efficiency. Although only a programmer
1109 can write an extension, anybody can use it afterward. @xref{Top,
1110 Emacs Lisp Intro, Preface, eintr, An Introduction to Programming in
1111 Emacs Lisp}, if you want to learn Emacs Lisp programming.
1113 When running on a graphical display, Emacs provides its own menus
1114 and convenient handling of mouse buttons. But Emacs provides many of
1115 the benefits of a graphical display even on a text-only terminal. For
1116 instance, it can highlight parts of a file, display and edit several
1117 files at once, move text between files, and edit files while running
1120 @include screen.texi
1121 @include commands.texi
1122 @include entering.texi
1128 @include killing.texi
1130 @include display.texi
1131 @include search.texi
1133 @include kmacro.texi
1135 @include buffers.texi
1136 @include windows.texi
1137 @include frames.texi
1140 @include indent.texi
1142 @include programs.texi
1143 @include building.texi
1144 @include maintaining.texi
1145 @include abbrevs.texi
1146 @include sending.texi
1149 @include calendar.texi
1151 @include custom.texi
1152 @include trouble.texi
1154 @node Copying, GNU Free Documentation License, Service, Top
1155 @appendix GNU GENERAL PUBLIC LICENSE
1156 @center Version 2, June 1991
1159 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
1160 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
1162 Everyone is permitted to copy and distribute verbatim copies
1163 of this license document, but changing it is not allowed.
1166 @unnumberedsec Preamble
1168 The licenses for most software are designed to take away your
1169 freedom to share and change it. By contrast, the GNU General Public
1170 License is intended to guarantee your freedom to share and change free
1171 software---to make sure the software is free for all its users. This
1172 General Public License applies to most of the Free Software
1173 Foundation's software and to any other program whose authors commit to
1174 using it. (Some other Free Software Foundation software is covered by
1175 the GNU Library General Public License instead.) You can apply it to
1178 When we speak of free software, we are referring to freedom, not
1179 price. Our General Public Licenses are designed to make sure that you
1180 have the freedom to distribute copies of free software (and charge for
1181 this service if you wish), that you receive source code or can get it
1182 if you want it, that you can change the software or use pieces of it
1183 in new free programs; and that you know you can do these things.
1185 To protect your rights, we need to make restrictions that forbid
1186 anyone to deny you these rights or to ask you to surrender the rights.
1187 These restrictions translate to certain responsibilities for you if you
1188 distribute copies of the software, or if you modify it.
1190 For example, if you distribute copies of such a program, whether
1191 gratis or for a fee, you must give the recipients all the rights that
1192 you have. You must make sure that they, too, receive or can get the
1193 source code. And you must show them these terms so they know their
1196 We protect your rights with two steps: (1) copyright the software, and
1197 (2) offer you this license which gives you legal permission to copy,
1198 distribute and/or modify the software.
1200 Also, for each author's protection and ours, we want to make certain
1201 that everyone understands that there is no warranty for this free
1202 software. If the software is modified by someone else and passed on, we
1203 want its recipients to know that what they have is not the original, so
1204 that any problems introduced by others will not reflect on the original
1205 authors' reputations.
1207 Finally, any free program is threatened constantly by software
1208 patents. We wish to avoid the danger that redistributors of a free
1209 program will individually obtain patent licenses, in effect making the
1210 program proprietary. To prevent this, we have made it clear that any
1211 patent must be licensed for everyone's free use or not licensed at all.
1213 The precise terms and conditions for copying, distribution and
1214 modification follow.
1217 @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1220 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1225 This License applies to any program or other work which contains
1226 a notice placed by the copyright holder saying it may be distributed
1227 under the terms of this General Public License. The ``Program,'' below,
1228 refers to any such program or work, and a ``work based on the Program''
1229 means either the Program or any derivative work under copyright law:
1230 that is to say, a work containing the Program or a portion of it,
1231 either verbatim or with modifications and/or translated into another
1232 language. (Hereinafter, translation is included without limitation in
1233 the term ``modification.'') Each licensee is addressed as ``you.''
1235 Activities other than copying, distribution and modification are not
1236 covered by this License; they are outside its scope. The act of
1237 running the Program is not restricted, and the output from the Program
1238 is covered only if its contents constitute a work based on the
1239 Program (independent of having been made by running the Program).
1240 Whether that is true depends on what the Program does.
1243 You may copy and distribute verbatim copies of the Program's
1244 source code as you receive it, in any medium, provided that you
1245 conspicuously and appropriately publish on each copy an appropriate
1246 copyright notice and disclaimer of warranty; keep intact all the
1247 notices that refer to this License and to the absence of any warranty;
1248 and give any other recipients of the Program a copy of this License
1249 along with the Program.
1251 You may charge a fee for the physical act of transferring a copy, and
1252 you may at your option offer warranty protection in exchange for a fee.
1255 You may modify your copy or copies of the Program or any portion
1256 of it, thus forming a work based on the Program, and copy and
1257 distribute such modifications or work under the terms of Section 1
1258 above, provided that you also meet all of these conditions:
1262 You must cause the modified files to carry prominent notices
1263 stating that you changed the files and the date of any change.
1266 You must cause any work that you distribute or publish, that in
1267 whole or in part contains or is derived from the Program or any
1268 part thereof, to be licensed as a whole at no charge to all third
1269 parties under the terms of this License.
1272 If the modified program normally reads commands interactively
1273 when run, you must cause it, when started running for such
1274 interactive use in the most ordinary way, to print or display an
1275 announcement including an appropriate copyright notice and a
1276 notice that there is no warranty (or else, saying that you provide
1277 a warranty) and that users may redistribute the program under
1278 these conditions, and telling the user how to view a copy of this
1279 License. (Exception: if the Program itself is interactive but
1280 does not normally print such an announcement, your work based on
1281 the Program is not required to print an announcement.)
1284 These requirements apply to the modified work as a whole. If
1285 identifiable sections of that work are not derived from the Program,
1286 and can be reasonably considered independent and separate works in
1287 themselves, then this License, and its terms, do not apply to those
1288 sections when you distribute them as separate works. But when you
1289 distribute the same sections as part of a whole which is a work based
1290 on the Program, the distribution of the whole must be on the terms of
1291 this License, whose permissions for other licensees extend to the
1292 entire whole, and thus to each and every part regardless of who wrote it.
1294 Thus, it is not the intent of this section to claim rights or contest
1295 your rights to work written entirely by you; rather, the intent is to
1296 exercise the right to control the distribution of derivative or
1297 collective works based on the Program.
1299 In addition, mere aggregation of another work not based on the Program
1300 with the Program (or with a work based on the Program) on a volume of
1301 a storage or distribution medium does not bring the other work under
1302 the scope of this License.
1305 You may copy and distribute the Program (or a work based on it,
1306 under Section 2) in object code or executable form under the terms of
1307 Sections 1 and 2 above provided that you also do one of the following:
1311 Accompany it with the complete corresponding machine-readable
1312 source code, which must be distributed under the terms of Sections
1313 1 and 2 above on a medium customarily used for software interchange; or,
1316 Accompany it with a written offer, valid for at least three
1317 years, to give any third party, for a charge no more than your
1318 cost of physically performing source distribution, a complete
1319 machine-readable copy of the corresponding source code, to be
1320 distributed under the terms of Sections 1 and 2 above on a medium
1321 customarily used for software interchange; or,
1324 Accompany it with the information you received as to the offer
1325 to distribute corresponding source code. (This alternative is
1326 allowed only for noncommercial distribution and only if you
1327 received the program in object code or executable form with such
1328 an offer, in accord with Subsection b above.)
1331 The source code for a work means the preferred form of the work for
1332 making modifications to it. For an executable work, complete source
1333 code means all the source code for all modules it contains, plus any
1334 associated interface definition files, plus the scripts used to
1335 control compilation and installation of the executable. However, as a
1336 special exception, the source code distributed need not include
1337 anything that is normally distributed (in either source or binary
1338 form) with the major components (compiler, kernel, and so on) of the
1339 operating system on which the executable runs, unless that component
1340 itself accompanies the executable.
1342 If distribution of executable or object code is made by offering
1343 access to copy from a designated place, then offering equivalent
1344 access to copy the source code from the same place counts as
1345 distribution of the source code, even though third parties are not
1346 compelled to copy the source along with the object code.
1349 You may not copy, modify, sublicense, or distribute the Program
1350 except as expressly provided under this License. Any attempt
1351 otherwise to copy, modify, sublicense or distribute the Program is
1352 void, and will automatically terminate your rights under this License.
1353 However, parties who have received copies, or rights, from you under
1354 this License will not have their licenses terminated so long as such
1355 parties remain in full compliance.
1358 You are not required to accept this License, since you have not
1359 signed it. However, nothing else grants you permission to modify or
1360 distribute the Program or its derivative works. These actions are
1361 prohibited by law if you do not accept this License. Therefore, by
1362 modifying or distributing the Program (or any work based on the
1363 Program), you indicate your acceptance of this License to do so, and
1364 all its terms and conditions for copying, distributing or modifying
1365 the Program or works based on it.
1368 Each time you redistribute the Program (or any work based on the
1369 Program), the recipient automatically receives a license from the
1370 original licensor to copy, distribute or modify the Program subject to
1371 these terms and conditions. You may not impose any further
1372 restrictions on the recipients' exercise of the rights granted herein.
1373 You are not responsible for enforcing compliance by third parties to
1377 If, as a consequence of a court judgment or allegation of patent
1378 infringement or for any other reason (not limited to patent issues),
1379 conditions are imposed on you (whether by court order, agreement or
1380 otherwise) that contradict the conditions of this License, they do not
1381 excuse you from the conditions of this License. If you cannot
1382 distribute so as to satisfy simultaneously your obligations under this
1383 License and any other pertinent obligations, then as a consequence you
1384 may not distribute the Program at all. For example, if a patent
1385 license would not permit royalty-free redistribution of the Program by
1386 all those who receive copies directly or indirectly through you, then
1387 the only way you could satisfy both it and this License would be to
1388 refrain entirely from distribution of the Program.
1390 If any portion of this section is held invalid or unenforceable under
1391 any particular circumstance, the balance of the section is intended to
1392 apply and the section as a whole is intended to apply in other
1395 It is not the purpose of this section to induce you to infringe any
1396 patents or other property right claims or to contest validity of any
1397 such claims; this section has the sole purpose of protecting the
1398 integrity of the free software distribution system, which is
1399 implemented by public license practices. Many people have made
1400 generous contributions to the wide range of software distributed
1401 through that system in reliance on consistent application of that
1402 system; it is up to the author/donor to decide if he or she is willing
1403 to distribute software through any other system and a licensee cannot
1406 This section is intended to make thoroughly clear what is believed to
1407 be a consequence of the rest of this License.
1410 If the distribution and/or use of the Program is restricted in
1411 certain countries either by patents or by copyrighted interfaces, the
1412 original copyright holder who places the Program under this License
1413 may add an explicit geographical distribution limitation excluding
1414 those countries, so that distribution is permitted only in or among
1415 countries not thus excluded. In such case, this License incorporates
1416 the limitation as if written in the body of this License.
1419 The Free Software Foundation may publish revised and/or new versions
1420 of the General Public License from time to time. Such new versions will
1421 be similar in spirit to the present version, but may differ in detail to
1422 address new problems or concerns.
1424 Each version is given a distinguishing version number. If the Program
1425 specifies a version number of this License which applies to it and ``any
1426 later version,'' you have the option of following the terms and conditions
1427 either of that version or of any later version published by the Free
1428 Software Foundation. If the Program does not specify a version number of
1429 this License, you may choose any version ever published by the Free Software
1433 If you wish to incorporate parts of the Program into other free
1434 programs whose distribution conditions are different, write to the author
1435 to ask for permission. For software which is copyrighted by the Free
1436 Software Foundation, write to the Free Software Foundation; we sometimes
1437 make exceptions for this. Our decision will be guided by the two goals
1438 of preserving the free status of all derivatives of our free software and
1439 of promoting the sharing and reuse of software generally.
1442 @heading NO WARRANTY
1449 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
1450 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW@. EXCEPT WHEN
1451 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
1452 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
1453 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1454 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE@. THE ENTIRE RISK AS
1455 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU@. SHOULD THE
1456 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
1457 REPAIR OR CORRECTION.
1460 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1461 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
1462 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
1463 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
1464 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
1465 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
1466 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
1467 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
1468 POSSIBILITY OF SUCH DAMAGES.
1472 @heading END OF TERMS AND CONDITIONS
1475 @center END OF TERMS AND CONDITIONS
1479 @unnumberedsec How to Apply These Terms to Your New Programs
1481 If you develop a new program, and you want it to be of the greatest
1482 possible use to the public, the best way to achieve this is to make it
1483 free software which everyone can redistribute and change under these terms.
1485 To do so, attach the following notices to the program. It is safest
1486 to attach them to the start of each source file to most effectively
1487 convey the exclusion of warranty; and each file should have at least
1488 the ``copyright'' line and a pointer to where the full notice is found.
1491 @var{one line to give the program's name and an idea of what it does.}
1492 Copyright (C) 19@var{yy} @var{name of author}
1494 This program is free software; you can redistribute it and/or
1495 modify it under the terms of the GNU General Public License
1496 as published by the Free Software Foundation; either version 2
1497 of the License, or (at your option) any later version.
1499 This program is distributed in the hope that it will be useful,
1500 but WITHOUT ANY WARRANTY; without even the implied warranty of
1501 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE@. See the
1502 GNU General Public License for more details.
1504 You should have received a copy of the GNU General Public License along
1505 with this program; if not, write to the Free Software Foundation, Inc.,
1506 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1509 Also add information on how to contact you by electronic and paper mail.
1511 If the program is interactive, make it output a short notice like this
1512 when it starts in an interactive mode:
1515 Gnomovision version 69, Copyright (C) 20@var{yy} @var{name of author}
1516 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
1517 type `show w'. This is free software, and you are welcome
1518 to redistribute it under certain conditions; type `show c'
1522 The hypothetical commands @samp{show w} and @samp{show c} should show
1523 the appropriate parts of the General Public License. Of course, the
1524 commands you use may be called something other than @samp{show w} and
1525 @samp{show c}; they could even be mouse-clicks or menu items---whatever
1528 You should also get your employer (if you work as a programmer) or your
1529 school, if any, to sign a ``copyright disclaimer'' for the program, if
1530 necessary. Here is a sample; alter the names:
1534 Yoyodyne, Inc., hereby disclaims all copyright
1535 interest in the program `Gnomovision'
1536 (which makes passes at compilers) written
1539 @var{signature of Ty Coon}, 1 April 1989
1540 Ty Coon, President of Vice
1544 This General Public License does not permit incorporating your program into
1545 proprietary programs. If your program is a subroutine library, you may
1546 consider it more useful to permit linking proprietary applications with the
1547 library. If this is what you want to do, use the GNU Library General
1548 Public License instead of this License.
1550 @include doclicense.texi
1551 @include cmdargs.texi
1552 @include xresources.texi
1558 @include glossary.texi
1563 @c The Option Index is produced only in the on-line version,
1564 @c because the index entries related to command-line options
1565 @c tend to point to the same pages and all begin with a dash.
1566 @c This, and the need to keep the node links consistent, are
1567 @c the reasons for the funky @iftex/@ifnottex dance below.
1568 @c The Option Index is _not_ before Key Index, because that
1569 @c would require changes in the glossary.texi's @node line.
1570 @c It is not after Concept Index for similar reasons.
1573 @node Key Index, Command Index, Glossary, Top
1574 @unnumbered Key (Character) Index
1579 @node Key Index, Option Index, Glossary, Top
1580 @unnumbered Key (Character) Index
1583 @node Option Index, Command Index, Key Index, Top
1584 @unnumbered Command-Line Options Index
1587 @node Command Index, Variable Index, Option Index, Top
1588 @unnumbered Command and Function Index
1593 @node Command Index, Variable Index, Key Index, Top
1594 @unnumbered Command and Function Index
1598 @node Variable Index, Concept Index, Command Index, Top
1599 @unnumbered Variable Index
1602 @node Concept Index, Acknowledgments, Variable Index, Top
1603 @unnumbered Concept Index
1611 arch-tag: ed48740a-410b-46ea-9387-c9a9252a3392