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