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