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