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