4 @settitle GNU Emacs Manual
5 @setfilename ../info/emacs
9 @c The edition number appears in several places in this file
10 @set EDITION Fourteenth
14 This is the @value{EDITION} edition of the @cite{GNU Emacs Manual},
15 updated for Emacs version @value{EMACSVER}.
19 * Emacs: (emacs). The extensible self-documenting text editor.
22 Published by the Free Software Foundation
23 59 Temple Place, Suite 330
24 Boston, MA 02111-1307 USA
26 Copyright (C) 1985, 1986,1987,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002
27 Free Software Foundation, Inc.
29 Permission is granted to copy, distribute and/or modify this document
30 under the terms of the GNU Free Documentation License, Version 1.1 or
31 any later version published by the Free Software Foundation; with the
32 Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
33 ``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
34 Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the
35 license is included in the section entitled ``GNU Free Documentation
38 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
39 this GNU Manual, like GNU software. Copies published by the Free
40 Software Foundation raise funds for GNU development.''
43 @c in general, keep the following line commented out, unless doing a
44 @c copy of this manual that will be published. the manual should go
45 @c onto the distribution in the full, 8.5 x 11" size.
52 @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
63 Copyright @copyright{} 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
64 Free Software Foundation, Inc.
66 @value{EDITION} Edition @*
67 Updated for Emacs Version @value{EMACSVER}, @*
72 Published by the Free Software Foundation @*
73 59 Temple Place, Suite 330 @*
74 Boston, MA 02111-1307 USA
76 Permission is granted to copy, distribute and/or modify this document
77 under the terms of the GNU Free Documentation License, Version 1.1 or
78 any later version published by the Free Software Foundation; with the
79 Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
80 ``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
81 Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the
82 license is included in the section entitled ``GNU Free Documentation
85 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
86 this GNU Manual, like GNU software. Copies published by the Free
87 Software Foundation raise funds for GNU development.''
90 Cover art by Etienne Suvasa.
95 @node Top, Distrib, (dir), (dir)
98 Emacs is the extensible, customizable, self-documenting real-time
99 display editor. This Info file describes how to edit with Emacs and
100 some of how to customize it; it corresponds to GNU Emacs version
104 If you never before used the Info documentation system, type @kbd{h},
105 and Emacs will take you on a guided tour through the Info commands.
108 For information on extending Emacs, see @ref{Top, Emacs Lisp,, elisp, The
109 Emacs Lisp Reference Manual}.
113 If you are new to Info and want to learn how to use it, type the
114 command @kbd{h} now. It brings you to a programmed instruction
119 These subcategories have been deleted for simplicity
120 and to avoid conflicts.
123 Auto-Saving: Protection Against Disasters
131 Shell Command History
133 The ones for Dired and Rmail have had the items turned into :: items
135 Also Running Shell Commands from Emacs
136 and Sending Mail and Registers and Minibuffer.
140 * Distrib:: How to get the latest Emacs distribution.
141 * Copying:: The GNU General Public License gives you permission
142 to redistribute GNU Emacs on certain terms;
143 it also explains that there is no warranty.
144 * GNU Free Documentation License:: The license for this documentation.
145 * Intro:: An introduction to Emacs concepts.
146 * Glossary:: The glossary.
147 * Antinews:: Information about Emacs version 20.
148 * Mac OS:: Using Emacs in the Mac.
149 * MS-DOS:: Using Emacs on MS-DOS (otherwise known as "MS-DOG").
150 * Manifesto:: What's GNU? Gnu's Not Unix!
151 * Acknowledgments:: Major contributors to GNU Emacs.
153 Indexes (nodes containing large menus)
154 * Key Index:: An item for each standard Emacs key sequence.
155 * Command Index:: An item for each command name.
156 * Variable Index:: An item for each documented variable.
157 * Concept Index:: An item for each concept.
158 @c This is last because @ifnottex leaves an empty line.
160 * Option Index:: An item for every command-line option.
163 Important General Concepts
164 * Screen:: How to interpret what you see on the screen.
165 * User Input:: Kinds of input events (characters, buttons,
167 * Keys:: Key sequences: what you type to request one
169 * Commands:: Named functions run by key sequences to do editing.
170 * Text Characters:: Character set for text (the contents of buffers
172 * Entering Emacs:: Starting Emacs from the shell.
173 * Exiting:: Stopping or killing Emacs.
174 * Command Arguments:: Hairy startup options.
176 Fundamental Editing Commands
177 * Basic:: The most basic editing commands.
178 * Minibuffer:: Entering arguments that are prompted for.
179 * M-x:: Invoking commands by their names.
180 * Help:: Commands for asking Emacs about its commands.
182 Important Text-Changing Commands
183 * Mark:: The mark: how to delimit a ``region'' of text.
184 * Killing:: Killing text.
185 * Yanking:: Recovering killed text. Moving text.
186 * Accumulating Text:: Other ways of copying text.
187 * Rectangles:: Operating on the text inside a rectangle on the screen.
188 * Registers:: Saving a text string or a location in the buffer.
189 * Display:: Controlling what text is displayed.
190 * Search:: Finding or replacing occurrences of a string.
191 * Fixit:: Commands especially useful for fixing typos.
193 Major Structures of Emacs
194 * Files:: All about handling files.
195 * Buffers:: Multiple buffers; editing several files at once.
196 * Windows:: Viewing two pieces of text at once.
197 * Frames:: Running the same Emacs session in multiple X windows.
198 * International:: Using non-ASCII character sets (the MULE features).
201 * Major Modes:: Text mode vs. Lisp mode vs. C mode ...
202 * Indentation:: Editing the white space at the beginnings of lines.
203 * Text:: Commands and modes for editing English.
204 * Programs:: Commands and modes for editing programs.
205 * Building:: Compiling, running and debugging programs.
206 * Maintaining:: Features for maintaining large programs.
207 * Abbrevs:: How to define text abbreviations to reduce
208 the number of characters you must type.
209 * Picture:: Editing pictures made up of characters
210 using the quarter-plane screen model.
211 * Sending Mail:: Sending mail in Emacs.
212 * Rmail:: Reading mail in Emacs.
213 * Dired:: You can ``edit'' a directory to manage files in it.
214 * Calendar/Diary:: The calendar and diary facilities.
215 * Gnus:: How to read netnews with Emacs.
216 * Shell:: Executing shell commands from Emacs.
217 * Emacs Server:: Using Emacs as an editing server for @code{mail}, etc.
218 * Hardcopy:: Printing buffers or regions.
219 * PostScript:: Printing buffers or regions as PostScript.
220 * PostScript Variables::
221 Customizing the PostScript printing commands.
222 * Sorting:: Sorting lines, paragraphs or pages within Emacs.
223 * Narrowing:: Restricting display and editing to a portion
225 * Two-Column:: Splitting apart columns to edit them
226 in side-by-side windows.
227 * Editing Binary Files::
228 Using Hexl mode to edit binary files.
229 * Saving Emacs Sessions::
230 Saving Emacs state from one session to the next.
231 * Recursive Edit:: A command can allow you to do editing
232 "within the command". This is called a
233 "recursive editing level".
234 * Emulation:: Emulating some other editors with Emacs.
235 * Hyperlinking:: Following links in buffers.
236 * Dissociated Press:: Dissociating text for fun.
237 * Amusements:: Various games and hacks.
238 * Customization:: Modifying the behavior of Emacs.
239 * X Resources:: X resources for customizing Emacs.
241 Recovery from Problems
242 * Quitting:: Quitting and aborting.
243 * Lossage:: What to do if Emacs is hung or malfunctioning.
244 * Bugs:: How and when to report a bug.
245 * Contributing:: How to contribute improvements to Emacs.
246 * Service:: How to get help for your own Emacs needs.
248 Here are some other nodes which are really inferiors of the ones
249 already listed, mentioned here so you can get to them in one step:
251 --- The Detailed Node Listing ---
253 The Organization of the Screen
255 * Point:: The place in the text where editing commands operate.
256 * Echo Area:: Short messages appear at the bottom of the screen.
257 * Mode Line:: Interpreting the mode line.
258 * Menu Bar:: How to use the menu bar.
260 Basic Editing Commands
262 * Inserting Text:: Inserting text by simply typing it.
263 * Moving Point:: How to move the cursor to the place where you want to
265 * Erasing:: Deleting and killing text.
266 * Undo:: Undoing recent changes in the text.
267 * Files: Basic Files. Visiting, creating, and saving files.
268 * Help: Basic Help. Asking what a character does.
269 * Blank Lines:: Commands to make or delete blank lines.
270 * Continuation Lines:: Lines too wide for the screen.
271 * Position Info:: What page, line, row, or column is point on?
272 * Arguments:: Numeric arguments for repeating a command.
276 * Minibuffer File:: Entering file names with the minibuffer.
277 * Minibuffer Edit:: How to edit in the minibuffer.
278 * Completion:: An abbreviation facility for minibuffer input.
279 * Minibuffer History:: Reusing recent minibuffer arguments.
280 * Repetition:: Re-executing commands that used the minibuffer.
284 * Help Summary:: Brief list of all Help commands.
285 * Key Help:: Asking what a key does in Emacs.
286 * Name Help:: Asking about a command, variable or function name.
287 * Apropos:: Asking what pertains to a given topic.
288 * Library Keywords:: Finding Lisp libraries by keywords (topics).
289 * Language Help:: Help relating to international language support.
290 * Misc Help:: Other help commands.
292 The Mark and the Region
294 * Setting Mark:: Commands to set the mark.
295 * Transient Mark:: How to make Emacs highlight the region--
297 * Using Region:: Summary of ways to operate on contents of the region.
298 * Marking Objects:: Commands to put region around textual units.
299 * Mark Ring:: Previous mark positions saved so you can go back there.
300 * Global Mark Ring:: Previous mark positions in various buffers.
304 * Deletion:: Commands for deleting small amounts of text and
306 * Killing by Lines:: How to kill entire lines of text at one time.
307 * Other Kill Commands:: Commands to kill large regions of text and
308 syntactic units such as words and sentences.
312 * Kill Ring:: Where killed text is stored. Basic yanking.
313 * Appending Kills:: Several kills in a row all yank together.
314 * Earlier Kills:: Yanking something killed some time ago.
318 * RegPos:: Saving positions in registers.
319 * RegText:: Saving text in registers.
320 * RegRect:: Saving rectangles in registers.
321 * RegConfig:: Saving window configurations in registers.
322 * RegFiles:: File names in registers.
323 * Bookmarks:: Bookmarks are like registers, but persistent.
325 Controlling the Display
327 * Scrolling:: Moving text up and down in a window.
328 * Horizontal Scrolling:: Moving text left and right in a window.
329 * Follow Mode:: Follow mode lets two windows scroll as one.
330 * Selective Display:: Hiding lines with lots of indentation.
331 * Optional Mode Line:: Optional mode line display features.
332 * Text Display:: How text is normally displayed.
333 * Display Custom:: Information on variables for customizing display.
335 Searching and Replacement
337 * Incremental Search:: Search happens as you type the string.
338 * Nonincremental Search:: Specify entire string and then search.
339 * Word Search:: Search for sequence of words.
340 * Regexp Search:: Search for match for a regexp.
341 * Regexps:: Syntax of regular expressions.
342 * Search Case:: To ignore case while searching, or not.
343 * Replace:: Search, and replace some or all matches.
344 * Other Repeating Search:: Operating on all matches for some regexp.
348 * Unconditional Replace:: Replacing all matches for a string.
349 * Regexp Replace:: Replacing all matches for a regexp.
350 * Replacement and Case:: How replacements preserve case of letters.
351 * Query Replace:: How to use querying.
353 Commands for Fixing Typos
355 * Kill Errors:: Commands to kill a batch of recently entered text.
356 * Transpose:: Exchanging two characters, words, lines, lists...
357 * Fixing Case:: Correcting case of last word entered.
358 * Spelling:: Apply spelling checker to a word or a whole buffer.
362 * File Names:: How to type and edit file-name arguments.
363 * Visiting:: Visiting a file prepares Emacs to edit the file.
364 * Saving:: Saving makes your changes permanent.
365 * Reverting:: Reverting cancels all the changes not saved.
366 * Auto Save:: Auto Save periodically protects against loss of data.
367 * File Aliases:: Handling multiple names for one file.
368 * Version Control:: Version control systems (RCS, CVS and SCCS).
369 * Directories:: Creating, deleting, and listing file directories.
370 * Comparing Files:: Finding where two files differ.
371 * Misc File Ops:: Other things you can do on files.
372 * Compressed Files:: Accessing compressed files.
373 * Remote Files:: Accessing files on other sites.
374 * Quoted File Names:: Quoting special characters in file names.
378 * Backup:: How Emacs saves the old version of your file.
379 * Interlocking:: How Emacs protects against simultaneous editing
380 of one file by two users.
384 * Introduction to VC:: How version control works in general.
385 * VC Mode Line:: How the mode line shows version control status.
386 * Basic VC Editing:: How to edit a file under version control.
387 * Old Versions:: Examining and comparing old versions.
388 * Secondary VC Commands:: The commands used a little less frequently.
389 * Branches:: Multiple lines of development.
390 * Snapshots:: Sets of file versions treated as a unit.
391 * Miscellaneous VC:: Various other commands and features of VC.
392 * Customizing VC:: Variables that change VC's behavior.
394 Using Multiple Buffers
396 * Select Buffer:: Creating a new buffer or reselecting an old one.
397 * List Buffers:: Getting a list of buffers that exist.
398 * Misc Buffer:: Renaming; changing read-onliness; copying text.
399 * Kill Buffer:: Killing buffers you no longer need.
400 * Several Buffers:: How to go through the list of all buffers
401 and operate variously on several of them.
402 * Indirect Buffers:: An indirect buffer shares the text of another buffer.
406 * Basic Window:: Introduction to Emacs windows.
407 * Split Window:: New windows are made by splitting existing windows.
408 * Other Window:: Moving to another window or doing something to it.
409 * Pop Up Window:: Finding a file or buffer in another window.
410 * Force Same Window:: Forcing certain buffers to appear in the selected
411 window rather than in another window.
412 * Change Window:: Deleting windows and changing their sizes.
416 * Mouse Commands:: Moving, cutting, and pasting, with the mouse.
417 * Secondary Selection:: Cutting without altering point and mark.
418 * Clipboard:: Using the clipboard for selections.
419 * Mouse References:: Using the mouse to select an item from a list.
420 * Menu Mouse Clicks:: Mouse clicks that bring up menus.
421 * Mode Line Mouse:: Mouse clicks on the mode line.
422 * Creating Frames:: Creating additional Emacs frames with various contents.
423 * Frame Commands:: Iconifying, deleting, and switching frames.
424 * Speedbar:: How to make and use a speedbar frame.
425 * Multiple Displays:: How one Emacs job can talk to several displays.
426 * Special Buffer Frames:: You can make certain buffers have their own frames.
427 * Frame Parameters:: Changing the colors and other modes of frames.
428 * Scroll Bars:: How to enable and disable scroll bars; how to use them.
429 * Wheeled Mice:: Using mouse wheels for scrolling.
430 * Menu Bars:: Enabling and disabling the menu bar.
431 * Tool Bars:: Enabling and disabling the tool bar.
432 * Dialog Boxes:: Controlling use of dialog boxes.
433 * Faces:: How to change the display style using faces.
434 * Font Lock:: Minor mode for syntactic highlighting using faces.
435 * Highlight Changes:: Using colors to show where you changed the buffer.
436 * Highlight Interactively:: Tell Emacs what text to highlight.
437 * Useless Whitespace:: Showing possibly-spurious trailing whitespace.
438 * Tooltips:: Showing "tooltips", AKA "ballon help" for active text.
439 * Mouse Avoidance:: Moving the mouse pointer out of the way.
440 * Non-Window Terminals:: Multiple frames on terminals that show only one.
441 * XTerm Mouse:: Using the mouse in an XTerm terminal emulator.
443 International Character Set Support
445 * International Chars:: Basic concepts of multibyte characters.
446 * Enabling Multibyte:: Controlling whether to use multibyte characters.
447 * Language Environments:: Setting things up for the language you use.
448 * Input Methods:: Entering text characters not on your keyboard.
449 * Select Input Method:: Specifying your choice of input methods.
450 * Coding Systems:: Character set conversion when you read and
451 write files, and so on.
452 * Recognize Coding:: How Emacs figures out which conversion to use.
453 * Specify Coding:: Various ways to choose which conversion to use.
454 * Fontsets:: Fontsets are collections of fonts
455 that cover the whole spectrum of characters.
456 * Defining Fontsets:: Defining a new fontset.
457 * Single-Byte Character Support::
458 You can pick one European character set
459 to use without multibyte characters.
463 * Choosing Modes:: How major modes are specified or chosen.
467 * Indentation Commands:: Various commands and techniques for indentation.
468 * Tab Stops:: You can set arbitrary "tab stops" and then
469 indent to the next tab stop when you want to.
470 * Just Spaces:: You can request indentation using just spaces.
472 Commands for Human Languages
474 * Words:: Moving over and killing words.
475 * Sentences:: Moving over and killing sentences.
476 * Paragraphs:: Moving over paragraphs.
477 * Pages:: Moving over pages.
478 * Filling:: Filling or justifying text.
479 * Case:: Changing the case of text.
480 * Text Mode:: The major modes for editing text files.
481 * Outline Mode:: Editing outlines.
482 * TeX Mode:: Editing input to the formatter TeX.
483 * Nroff Mode:: Editing input to the formatter nroff.
484 * Formatted Text:: Editing formatted text directly in WYSIWYG fashion.
488 * Auto Fill:: Auto Fill mode breaks long lines automatically.
489 * Fill Commands:: Commands to refill paragraphs and center lines.
490 * Fill Prefix:: Filling paragraphs that are indented
491 or in a comment, etc.
492 * Adaptive Fill:: How Emacs can determine the fill prefix automatically.
496 * Program Modes:: Major modes for editing programs.
497 * Defuns:: Commands to operate on major top-level parts
499 * Program Indent:: Adjusting indentation to show the nesting.
500 * Comments:: Inserting, killing, and aligning comments.
501 * Parentheses:: Commands that operate on parentheses.
502 * Documentation:: Getting documentation of functions you plan to call.
503 * Hideshow:: Displaying blocks selectively.
504 * Symbol Completion:: Completion on symbol names of your program or language.
505 * Glasses:: Making identifiersLikeThis more readable.
506 * Misc for Programs:: Other Emacs features useful for editing programs.
507 * C Modes:: Special commands of C, C++, Objective-C,
508 Java, and Pike modes.
509 * Fortran:: Fortran mode and its special features.
510 * Asm Mode:: Asm mode and its special features.
512 Top-Level Definitions, or Defuns
514 * Left Margin Paren:: An open-paren or similar opening delimiter
515 starts a defun if it is at the left margin.
516 * Moving by Defuns:: Commands to move over or mark a major definition.
517 * Imenu:: Making buffer indexes as menus.
518 * Which Function:: Which Function mode shows which function you are in.
520 Indentation for Programs
522 * Basic Indent:: Indenting a single line.
523 * Multi-line Indent:: Commands to reindent many lines at once.
524 * Lisp Indent:: Specifying how each Lisp function should be indented.
525 * C Indent:: Extra features for indenting C and related modes.
526 * Custom C Indent:: Controlling indentation style for C and related modes.
528 Commands for Editing with Parentheses
530 * Expressions:: Expressions with balanced parentheses.
531 * Moving by Parens:: Commands for moving up, down and across
532 in the structure of parentheses.
533 * Matching:: Insertion of a close-delimiter flashes matching open.
535 Manipulating Comments
537 * Comment Commands:: Inserting, killing, and indenting comments.
538 * Multi-Line Comments:: Commands for adding and editing multi-line comments.
539 * Options for Comments::Customizing the comment features.
543 * Info Lookup:: Looking up library functions and commands
545 * Man Page:: Looking up man pages of library functions and commands.
546 * Lisp Doc:: Looking up Emacs Lisp functions, etc.
550 * Motion in C:: Commands to move by C statements, etc.
551 * Electric C:: Colon and other chars can automatically reindent.
552 * Hungry Delete:: A more powerful DEL command.
553 * Other C Commands:: Filling comments, viewing expansion of macros,
554 and other neat features.
555 * Comments in C:: Options for customizing comment style.
559 * Motion: Fortran Motion. Moving point by statements or subprograms.
560 * Indent: Fortran Indent. Indentation commands for Fortran.
561 * Comments: Fortran Comments. Inserting and aligning comments.
562 * Autofill: Fortran Autofill. Auto fill minor mode for Fortran.
563 * Columns: Fortran Columns. Measuring columns for valid Fortran.
564 * Abbrev: Fortran Abbrev. Built-in abbrevs for Fortran keywords.
566 Compiling and Testing Programs
568 * Compilation:: Compiling programs in languages other
569 than Lisp (C, Pascal, etc.).
570 * Compilation Mode:: The mode for visiting compiler errors.
571 * Compilation Shell:: Customizing your shell properly
572 for use in the compilation buffer.
573 * Debuggers:: Running symbolic debuggers for non-Lisp programs.
574 * Executing Lisp:: Various modes for editing Lisp programs,
575 with different facilities for running
577 * Lisp Libraries:: Creating Lisp programs to run in Emacs.
578 * Lisp Interaction:: Executing Lisp in an Emacs buffer.
579 * Lisp Eval:: Executing a single Lisp expression in Emacs.
580 * External Lisp:: Communicating through Emacs with a separate Lisp.
582 Running Debuggers Under Emacs
584 * Starting GUD:: How to start a debugger subprocess.
585 * Debugger Operation:: Connection between the debugger and source buffers.
586 * Commands of GUD:: Key bindings for common commands.
587 * GUD Customization:: Defining your own commands for GUD.
591 * Change Log:: Maintaining a change history for your program.
593 * Authors:: Maintaining the Emacs @file{AUTHORS} file.
595 * Tags:: Go direct to any function in your program in one
596 command. Tags remembers which file it is in.
597 * Emerge:: A convenient way of merging two versions of a program.
601 * Tag Syntax:: Tag syntax for various types of code and text files.
602 * Create Tags Table:: Creating a tags table with @code{etags}.
603 * Select Tags Table:: How to visit a tags table.
604 * Find Tag:: Commands to find the definition of a specific tag.
605 * Tags Search:: Using a tags table for searching and replacing.
606 * List Tags:: Listing and finding tags defined in a file.
608 Merging Files with Emerge
610 * Overview of Emerge:: How to start Emerge. Basic concepts.
611 * Submodes of Emerge:: Fast mode vs. Edit mode.
612 Skip Prefers mode and Auto Advance mode.
613 * State of Difference:: You do the merge by specifying state A or B
615 * Merge Commands:: Commands for selecting a difference,
616 changing states of differences, etc.
617 * Exiting Emerge:: What to do when you've finished the merge.
618 * Combining in Emerge:: How to keep both alternatives for a difference.
619 * Fine Points of Emerge:: Misc.
623 * Abbrev Concepts:: Fundamentals of defined abbrevs.
624 * Defining Abbrevs:: Defining an abbrev, so it will expand when typed.
625 * Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.
626 * Editing Abbrevs:: Viewing or editing the entire list of defined abbrevs.
627 * Saving Abbrevs:: Saving the entire list of abbrevs for another session.
628 * Dynamic Abbrevs:: Abbreviations for words already in the buffer.
632 * Basic Picture:: Basic concepts and simple commands of Picture Mode.
633 * Insert in Picture:: Controlling direction of cursor motion
634 after "self-inserting" characters.
635 * Tabs in Picture:: Various features for tab stops and indentation.
636 * Rectangles in Picture:: Clearing and superimposing rectangles.
640 * Mail Format:: Format of the mail being composed.
641 * Mail Headers:: Details of permitted mail header fields.
642 * Mail Aliases:: Abbreviating and grouping mail addresses.
643 * Mail Mode:: Special commands for editing mail being composed.
644 * Mail Amusements:: Distract the NSA's attention; add a fortune to a msg.
645 * Mail Methods:: Using alternative mail-composition methods.
647 Reading Mail with Rmail
649 * Rmail Basics:: Basic concepts of Rmail, and simple use.
650 * Rmail Scrolling:: Scrolling through a message.
651 * Rmail Motion:: Moving to another message.
652 * Rmail Deletion:: Deleting and expunging messages.
653 * Rmail Inbox:: How mail gets into the Rmail file.
654 * Rmail Files:: Using multiple Rmail files.
655 * Rmail Output:: Copying message out to files.
656 * Rmail Labels:: Classifying messages by labeling them.
657 * Rmail Attributes:: Certain standard labels, called attributes.
658 * Rmail Reply:: Sending replies to messages you are viewing.
659 * Rmail Summary:: Summaries show brief info on many messages.
660 * Rmail Sorting:: Sorting messages in Rmail.
661 * Rmail Display:: How Rmail displays a message; customization.
662 * Rmail Editing:: Editing message text and headers in Rmail.
663 * Rmail Digest:: Extracting the messages from a digest message.
664 * Out of Rmail:: Converting an Rmail file to mailbox format.
665 * Rmail Rot13:: Reading messages encoded in the rot13 code.
666 * Movemail:: More details of fetching new mail.
668 Dired, the Directory Editor
670 * Dired Enter:: How to invoke Dired.
671 * Dired Navigation:: How to move in the Dired buffer.
672 * Dired Deletion:: Deleting files with Dired.
673 * Flagging Many Files:: Flagging files based on their names.
674 * Dired Visiting:: Other file operations through Dired.
675 * Marks vs Flags:: Flagging for deletion vs marking.
676 * Operating on Files:: How to copy, rename, print, compress, etc.
677 either one file or several files.
678 * Shell Commands in Dired:: Running a shell command on the marked files.
679 * Transforming File Names:: Using patterns to rename multiple files.
680 * Comparison in Dired:: Running `diff' by way of Dired.
681 * Subdirectories in Dired:: Adding subdirectories to the Dired buffer.
682 * Subdirectory Motion:: Moving across subdirectories, and up and down.
683 * Hiding Subdirectories:: Making subdirectories visible or invisible.
684 * Dired Updating:: Discarding lines for files of no interest.
685 * Dired and Find:: Using `find' to choose the files for Dired.
687 The Calendar and the Diary
689 * Calendar Motion:: Moving through the calendar; selecting a date.
690 * Scroll Calendar:: Bringing earlier or later months onto the screen.
691 * Counting Days:: How many days are there between two dates?
692 * General Calendar:: Exiting or recomputing the calendar.
693 * LaTeX Calendar:: Print a calendar using LaTeX.
694 * Holidays:: Displaying dates of holidays.
695 * Sunrise/Sunset:: Displaying local times of sunrise and sunset.
696 * Lunar Phases:: Displaying phases of the moon.
697 * Other Calendars:: Converting dates to other calendar systems.
698 * Diary:: Displaying events from your diary.
699 * Appointments:: Reminders when it's time to do something.
700 * Daylight Savings:: How to specify when daylight savings time is active.
702 Movement in the Calendar
704 * Calendar Unit Motion:: Moving by days, weeks, months, and years.
705 * Move to Beginning or End:: Moving to start/end of weeks, months, and years.
706 * Specified Dates:: Moving to the current date or another
709 Conversion To and From Other Calendars
711 * Calendar Systems:: The calendars Emacs understands
712 (aside from Gregorian).
713 * To Other Calendar:: Converting the selected date to various calendars.
714 * From Other Calendar:: Moving to a date specified in another calendar.
715 * Mayan Calendar:: Moving to a date specified in a Mayan calendar.
719 * Diary Commands:: Viewing diary entries and associated calendar dates.
720 * Format of Diary File:: Entering events in your diary.
721 * Date Formats:: Various ways you can specify dates.
722 * Adding to Diary:: Commands to create diary entries.
723 * Special Diary Entries:: Anniversaries, blocks of dates, cyclic entries, etc.
727 * Buffers of Gnus:: The group, summary, and article buffers.
728 * Gnus Startup:: What you should know about starting Gnus.
729 * Summary of Gnus:: A short description of the basic Gnus commands.
731 Running Shell Commands from Emacs
733 * Single Shell:: How to run one shell command and return.
734 * Interactive Shell:: Permanent shell taking input via Emacs.
735 * Shell Mode:: Special Emacs commands used with permanent shell.
736 * Shell History:: Repeating previous commands in a shell buffer.
737 * Shell Options:: Options for customizing Shell mode.
738 * Remote Host:: Connecting to another computer.
742 * Minor Modes:: Each minor mode is one feature you can turn on
743 independently of any others.
744 * Variables:: Many Emacs commands examine Emacs variables
745 to decide what to do; by setting variables,
746 you can control their functioning.
747 * Keyboard Macros:: A keyboard macro records a sequence of
748 keystrokes to be replayed with a single command.
749 * Key Bindings:: The keymaps say what command each key runs.
750 By changing them, you can "redefine keys".
751 * Keyboard Translations::
752 If your keyboard passes an undesired code
753 for a key, you can tell Emacs to
754 substitute another code.
755 * Syntax:: The syntax table controls how words and
756 expressions are parsed.
757 * Init File:: How to write common customizations in the
762 * Examining:: Examining or setting one variable's value.
763 * Easy Customization::
764 Convenient and easy customization of variables.
765 * Hooks:: Hook variables let you specify programs for parts
766 of Emacs to run on particular occasions.
767 * Locals:: Per-buffer values of variables.
768 * File Variables:: How files can specify variable values.
772 * Basic Kbd Macro:: Defining and running keyboard macros.
773 * Save Kbd Macro:: Giving keyboard macros names; saving them in files.
774 * Kbd Macro Query:: Making keyboard macros do different things each time.
776 Customizing Key Bindings
778 * Keymaps:: Generalities. The global keymap.
779 * Prefix Keymaps:: Keymaps for prefix keys.
780 * Local Keymaps:: Major and minor modes have their own keymaps.
781 * Minibuffer Maps:: The minibuffer uses its own local keymaps.
782 * Rebinding:: How to redefine one key's meaning conveniently.
783 * Init Rebinding:: Rebinding keys with your init file, @file{.emacs}.
784 * Function Keys:: Rebinding terminal function keys.
785 * Named ASCII Chars:: Distinguishing @key{TAB} from @kbd{C-i}, and so on.
786 * Mouse Buttons:: Rebinding mouse buttons in Emacs.
787 * Disabling:: Disabling a command means confirmation is required
788 before it can be executed. This is done to protect
789 beginners from surprises.
791 The Init File, @file{~/.emacs}
793 * Init Syntax:: Syntax of constants in Emacs Lisp.
794 * Init Examples:: How to do some things with an init file.
795 * Terminal Init:: Each terminal type can have an init file.
796 * Find Init:: How Emacs finds the init file.
798 Dealing with Emacs Trouble
800 * DEL Does Not Delete:: What to do if @key{DEL} doesn't delete.
801 * Stuck Recursive:: `[...]' in mode line around the parentheses.
802 * Screen Garbled:: Garbage on the screen.
803 * Text Garbled:: Garbage in the text.
804 * Unasked-for Search:: Spontaneous entry to incremental search.
805 * Memory Full:: How to cope when you run out of memory.
806 * Emergency Escape:: Emergency escape---
807 What to do if Emacs stops responding.
808 * Total Frustration:: When you are at your wits' end.
812 * Criteria: Bug Criteria. Have you really found a bug?
813 * Understanding Bug Reporting:: How to report a bug effectively.
814 * Checklist:: Steps to follow for a good bug report.
815 * Sending Patches:: How to send a patch for GNU Emacs.
817 Command Line Options and Arguments
819 * Action Arguments:: Arguments to visit files, load libraries,
821 * Initial Options:: Arguments that take effect while starting Emacs.
822 * Command Example:: Examples of using command line arguments.
823 * Resume Arguments:: Specifying arguments when you resume a running Emacs.
824 * Environment:: Environment variables that Emacs uses.
825 * Display X:: Changing the default display and using remote login.
826 * Font X:: Choosing a font for text, under X.
827 * Colors:: Choosing display colors.
828 * Window Size X:: Start-up window size, under X.
829 * Borders X:: Internal and external borders, under X.
830 * Title X:: Specifying the initial frame's title.
831 * Icons X:: Choosing what sort of icon to use, under X.
835 * Resources:: Using X resources with Emacs (in general).
836 * Table of Resources:: Table of specific X resources that affect Emacs.
837 * Face Resources:: X resources for customizing faces.
838 * Lucid Resources:: X resources for Lucid menus.
839 * LessTif Resources:: X resources for LessTif and Motif menus.
841 Environment Variables
843 * General Variables:: Environment variables that all versions of Emacs use.
844 * Misc Variables:: Certain system specific variables.
846 MS-DOS and Windows 95/98/NT
848 * MS-DOS Input:: Keyboard and mouse usage on MS-DOS.
849 * MS-DOS Display:: Fonts, frames and display size on MS-DOS.
850 * MS-DOS File Names:: File-name conventions on MS-DOS.
851 * Text and Binary:: Text files on MS-DOS use CRLF to separate lines.
852 * MS-DOS Printing:: How to specify the printer on MS-DOS.
853 * MS-DOS Processes:: Running subprocesses on MS-DOS.
854 * Windows Processes:: Running subprocesses on Windows.
855 * Windows System Menu:: Controlling what the ALT key does.
861 This manual documents the use and simple customization of the Emacs
862 editor. The reader is not expected to be a programmer; simple
863 customizations do not require programming skill. But the user who is not
864 interested in customizing can ignore the scattered customization hints.
866 This is primarily a reference manual, but can also be used as a
867 primer. For complete beginners, it is a good idea to start with the
868 on-line, learn-by-doing tutorial, before reading the manual. To run the
869 tutorial, start Emacs and type @kbd{C-h t}. This way you can learn
870 Emacs by using Emacs on a specially designed file which describes
871 commands, tells you when to try them, and then explains the results you
874 On first reading, just skim chapters 1 and 2, which describe the
875 notational conventions of the manual and the general appearance of the
876 Emacs display screen. Note which questions are answered in these
877 chapters, so you can refer back later. After reading chapter 4, you
878 should practice the commands there. The next few chapters describe
879 fundamental techniques and concepts that are used constantly. You need
880 to understand them thoroughly, experimenting with them if necessary.
882 Chapters 14 through 19 describe intermediate-level features that are
883 useful for all kinds of editing. Chapter 20 and following chapters
884 describe features that you may or may not want to use; read those
885 chapters when you need them.
887 Read the Trouble chapter if Emacs does not seem to be working
888 properly. It explains how to cope with some common problems
889 (@pxref{Lossage}), as well as when and how to report Emacs bugs
892 To find the documentation on a particular command, look in the index.
893 Keys (character commands) and command names have separate indexes. There
894 is also a glossary, with a cross reference for each term.
896 This manual is available as a printed book and also as an Info file.
897 The Info file is for on-line perusal with the Info program, which will
898 be the principal way of viewing documentation on-line in the GNU system.
899 Both the Info file and the Info program itself are distributed along
900 with GNU Emacs. The Info file and the printed book contain
901 substantially the same text and are generated from the same source
902 files, which are also distributed along with GNU Emacs.
904 GNU Emacs is a member of the Emacs editor family. There are many Emacs
905 editors, all sharing common principles of organization. For information on
906 the underlying philosophy of Emacs and the lessons learned from its
907 development, write for a copy of AI memo 519a, ``Emacs, the Extensible,
908 Customizable Self-Documenting Display Editor,'' to Publications Department,
909 Artificial Intelligence Lab, 545 Tech Square, Cambridge, MA 02139, USA@. At
910 last report they charge $2.25 per copy. Another useful publication is LCS
911 TM-165, ``A Cookbook for an Emacs,'' by Craig Finseth, available from
912 Publications Department, Laboratory for Computer Science, 545 Tech Square,
913 Cambridge, MA 02139, USA@. The price today is $3.
915 This edition of the manual is intended for use with GNU Emacs installed
916 on GNU and Unix systems. GNU Emacs can also be used on VMS, MS-DOS
917 (also called MS-DOG), Windows NT, and Windows 95 systems. Those systems use
918 different file name syntax; in addition, VMS and MS-DOS do not support
919 all GNU Emacs features. We don't try to describe VMS usage in this
920 manual. @xref{MS-DOS}, for information about using Emacs on MS-DOS.
923 @node Distrib, Copying, Top, Top
924 @unnumbered Distribution
926 GNU Emacs is @dfn{free software}; this means that everyone is free to
927 use it and free to redistribute it on certain conditions. GNU Emacs is
928 not in the public domain; it is copyrighted and there are restrictions
929 on its distribution, but these restrictions are designed to permit
930 everything that a good cooperating citizen would want to do. What is
931 not allowed is to try to prevent others from further sharing any version
932 of GNU Emacs that they might get from you. The precise conditions are
933 found in the GNU General Public License that comes with Emacs and also
934 appears following this section.
936 One way to get a copy of GNU Emacs is from someone else who has it. You
937 need not ask for our permission to do so, or tell any one else; just
938 copy it. If you have access to the Internet, you can get the latest
939 distribution version of GNU Emacs by anonymous FTP; see the file
940 @file{etc/FTP} in the Emacs distribution for more information.
942 You may also receive GNU Emacs when you buy a computer. Computer
943 manufacturers are free to distribute copies on the same terms that apply to
944 everyone else. These terms require them to give you the full sources,
945 including whatever changes they may have made, and to permit you to
946 redistribute the GNU Emacs received from them under the usual terms of the
947 General Public License. In other words, the program must be free for you
948 when you get it, not just free for the manufacturer.
950 You can also order copies of GNU Emacs from the Free Software Foundation
951 on CD-ROM@. This is a convenient and reliable way to get a copy; it is
952 also a good way to help fund our work. (The Foundation has always
953 received most of its funds in this way.) An order form is included in
954 the file @file{etc/ORDERS} in the Emacs distribution, and on our web
955 site in @url{http://www.gnu.org/order/order.html}. For further
956 information, write to
959 Free Software Foundation
960 59 Temple Place, Suite 330
961 Boston, MA 02111-1307 USA
965 The income from distribution fees goes to support the foundation's
966 purpose: the development of new free software, and improvements to our
967 existing programs including GNU Emacs.
969 If you find GNU Emacs useful, please @strong{send a donation} to the
970 Free Software Foundation to support our work. Donations to the Free
971 Software Foundation are tax deductible in the US. If you use GNU Emacs
972 at your workplace, please suggest that the company make a donation. If
973 company policy is unsympathetic to the idea of donating to charity, you
974 might instead suggest ordering a CD-ROM from the Foundation
975 occasionally, or subscribing to periodic updates.
978 Contributors to GNU Emacs include Per Abrahamsen, Jay K. Adams, Joe
979 Arceneaux, Boaz Ben-Zvi, Jim Blandy, Terrence Brannon, Frank Bresz,
980 Peter Breton, Kevin Broadey, Vincent Broman, David M. Brown, Bill
981 Carpenter, Hans Chalupsky, Bob Chassell, James Clark, Mike Clarkson,
982 Glynn Clements, Andrew Csillag, Doug Cutting, Michael DeCorte, Gary
983 Delp, Matthieu Devin, Eri Ding, Carsten Dominik, Scott Draves, Viktor
984 Dukhovni, John Eaton, Rolf Ebert, Stephen Eglen, Torbj@"orn Einarsson,
985 Tsugumoto Enami, Hans Henrik Eriksen, Michael Ernst, Ata Etemadi,
986 Frederick Farnback, Fred Fish, Karl Fogel, Gary Foster, Noah Friedman,
987 Keith Gabryelski, Kevin Gallagher, Kevin Gallo, Howard Gayle, Stephen
988 Gildea, David Gillespie, Bob Glickstein, Boris Goldowsky, Michelangelo
989 Grigni, Michael Gschwind, Henry Guillaume, Doug Gwyn, Ken'ichi Handa,
990 Chris Hanson, K. Shane Hartman, John Heidemann, Markus Heritsch, Karl
991 Heuer, Manabu Higashida, Anders Holst, Kurt Hornik, Tom Houlder, Lars
992 Ingebrigtsen, Andrew Innes, Michael K. Johnson, Kyle Jones, Tomoji
993 Kagatani, Brewster Kahle, David Kaufman, Henry Kautz, Howard Kaye,
994 Michael Kifer, Richard King, Larry K. Kolodney, Robert Krawitz,
995 Sebastian Kremer, Geoff Kuenning, David K@aa gedal, Daniel LaLiberte,
996 Aaron Larson, James R. Larus, Frederic Lepied, Lars Lindberg, Eric
997 Ludlam, Neil M. Mager, Ken Manheimer, Bill Mann, Brian Marick, Simon
998 Marshall, Bengt Martensson, Charlie Martin, Thomas May, Roland McGrath,
999 David Megginson, Wayne Mesard, Richard Mlynarik, Keith Moore, Erik
1000 Naggum, Thomas Neumann, Mike Newton, Jurgen Nickelsen, Jeff Norden,
1001 Andrew Norman, Jeff Peck, Damon Anton Permezel, Tom Perrine, Jens
1002 Petersen, Daniel Pfeiffer, Fred Pierresteguy, Christian Plaunt,
1003 Francesco A. Potorti, Michael D. Prange, Ashwin Ram, Eric S. Raymond,
1004 Paul Reilly, Edward M. Reingold, Rob Riepel, Roland B. Roberts, John
1005 Robinson, Danny Roozendaal, William Rosenblatt, Guillermo J. Rozas, Ivar
1006 Rummelhoff, Wolfgang Rupprecht, James B. Salem, Masahiko Sato, William
1007 Schelter, Ralph Schleicher, Gregor Schmid, Michael Schmidt, Ronald
1008 S. Schnell, Philippe Schnoebelen, Stephen Schoef, Randal Schwartz,
1009 Manuel Serrano, Stanislav Shalunov, Mark Shapiro, Richard Sharman, Olin
1010 Shivers, Espen Skoglund, Rick Sladkey, Lynn Slater, Chris Smith, David
1011 Smith, Paul D. Smith, William Sommerfeld, Michael Staats, Sam Steingold,
1012 Ake Stenhoff, Peter Stephenson, Jonathan Stigelman, Steve Strassman,
1013 Jens T. Berger Thielemann, Spencer Thomas, Jim Thompson, Masanobu Umeda,
1014 Neil W. Van Dyke, Ulrik Vieth, Geoffrey Voelker, Johan Vromans, Barry
1015 Warsaw, Morten Welinder, Joseph Brian Wells, Rodney Whitby, Ed
1016 Wilkinson, Mike Williams, Steven A. Wood, Dale R. Worley, Felix
1017 S. T. Wu, Tom Wurgler, Eli Zaretskii, Jamie Zawinski, Ian T. Zimmermann,
1018 Reto Zimmermann, and Neal Ziring.
1021 @node Copying, GNU Free Documentation License, Distrib, Top
1022 @unnumbered GNU GENERAL PUBLIC LICENSE
1023 @center Version 2, June 1991
1026 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
1027 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1029 Everyone is permitted to copy and distribute verbatim copies
1030 of this license document, but changing it is not allowed.
1033 @unnumberedsec Preamble
1035 The licenses for most software are designed to take away your
1036 freedom to share and change it. By contrast, the GNU General Public
1037 License is intended to guarantee your freedom to share and change free
1038 software---to make sure the software is free for all its users. This
1039 General Public License applies to most of the Free Software
1040 Foundation's software and to any other program whose authors commit to
1041 using it. (Some other Free Software Foundation software is covered by
1042 the GNU Library General Public License instead.) You can apply it to
1045 When we speak of free software, we are referring to freedom, not
1046 price. Our General Public Licenses are designed to make sure that you
1047 have the freedom to distribute copies of free software (and charge for
1048 this service if you wish), that you receive source code or can get it
1049 if you want it, that you can change the software or use pieces of it
1050 in new free programs; and that you know you can do these things.
1052 To protect your rights, we need to make restrictions that forbid
1053 anyone to deny you these rights or to ask you to surrender the rights.
1054 These restrictions translate to certain responsibilities for you if you
1055 distribute copies of the software, or if you modify it.
1057 For example, if you distribute copies of such a program, whether
1058 gratis or for a fee, you must give the recipients all the rights that
1059 you have. You must make sure that they, too, receive or can get the
1060 source code. And you must show them these terms so they know their
1063 We protect your rights with two steps: (1) copyright the software, and
1064 (2) offer you this license which gives you legal permission to copy,
1065 distribute and/or modify the software.
1067 Also, for each author's protection and ours, we want to make certain
1068 that everyone understands that there is no warranty for this free
1069 software. If the software is modified by someone else and passed on, we
1070 want its recipients to know that what they have is not the original, so
1071 that any problems introduced by others will not reflect on the original
1072 authors' reputations.
1074 Finally, any free program is threatened constantly by software
1075 patents. We wish to avoid the danger that redistributors of a free
1076 program will individually obtain patent licenses, in effect making the
1077 program proprietary. To prevent this, we have made it clear that any
1078 patent must be licensed for everyone's free use or not licensed at all.
1080 The precise terms and conditions for copying, distribution and
1081 modification follow.
1084 @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1087 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1092 This License applies to any program or other work which contains
1093 a notice placed by the copyright holder saying it may be distributed
1094 under the terms of this General Public License. The ``Program,'' below,
1095 refers to any such program or work, and a ``work based on the Program''
1096 means either the Program or any derivative work under copyright law:
1097 that is to say, a work containing the Program or a portion of it,
1098 either verbatim or with modifications and/or translated into another
1099 language. (Hereinafter, translation is included without limitation in
1100 the term ``modification.'') Each licensee is addressed as ``you.''
1102 Activities other than copying, distribution and modification are not
1103 covered by this License; they are outside its scope. The act of
1104 running the Program is not restricted, and the output from the Program
1105 is covered only if its contents constitute a work based on the
1106 Program (independent of having been made by running the Program).
1107 Whether that is true depends on what the Program does.
1110 You may copy and distribute verbatim copies of the Program's
1111 source code as you receive it, in any medium, provided that you
1112 conspicuously and appropriately publish on each copy an appropriate
1113 copyright notice and disclaimer of warranty; keep intact all the
1114 notices that refer to this License and to the absence of any warranty;
1115 and give any other recipients of the Program a copy of this License
1116 along with the Program.
1118 You may charge a fee for the physical act of transferring a copy, and
1119 you may at your option offer warranty protection in exchange for a fee.
1122 You may modify your copy or copies of the Program or any portion
1123 of it, thus forming a work based on the Program, and copy and
1124 distribute such modifications or work under the terms of Section 1
1125 above, provided that you also meet all of these conditions:
1129 You must cause the modified files to carry prominent notices
1130 stating that you changed the files and the date of any change.
1133 You must cause any work that you distribute or publish, that in
1134 whole or in part contains or is derived from the Program or any
1135 part thereof, to be licensed as a whole at no charge to all third
1136 parties under the terms of this License.
1139 If the modified program normally reads commands interactively
1140 when run, you must cause it, when started running for such
1141 interactive use in the most ordinary way, to print or display an
1142 announcement including an appropriate copyright notice and a
1143 notice that there is no warranty (or else, saying that you provide
1144 a warranty) and that users may redistribute the program under
1145 these conditions, and telling the user how to view a copy of this
1146 License. (Exception: if the Program itself is interactive but
1147 does not normally print such an announcement, your work based on
1148 the Program is not required to print an announcement.)
1151 These requirements apply to the modified work as a whole. If
1152 identifiable sections of that work are not derived from the Program,
1153 and can be reasonably considered independent and separate works in
1154 themselves, then this License, and its terms, do not apply to those
1155 sections when you distribute them as separate works. But when you
1156 distribute the same sections as part of a whole which is a work based
1157 on the Program, the distribution of the whole must be on the terms of
1158 this License, whose permissions for other licensees extend to the
1159 entire whole, and thus to each and every part regardless of who wrote it.
1161 Thus, it is not the intent of this section to claim rights or contest
1162 your rights to work written entirely by you; rather, the intent is to
1163 exercise the right to control the distribution of derivative or
1164 collective works based on the Program.
1166 In addition, mere aggregation of another work not based on the Program
1167 with the Program (or with a work based on the Program) on a volume of
1168 a storage or distribution medium does not bring the other work under
1169 the scope of this License.
1172 You may copy and distribute the Program (or a work based on it,
1173 under Section 2) in object code or executable form under the terms of
1174 Sections 1 and 2 above provided that you also do one of the following:
1178 Accompany it with the complete corresponding machine-readable
1179 source code, which must be distributed under the terms of Sections
1180 1 and 2 above on a medium customarily used for software interchange; or,
1183 Accompany it with a written offer, valid for at least three
1184 years, to give any third party, for a charge no more than your
1185 cost of physically performing source distribution, a complete
1186 machine-readable copy of the corresponding source code, to be
1187 distributed under the terms of Sections 1 and 2 above on a medium
1188 customarily used for software interchange; or,
1191 Accompany it with the information you received as to the offer
1192 to distribute corresponding source code. (This alternative is
1193 allowed only for noncommercial distribution and only if you
1194 received the program in object code or executable form with such
1195 an offer, in accord with Subsection b above.)
1198 The source code for a work means the preferred form of the work for
1199 making modifications to it. For an executable work, complete source
1200 code means all the source code for all modules it contains, plus any
1201 associated interface definition files, plus the scripts used to
1202 control compilation and installation of the executable. However, as a
1203 special exception, the source code distributed need not include
1204 anything that is normally distributed (in either source or binary
1205 form) with the major components (compiler, kernel, and so on) of the
1206 operating system on which the executable runs, unless that component
1207 itself accompanies the executable.
1209 If distribution of executable or object code is made by offering
1210 access to copy from a designated place, then offering equivalent
1211 access to copy the source code from the same place counts as
1212 distribution of the source code, even though third parties are not
1213 compelled to copy the source along with the object code.
1216 You may not copy, modify, sublicense, or distribute the Program
1217 except as expressly provided under this License. Any attempt
1218 otherwise to copy, modify, sublicense or distribute the Program is
1219 void, and will automatically terminate your rights under this License.
1220 However, parties who have received copies, or rights, from you under
1221 this License will not have their licenses terminated so long as such
1222 parties remain in full compliance.
1225 You are not required to accept this License, since you have not
1226 signed it. However, nothing else grants you permission to modify or
1227 distribute the Program or its derivative works. These actions are
1228 prohibited by law if you do not accept this License. Therefore, by
1229 modifying or distributing the Program (or any work based on the
1230 Program), you indicate your acceptance of this License to do so, and
1231 all its terms and conditions for copying, distributing or modifying
1232 the Program or works based on it.
1235 Each time you redistribute the Program (or any work based on the
1236 Program), the recipient automatically receives a license from the
1237 original licensor to copy, distribute or modify the Program subject to
1238 these terms and conditions. You may not impose any further
1239 restrictions on the recipients' exercise of the rights granted herein.
1240 You are not responsible for enforcing compliance by third parties to
1244 If, as a consequence of a court judgment or allegation of patent
1245 infringement or for any other reason (not limited to patent issues),
1246 conditions are imposed on you (whether by court order, agreement or
1247 otherwise) that contradict the conditions of this License, they do not
1248 excuse you from the conditions of this License. If you cannot
1249 distribute so as to satisfy simultaneously your obligations under this
1250 License and any other pertinent obligations, then as a consequence you
1251 may not distribute the Program at all. For example, if a patent
1252 license would not permit royalty-free redistribution of the Program by
1253 all those who receive copies directly or indirectly through you, then
1254 the only way you could satisfy both it and this License would be to
1255 refrain entirely from distribution of the Program.
1257 If any portion of this section is held invalid or unenforceable under
1258 any particular circumstance, the balance of the section is intended to
1259 apply and the section as a whole is intended to apply in other
1262 It is not the purpose of this section to induce you to infringe any
1263 patents or other property right claims or to contest validity of any
1264 such claims; this section has the sole purpose of protecting the
1265 integrity of the free software distribution system, which is
1266 implemented by public license practices. Many people have made
1267 generous contributions to the wide range of software distributed
1268 through that system in reliance on consistent application of that
1269 system; it is up to the author/donor to decide if he or she is willing
1270 to distribute software through any other system and a licensee cannot
1273 This section is intended to make thoroughly clear what is believed to
1274 be a consequence of the rest of this License.
1277 If the distribution and/or use of the Program is restricted in
1278 certain countries either by patents or by copyrighted interfaces, the
1279 original copyright holder who places the Program under this License
1280 may add an explicit geographical distribution limitation excluding
1281 those countries, so that distribution is permitted only in or among
1282 countries not thus excluded. In such case, this License incorporates
1283 the limitation as if written in the body of this License.
1286 The Free Software Foundation may publish revised and/or new versions
1287 of the General Public License from time to time. Such new versions will
1288 be similar in spirit to the present version, but may differ in detail to
1289 address new problems or concerns.
1291 Each version is given a distinguishing version number. If the Program
1292 specifies a version number of this License which applies to it and ``any
1293 later version,'' you have the option of following the terms and conditions
1294 either of that version or of any later version published by the Free
1295 Software Foundation. If the Program does not specify a version number of
1296 this License, you may choose any version ever published by the Free Software
1300 If you wish to incorporate parts of the Program into other free
1301 programs whose distribution conditions are different, write to the author
1302 to ask for permission. For software which is copyrighted by the Free
1303 Software Foundation, write to the Free Software Foundation; we sometimes
1304 make exceptions for this. Our decision will be guided by the two goals
1305 of preserving the free status of all derivatives of our free software and
1306 of promoting the sharing and reuse of software generally.
1309 @heading NO WARRANTY
1316 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
1317 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW@. EXCEPT WHEN
1318 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
1319 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
1320 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1321 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE@. THE ENTIRE RISK AS
1322 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU@. SHOULD THE
1323 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
1324 REPAIR OR CORRECTION.
1327 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1328 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
1329 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
1330 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
1331 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
1332 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
1333 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
1334 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
1335 POSSIBILITY OF SUCH DAMAGES.
1339 @heading END OF TERMS AND CONDITIONS
1342 @center END OF TERMS AND CONDITIONS
1346 @unnumberedsec How to Apply These Terms to Your New Programs
1348 If you develop a new program, and you want it to be of the greatest
1349 possible use to the public, the best way to achieve this is to make it
1350 free software which everyone can redistribute and change under these terms.
1352 To do so, attach the following notices to the program. It is safest
1353 to attach them to the start of each source file to most effectively
1354 convey the exclusion of warranty; and each file should have at least
1355 the ``copyright'' line and a pointer to where the full notice is found.
1358 @var{one line to give the program's name and an idea of what it does.}
1359 Copyright (C) 19@var{yy} @var{name of author}
1361 This program is free software; you can redistribute it and/or
1362 modify it under the terms of the GNU General Public License
1363 as published by the Free Software Foundation; either version 2
1364 of the License, or (at your option) any later version.
1366 This program is distributed in the hope that it will be useful,
1367 but WITHOUT ANY WARRANTY; without even the implied warranty of
1368 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE@. See the
1369 GNU General Public License for more details.
1371 You should have received a copy of the GNU General Public License along
1372 with this program; if not, write to the Free Software Foundation, Inc.,
1373 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
1376 Also add information on how to contact you by electronic and paper mail.
1378 If the program is interactive, make it output a short notice like this
1379 when it starts in an interactive mode:
1382 Gnomovision version 69, Copyright (C) 20@var{yy} @var{name of author}
1383 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
1384 type `show w'. This is free software, and you are welcome
1385 to redistribute it under certain conditions; type `show c'
1389 The hypothetical commands @samp{show w} and @samp{show c} should show
1390 the appropriate parts of the General Public License. Of course, the
1391 commands you use may be called something other than @samp{show w} and
1392 @samp{show c}; they could even be mouse-clicks or menu items---whatever
1395 You should also get your employer (if you work as a programmer) or your
1396 school, if any, to sign a ``copyright disclaimer'' for the program, if
1397 necessary. Here is a sample; alter the names:
1401 Yoyodyne, Inc., hereby disclaims all copyright
1402 interest in the program `Gnomovision'
1403 (which makes passes at compilers) written
1406 @var{signature of Ty Coon}, 1 April 1989
1407 Ty Coon, President of Vice
1411 This General Public License does not permit incorporating your program into
1412 proprietary programs. If your program is a subroutine library, you may
1413 consider it more useful to permit linking proprietary applications with the
1414 library. If this is what you want to do, use the GNU Library General
1415 Public License instead of this License.
1417 @include doclicense.texi
1419 @node Intro, Glossary, GNU Free Documentation License, Top
1420 @unnumbered Introduction
1422 You are reading about GNU Emacs, the GNU incarnation of the advanced,
1423 self-documenting, customizable, extensible real-time display editor Emacs.
1424 (The `G' in `GNU' is not silent.)
1426 We say that Emacs is a @dfn{display} editor because normally the text
1427 being edited is visible on the screen and is updated automatically as you
1428 type your commands. @xref{Screen,Display}.
1430 We call it a @dfn{real-time} editor because the display is updated very
1431 frequently, usually after each character or pair of characters you
1432 type. This minimizes the amount of information you must keep in your
1433 head as you edit. @xref{Basic,Real-time,Basic Editing}.
1435 We call Emacs advanced because it provides facilities that go beyond
1436 simple insertion and deletion: controlling subprocesses; automatic
1437 indentation of programs; viewing two or more files at once; editing
1438 formatted text; and dealing in terms of characters, words, lines,
1439 sentences, paragraphs, and pages, as well as expressions and comments in
1440 several different programming languages.
1442 @dfn{Self-documenting} means that at any time you can type a special
1443 character, @kbd{Control-h}, to find out what your options are. You can
1444 also use it to find out what any command does, or to find all the commands
1445 that pertain to a topic. @xref{Help}.
1447 @dfn{Customizable} means that you can change the definitions of Emacs
1448 commands in little ways. For example, if you use a programming language in
1449 which comments start with @samp{<**} and end with @samp{**>}, you can tell
1450 the Emacs comment manipulation commands to use those strings
1451 (@pxref{Comments}). Another sort of customization is rearrangement of the
1452 command set. For example, if you prefer the four basic cursor motion
1453 commands (up, down, left and right) on keys in a diamond pattern on the
1454 keyboard, you can rebind the keys that way. @xref{Customization}.
1456 @dfn{Extensible} means that you can go beyond simple customization and
1457 write entirely new commands, programs in the Lisp language to be run by
1458 Emacs's own Lisp interpreter. Emacs is an ``on-line extensible''
1459 system, which means that it is divided into many functions that call
1460 each other, any of which can be redefined in the middle of an editing
1461 session. Almost any part of Emacs can be replaced without making a
1462 separate copy of all of Emacs. Most of the editing commands of Emacs
1463 are written in Lisp; the few exceptions could have been written
1464 in Lisp but are written in C for efficiency. Although only a programmer
1465 can write an extension, anybody can use it afterward. If you want to
1466 learn Emacs Lisp programming, we recommend the @cite{Introduction to
1467 Emacs Lisp} by Robert J. Chassell, also published by the Free Software
1470 When run under the X Window System, Emacs provides its own menus and
1471 convenient bindings to mouse buttons. But Emacs can provide many of the
1472 benefits of a window system on a text-only terminal. For instance, you
1473 can look at or edit several files at once, move text between files, and
1474 edit files while running shell commands.
1476 @include screen.texi
1477 @include commands.texi
1478 @include entering.texi
1484 @include killing.texi
1486 @include display.texi
1487 @include search.texi
1490 @include buffers.texi
1491 @include windows.texi
1492 @include frames.texi
1495 @include indent.texi
1497 @include programs.texi
1498 @include building.texi
1499 @include maintaining.texi
1500 @include abbrevs.texi
1501 @include picture.texi
1502 @include sending.texi
1505 @include calendar.texi
1507 @include custom.texi
1508 @include trouble.texi
1509 @include cmdargs.texi
1510 @include xresources.texi
1516 @include glossary.texi
1521 @c The Option Index is produced only in the on-line version,
1522 @c because the index entries related to command-line options
1523 @c tend to point to the same pages and all begin with a dash.
1524 @c This, and the need to keep the node links consistent, are
1525 @c the reasons for the funky @iftex/@ifnottex dance below.
1526 @c The Option Index is _not_ before Key Index, because that
1527 @c would require changes in the glossary.texi's @node line.
1528 @c It is not after Concept Index for similar reasons.
1531 @node Key Index, Command Index, Glossary, Top
1532 @unnumbered Key (Character) Index
1537 @node Key Index, Option Index, Glossary, Top
1538 @unnumbered Key (Character) Index
1541 @node Option Index, Command Index, Key Index, Top
1542 @unnumbered Command-Line Options Index
1545 @node Command Index, Variable Index, Option Index, Top
1546 @unnumbered Command and Function Index
1551 @node Command Index, Variable Index, Key Index, Top
1552 @unnumbered Command and Function Index
1556 @node Variable Index, Concept Index, Command Index, Top
1557 @unnumbered Variable Index
1560 @node Concept Index, Acknowledgments, Variable Index, Top
1561 @unnumbered Concept Index