faq.texi 152 KB
Newer Older
Glenn Morris's avatar
Glenn Morris committed
1 2
\input texinfo   @c -*- mode: texinfo; -*-
@c %**start of header
3
@setfilename ../../info/efaq
Glenn Morris's avatar
Glenn Morris committed
4 5 6 7
@settitle GNU Emacs FAQ
@c %**end of header

@c This is used in many places
Chong Yidong's avatar
Chong Yidong committed
8
@set VER 23.0.94
Glenn Morris's avatar
Glenn Morris committed
9 10 11 12 13 14

@c This file is maintained by Romain Francoise <rfrancoise@gnu.org>.
@c Feel free to install changes without prior permission (but I'd
@c appreciate a notice if you do).

@copying
Glenn Morris's avatar
Glenn Morris committed
15
Copyright @copyright{} 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Glenn Morris's avatar
Glenn Morris committed
16
Free Software Foundation, Inc.@*
17 18 19 20
Copyright @copyright{} 1994, 1995, 1996, 1997, 1998, 1999, 2000
Reuven M. Lerner@*
Copyright @copyright{} 1992, 1993 Steven Byrnes@*
Copyright @copyright{} 1990, 1991, 1992 Joseph Brian Wells@*
Glenn Morris's avatar
Glenn Morris committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

@quotation
This list of frequently asked questions about GNU Emacs with answers
(``FAQ'') may be translated into other languages, transformed into other
formats (e.g. Texinfo, Info, WWW, WAIS), and updated with new information.

The same conditions apply to any derivative of the FAQ as apply to the FAQ
itself.  Every copy of the FAQ must include this notice or an approved
translation, information on who is currently maintaining the FAQ and how to
contact them (including their e-mail address), and information on where the
latest version of the FAQ is archived (including FTP information).

The FAQ may be copied and redistributed under these conditions, except that
the FAQ may not be embedded in a larger literary work unless that work
itself allows free copying and redistribution.

[This version has been heavily edited since it was included in the Emacs
distribution.]
@end quotation
@end copying

@dircategory Emacs
@direntry
* Emacs FAQ: (efaq).	Frequently Asked Questions about Emacs.
@end direntry

@c The @titlepage stuff only appears in the printed version
@titlepage
@sp 10
@center @titlefont{GNU Emacs FAQ}

@c The following two commands start the copyright page.
@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage

58 59
@contents

Glenn Morris's avatar
Glenn Morris committed
60 61
@node Top, FAQ notation, (dir), (dir)
@top The GNU Emacs FAQ
Glenn Morris's avatar
Glenn Morris committed
62

63
@c FIXME @today is just the day we ran `makeinfo'.
Glenn Morris's avatar
Glenn Morris committed
64 65 66 67 68 69
This is the GNU Emacs FAQ, last updated on @today{}.

This FAQ is maintained as a part of GNU Emacs.  If you find any errors,
or have any suggestions, please use @kbd{M-x report-emacs-bug} to report
them.

70 71 72 73 74 75 76 77 78 79 80 81 82
This is the version of the FAQ distributed with Emacs @value{VER}, and
mainly describes that version.  Although there is some information on
older versions, details about very old versions (now only of historical
interest) have been removed.  If you are interested in this, consult
either the version of the FAQ distributed with older versions of Emacs,
or the history of this document in the Emacs source repository.

Since Emacs releases are very stable, we recommend always running the
latest release.

This FAQ is not updated very frequently.  When you have a question about
Emacs, the Emacs manual is often the best starting point.

83 84 85 86
@ifnottex
@insertcopying
@end ifnottex 

Glenn Morris's avatar
Glenn Morris committed
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
@menu
* FAQ notation::
* General questions::
* Getting help::
* Status of Emacs::
* Common requests::
* Bugs and problems::
* Compiling and installing Emacs::
* Finding Emacs and related packages::
* Major packages and programs::
* Key bindings::
* Alternate character sets::
* Mail and news::
* Concept index::
@end menu

@c ------------------------------------------------------------
Glenn Morris's avatar
Glenn Morris committed
104
@node FAQ notation
Glenn Morris's avatar
Glenn Morris committed
105 106 107 108 109 110 111 112 113 114 115
@chapter FAQ notation
@cindex FAQ notation

This chapter describes notation used in the GNU Emacs FAQ, as well as in
the Emacs documentation.  Consult this section if this is the first time
you are reading the FAQ, or if you are confused by notation or terms
used in the FAQ.

@menu
* Basic keys::
* Extended commands::
116
* Emacs manual::
Glenn Morris's avatar
Glenn Morris committed
117 118 119 120
* File-name conventions::
* Common acronyms::
@end menu

Glenn Morris's avatar
Glenn Morris committed
121
@node Basic keys
Glenn Morris's avatar
Glenn Morris committed
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
@section What do these mean: @kbd{C-h}, @kbd{C-M-a}, @key{RET}, @kbd{@key{ESC} a}, etc.?
@cindex Basic keys
@cindex Control key, notation for
@cindex @key{Meta} key, notation for
@cindex Control-Meta characters, notation for
@cindex @kbd{C-h}, definition of
@cindex @kbd{C-M-h}, definition of
@cindex @key{DEL}, definition of
@cindex @key{ESC}, definition of
@cindex @key{LFD}, definition of
@cindex @key{RET}, definition of
@cindex @key{SPC}, definition of
@cindex @key{TAB}, definition of
@cindex Notation for keys

@itemize @bullet

@item
@kbd{C-x}: press the @key{x} key while holding down the @key{Control} key

@item
@kbd{M-x}: press the @key{x} key while holding down the @key{Meta} key
(if your computer doesn't have a @key{Meta} key, @pxref{No Meta key})

@item
@kbd{M-C-x}: press the @key{x} key while holding down both @key{Control}
and @key{Meta}

@item
@kbd{C-M-x}: a synonym for the above

@item
@key{LFD}: Linefeed or Newline; same as @kbd{C-j}

@item
@key{RET}: @key{Return}, sometimes marked @key{Enter}; same as @kbd{C-m}

@item
@key{DEL}: @key{Delete}, usually @strong{not} the same as
@key{Backspace}; same as @kbd{C-?} (see @ref{Backspace invokes help}, if
deleting invokes Emacs help)

@item
@key{ESC}: Escape; same as @kbd{C-[}

@item
@key{TAB}: Tab; same as @kbd{C-i}

@item
@key{SPC}: Space bar

@end itemize

Key sequences longer than one key (and some single-key sequences) are
written inside quotes or on lines by themselves, like this:

@display
  @kbd{M-x frobnicate-while-foo RET}
@end display

@noindent
Any real spaces in such a key sequence should be ignored; only @key{SPC}
really means press the space key.

The @acronym{ASCII} code sent by @kbd{C-x} (except for @kbd{C-?}) is the value
that would be sent by pressing just @key{x} minus 96 (or 64 for
upper-case @key{X}) and will be from 0 to 31.  On Unix and GNU/Linux
terminals, the @acronym{ASCII} code sent by @kbd{M-x} is the sum of 128 and the
@acronym{ASCII} code that would be sent by pressing just @key{x}.  Essentially,
@key{Control} turns off bits 5 and 6 and @key{Meta} turns on bit
7@footnote{
DOS and Windows terminals don't set bit 7 when the @key{Meta} key is
pressed.}.

@kbd{C-?} (aka @key{DEL}) is @acronym{ASCII} code 127.  It is a misnomer to call
@kbd{C-?}  a ``control'' key, since 127 has both bits 5 and 6 turned ON.
Also, on very few keyboards does @kbd{C-?} generate @acronym{ASCII} code 127.
199
@c FIXME I cannot understand the previous sentence.
Glenn Morris's avatar
Glenn Morris committed
200

201 202
@inforef{Keys, Keys, emacs}, for more information.  (@xref{Emacs
manual}, for more information about Info.)
Glenn Morris's avatar
Glenn Morris committed
203

Glenn Morris's avatar
Glenn Morris committed
204
@node Extended commands
Glenn Morris's avatar
Glenn Morris committed
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
@section What does @file{M-x @var{command}} mean?
@cindex Extended commands
@cindex Commands, extended
@cindex M-x, meaning of

@kbd{M-x @var{command}} means type @kbd{M-x}, then type the name of the
command, then type @key{RET}.  (@xref{Basic keys}, if you're not sure
what @kbd{M-x} and @key{RET} mean.)

@kbd{M-x} (by default) invokes the command
@code{execute-extended-command}.  This command allows you to run any
Emacs command if you can remember the command's name.  If you can't
remember the command's name, you can type @key{TAB} and @key{SPC} for
completion, @key{?} for a list of possibilities, and @kbd{M-p} and
@kbd{M-n} (or up-arrow and down-arrow on terminals that have these
editing keys) to see previous commands entered.  An Emacs @dfn{command}
is an @dfn{interactive} Emacs function.

@cindex @key{Do} key
Your system administrator may have bound other key sequences to invoke
@code{execute-extended-command}.  A function key labeled @kbd{Do} is a
good candidate for this, on keyboards that have such a key.

If you need to run non-interactive Emacs functions, see @ref{Evaluating
Emacs Lisp code}.

231 232 233 234 235
@node Emacs manual
@section How do I read topic XXX in the Emacs manual?
@cindex Emacs manual, reading topics in
@cindex Reading topics in the Emacs manual
@cindex Finding topics in the Emacs manual
Glenn Morris's avatar
Glenn Morris committed
236 237
@cindex Info, finding topics in

238
When we refer you to some @var{topic} in the Emacs manual, you can
Glenn Morris's avatar
Glenn Morris committed
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
read this manual node inside Emacs (assuming nothing is broken) by
typing @kbd{C-h i m emacs @key{RET} m @var{topic} @key{RET}}.

This invokes Info, the GNU hypertext documentation browser.  If you don't
already know how to use Info, type @key{?} from within Info.

If we refer to @var{topic}:@var{subtopic}, type @kbd{C-h i m emacs
@key{RET} m @var{topic} @key{RET} m @var{subtopic} @key{RET}}.

If these commands don't work as expected, your system administrator may
not have installed the Info files, or may have installed them
improperly.  In this case you should complain.

@xref{Getting a printed manual}, if you would like a paper copy of the
Emacs manual.

Glenn Morris's avatar
Glenn Morris committed
255
@node File-name conventions
256
@section What are @file{etc/GNU}, @file{src/config.h}, and @file{site-lisp/default.el}?
Glenn Morris's avatar
Glenn Morris committed
257 258 259 260 261
@cindex File-name conventions
@cindex Conventions for file names
@cindex Directories and files that come with Emacs

These are files that come with Emacs.  The Emacs distribution is divided
262
into subdirectories; e.g. @file{etc}, @file{lisp}, and @file{src}.
Glenn Morris's avatar
Glenn Morris committed
263 264 265 266 267 268 269 270

If you use Emacs, but don't know where it is kept on your system, start
Emacs, then type @kbd{C-h v data-directory @key{RET}}.  The directory
name displayed by this will be the full pathname of the installed
@file{etc} directory.  (This full path is recorded in the Emacs variable
@code{data-directory}, and @kbd{C-h v} displays the value and the
documentation of a variable.)

271
The location of your Info directory (i.e., where Info documentation
Glenn Morris's avatar
Glenn Morris committed
272 273 274 275
is stored) is kept in the variable @code{Info-default-directory-list}.  Use
@kbd{C-h v Info-default-directory-list @key{RET}} to see the value of
this variable, which will be a list of directory names.  The last
directory in that list is probably where most Info files are stored.  By
276
default, Info documentation is placed in @file{/usr/local/share/info}.
Glenn Morris's avatar
Glenn Morris committed
277 278 279 280 281 282 283

Some of these files are available individually via FTP or e-mail; see
@ref{Informational files for Emacs}.  They all are available in the
source distribution.  Many of the files in the @file{etc} directory are
also available via the Emacs @samp{Help} menu, or by typing @kbd{C-h ?}
(@kbd{M-x help-for-help}).

Glenn Morris's avatar
Glenn Morris committed
284
@node Common acronyms
285
@section What are FSF, LPF, GNU, RMS, FTP, and GPL?
Glenn Morris's avatar
Glenn Morris committed
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
@cindex FSF, definition of
@cindex LPF, definition of
@cindex GNU, definition of
@cindex RMS, definition of
@cindex Stallman, Richard, acronym for
@cindex Richard Stallman, acronym for
@cindex FTP, definition of
@cindex GPL, definition of
@cindex Acronyms, definitions for
@cindex Common acronyms, definitions for

@table @asis

@item FSF
Free Software Foundation

@item LPF
League for Programming Freedom

@item GNU
GNU's Not Unix

@item RMS
Richard Matthew Stallman

@item FTP
File Transfer Protocol

@item GPL
GNU General Public License

@end table

319
Avoid confusing the FSF and the LPF.  The LPF opposes
Glenn Morris's avatar
Glenn Morris committed
320
look-and-feel copyrights and software patents.  The FSF aims to make
321
high quality free software available for everyone.
Glenn Morris's avatar
Glenn Morris committed
322 323 324 325 326 327 328 329 330

The word ``free'' in the title of the Free Software Foundation refers to
``freedom,'' not ``zero cost.''  Anyone can charge any price for
GPL-covered software that they want to.  However, in practice, the
freedom enforced by the GPL leads to low prices, because you can always
get the software for less money from someone else, since everyone has
the right to resell or give away GPL-covered software.

@c ------------------------------------------------------------
Glenn Morris's avatar
Glenn Morris committed
331
@node General questions
Glenn Morris's avatar
Glenn Morris committed
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347
@chapter General questions
@cindex General questions

This chapter contains general questions having to do with Emacs, the
Free Software Foundation, and related organizations.

@menu
* The LPF::
* Real meaning of copyleft::
* Guidelines for newsgroup postings::
* Newsgroup archives::
* Reporting bugs::
* Unsubscribing from Emacs lists::
* Contacting the FSF::
@end menu

Glenn Morris's avatar
Glenn Morris committed
348
@node The LPF
Glenn Morris's avatar
Glenn Morris committed
349 350 351 352 353 354 355
@section What is the LPF?
@cindex LPF, description of
@cindex League for Programming Freedom
@cindex Software patents, opposition to
@cindex Patents for software, opposition to

The LPF opposes the expanding danger of software patents and
356 357
look-and-feel copyrights.  More information on the LPF's views is
available at @uref{http://progfree.org/, the LPF home page}.
Glenn Morris's avatar
Glenn Morris committed
358

Glenn Morris's avatar
Glenn Morris committed
359
@node Real meaning of copyleft
Glenn Morris's avatar
Glenn Morris committed
360 361 362 363 364 365 366 367 368
@section What is the real legal meaning of the GNU copyleft?
@cindex Copyleft, real meaning of
@cindex GPL, real meaning of
@cindex General Public License, real meaning of
@cindex Discussion of the GPL

The real legal meaning of the GNU General Public License (copyleft) will
only be known if and when a judge rules on its validity and scope.
There has never been a copyright infringement case involving the GPL to
369 370 371 372 373 374
set any precedents.  Although legal actions have been brought against
companies for violating the terms of the GPL, so far all have been
settled out of court (in favour of the plaintiffs).  Please take any
discussion regarding this issue to the newsgroup
@uref{news:gnu.misc.discuss}, which was created to hold the extensive
flame wars on the subject.
Glenn Morris's avatar
Glenn Morris committed
375 376 377 378 379 380 381 382 383 384 385 386 387

RMS writes:

@quotation
The legal meaning of the GNU copyleft is less important than the spirit,
which is that Emacs is a free software project and that work pertaining
to Emacs should also be free software.  ``Free'' means that all users
have the freedom to study, share, change and improve Emacs.  To make
sure everyone has this freedom, pass along source code when you
distribute any version of Emacs or a related program, and give the
recipients the same freedom that you enjoyed.
@end quotation

Glenn Morris's avatar
Glenn Morris committed
388
@node Guidelines for newsgroup postings
389
@section  What are appropriate messages for the various Emacs newsgroups?
Glenn Morris's avatar
Glenn Morris committed
390 391 392 393 394 395 396 397 398 399 400 401 402
@cindex Newsgroups, appropriate messages for
@cindex GNU newsgroups, appropriate messages for
@cindex Usenet groups, appropriate messages for
@cindex Mailing lists, appropriate messages for
@cindex Posting messages to newsgroups

@cindex GNU mailing lists
The file @file{etc/MAILINGLISTS} describes the purpose of each GNU
mailing list.  (@xref{Informational files for Emacs}, if you want a copy
of the file.)  For those lists which are gatewayed with newsgroups, it
lists both the newsgroup name and the mailing list address.

The newsgroup @uref{news:comp.emacs} is for discussion of Emacs programs
403
in general.  The newsgroup @uref{news:gnu.emacs.help} is specifically
404 405
for GNU Emacs.  It therefore makes no sense to cross-post to both
groups, since only one can be appropriate to any question.
Glenn Morris's avatar
Glenn Morris committed
406 407 408 409 410 411 412 413 414 415 416 417

Messages advocating ``non-free'' software are considered unacceptable on
any of the @code{gnu.*} newsgroups except for @uref{news:gnu.misc.discuss},
which was created to hold the extensive flame-wars on the subject.
``Non-free'' software includes any software for which the end user can't
freely modify the source code and exchange enhancements.  Be careful to
remove the @code{gnu.*} groups from the @samp{Newsgroups:} line when
posting a followup that recommends such software.

@uref{news:gnu.emacs.bug} is a place where bug reports appear, but avoid
posting bug reports to this newsgroup directly (@pxref{Reporting bugs}).

Glenn Morris's avatar
Glenn Morris committed
418
@node Newsgroup archives
Glenn Morris's avatar
Glenn Morris committed
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434
@section Where can I get old postings to @uref{news:gnu.emacs.help} and other GNU groups?
@cindex Archived postings from @code{gnu.emacs.help}
@cindex Usenet archives for GNU groups
@cindex Old Usenet postings for GNU groups

The FSF has maintained archives of all of the GNU mailing lists for many
years, although there may be some unintentional gaps in coverage.  The
archive is not particularly well organized or easy to retrieve
individual postings from, but pretty much everything is there.

The archive is at @uref{ftp://lists.gnu.org/}.

The archive can be browsed over the web at
@uref{http://lists.gnu.org/archive/html/, the GNU mail archive}.

Web-based Usenet search services, such as
435
@uref{http://groups.google.com/groups/dir?q=gnu&, Google}, also
Glenn Morris's avatar
Glenn Morris committed
436 437 438
archive the @code{gnu.*} groups.

You can read the archives of the @code{gnu.*} groups and post new
439 440
messages at @uref{http://gmane.org/, Gmane}.  Gmane is a service that
presents mailing lists as newsgroups.
Glenn Morris's avatar
Glenn Morris committed
441

Glenn Morris's avatar
Glenn Morris committed
442
@node Reporting bugs
Glenn Morris's avatar
Glenn Morris committed
443 444 445 446 447 448 449 450
@section Where should I report bugs and other problems with Emacs?
@cindex Bug reporting
@cindex Good bug reports
@cindex How to submit a bug report
@cindex Reporting bugs

The correct way to report Emacs bugs is to use the command
@kbd{M-x report-emacs-bug}.  It sets up a mail buffer with the
451
essential information and the correct e-mail address, which is
Glenn Morris's avatar
Glenn Morris committed
452 453 454 455 456 457 458 459 460
@email{bug-gnu-emacs@@gnu.org} for the released versions of Emacs.
Anything sent to @email{bug-gnu-emacs@@gnu.org} also appears in the
newsgroup @uref{news:gnu.emacs.bug}, but please use e-mail instead of
news to submit the bug report.  This ensures a reliable return address
so you can be contacted for further details.

Be sure to read the ``Bugs'' section of the Emacs manual before reporting
a bug!  The manual describes in detail how to submit a useful bug
report (@pxref{Bugs, , Reporting Bugs, emacs, The GNU Emacs Manual}).
461
(@xref{Emacs manual}, if you don't know how to read the manual.)
Glenn Morris's avatar
Glenn Morris committed
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492

RMS says:

@quotation
Sending bug reports to @email{help-gnu-emacs@@gnu.org} (which has the
effect of posting on @uref{news:gnu.emacs.help}) is undesirable because
it takes the time of an unnecessarily large group of people, most of
whom are just users and have no idea how to fix these problem.
@email{bug-gnu-emacs@@gnu.org} reaches a much smaller group of people
who are more likely to know what to do and have expressed a wish to
receive more messages about Emacs than the others.
@end quotation

RMS says it is sometimes fine to post to @uref{news:gnu.emacs.help}:

@quotation
If you have reported a bug and you don't hear about a possible fix,
then after a suitable delay (such as a week) it is okay to post on
@code{gnu.emacs.help} asking if anyone can help you.
@end quotation

If you are unsure whether you have found a bug, consider the following
non-exhaustive list, courtesy of RMS:

@quotation
If Emacs crashes, that is a bug.  If Emacs gets compilation errors
while building, that is a bug.  If Emacs crashes while building, that
is a bug.  If Lisp code does not do what the documentation says it
does, that is a bug.
@end quotation

Glenn Morris's avatar
Glenn Morris committed
493
@node Unsubscribing from Emacs lists
494
@section  How do I unsubscribe from a mailing list?
Glenn Morris's avatar
Glenn Morris committed
495 496 497
@cindex Unsubscribing from GNU mailing lists
@cindex Removing yourself from GNU mailing lists

498
If you are receiving a GNU mailing list named @var{list}, you should be
Glenn Morris's avatar
Glenn Morris committed
499
able to unsubscribe from it by sending a request to the address
500 501 502 503
@email{@var{list}-request@@gnu.org}.  Mailing lists mails normally
contain information in either the message header
(@samp{List-Unsubscribe:}) or as a footer that tells you how to
unsubscribe.
Glenn Morris's avatar
Glenn Morris committed
504

Glenn Morris's avatar
Glenn Morris committed
505
@node Contacting the FSF
Glenn Morris's avatar
Glenn Morris committed
506 507 508 509 510 511 512 513 514
@section  What is the current address of the FSF?
@cindex Snail mail address of the FSF
@cindex Postal address of the FSF
@cindex Contracting the FSF
@cindex Free Software Foundation, contacting

@table @asis

@item E-mail
515
info@@fsf.org
Glenn Morris's avatar
Glenn Morris committed
516 517 518 519 520 521 522 523

@item Telephone
+1-617-542-5942

@item Fax
+1-617-542-2652

@item World Wide Web
524
@uref{http://www.fsf.org/}
Glenn Morris's avatar
Glenn Morris committed
525 526 527 528 529 530 531 532 533 534 535

@item Postal address
Free Software Foundation@*
51 Franklin Street, Fifth Floor@*
Boston, MA 02110-1301@*
USA@*

@end table

@cindex Ordering GNU software
For details on how to order items directly from the FSF, see the
536
@uref{http://shop.fsf.org/, FSF on-line store}.
Glenn Morris's avatar
Glenn Morris committed
537 538

@c ------------------------------------------------------------
Glenn Morris's avatar
Glenn Morris committed
539
@node Getting help
Glenn Morris's avatar
Glenn Morris committed
540 541 542
@chapter Getting help
@cindex Getting help

543
This chapter tells you how to get help with Emacs.
Glenn Morris's avatar
Glenn Morris committed
544 545 546 547 548 549 550 551 552 553 554 555 556 557

@menu
* Basic editing::
* Learning how to do something::
* Getting a printed manual::
* Emacs Lisp documentation::
* Installing Texinfo documentation::
* Printing a Texinfo file::
* Viewing Info files outside of Emacs::
* Informational files for Emacs::
* Help installing Emacs::
* Obtaining the FAQ::
@end menu

Glenn Morris's avatar
Glenn Morris committed
558
@node Basic editing
Glenn Morris's avatar
Glenn Morris committed
559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577
@section I'm just starting Emacs; how do I do basic editing?
@cindex Basic editing with Emacs
@cindex Beginning editing
@cindex Tutorial, invoking the
@cindex Self-paced tutorial, invoking the
@cindex Help system, entering the

Type @kbd{C-h t} to invoke the self-paced tutorial.  Just typing
@kbd{C-h} enters the help system.  Starting with Emacs 22, the tutorial
is available in many foreign languages such as French, German, Japanese,
Russian, etc.  Use @kbd{M-x help-with-tutorial-spec-language @key{RET}}
to choose your language and start the tutorial.

Your system administrator may have changed @kbd{C-h} to act like
@key{DEL} to deal with local keyboards.  You can use @kbd{M-x
help-for-help} instead to invoke help.  To discover what key (if any)
invokes help on your system, type @kbd{M-x where-is @key{RET}
help-for-help @key{RET}}.  This will print a comma-separated list of key
sequences in the echo area.  Ignore the last character in each key
578 579
sequence listed.  Each of the resulting key sequences (e.g. @key{F1} is
common) invokes help.
Glenn Morris's avatar
Glenn Morris committed
580 581 582 583

Emacs help works best if it is invoked by a single key whose value
should be stored in the variable @code{help-char}.

Glenn Morris's avatar
Glenn Morris committed
584
@node Learning how to do something
Glenn Morris's avatar
Glenn Morris committed
585 586 587 588 589 590 591 592 593 594 595 596
@section How do I find out how to do something in Emacs?
@cindex Help for Emacs
@cindex Learning to do something in Emacs
@cindex Reference card for Emacs
@cindex Overview of help systems

There are several methods for finding out how to do things in Emacs.

@itemize @bullet

@cindex Reading the Emacs manual
@item
597
The complete text of the Emacs manual is available via the Info
Glenn Morris's avatar
Glenn Morris committed
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642
hypertext reader.  Type @kbd{C-h r} to display the manual in Info mode.
Typing @key{h} immediately after entering Info will provide a short
tutorial on how to use it.

@cindex Lookup a subject in a manual
@cindex Index search in a manual
@item
To quickly locate the section of the manual which discusses a certain
issue, or describes a command or a variable, type @kbd{C-h i m emacs
@key{RET} i @var{topic} @key{RET}}, where @var{topic} is the name of the
topic, the command, or the variable which you are looking for.  If this
does not land you on the right place in the manual, press @kbd{,}
(comma) repeatedly until you find what you need.  (The @kbd{i} and
@kbd{,} keys invoke the index-searching functions, which look for the
@var{topic} you type in all the indices of the Emacs manual.)

@cindex Apropos
@item
You can list all of the commands whose names contain a certain word
(actually which match a regular expression) using @kbd{C-h a} (@kbd{M-x
command-apropos}).

@cindex Command description in the manual
@item
The command @kbd{C-h F} (@code{Info-goto-emacs-command-node}) prompts
for the name of a command, and then attempts to find the section in the
Emacs manual where that command is described.

@cindex Finding commands and variables
@item
You can list all of the functions and variables whose names contain a
certain word using @kbd{M-x apropos}.

@item
You can list all of the functions and variables whose documentation
matches a regular expression or a string, using @kbd{M-x
apropos-documentation}.

@item
You can order a hardcopy of the manual from the FSF.  @xref{Getting a
printed manual}.

@cindex Reference cards, in other languages
@item
You can get a printed reference card listing commands and keys to
643
invoke them.  You can order one from the FSF for $2 (or 10 for $18),
Glenn Morris's avatar
Glenn Morris committed
644
or you can print your own from the @file{etc/refcards/refcard.tex} or
645
@file{etc/refcards/refcard.pdf} files in the Emacs distribution.
Glenn Morris's avatar
Glenn Morris committed
646 647 648 649 650
Beginning with version 21.1, the Emacs distribution comes with
translations of the reference card into several languages; look for
files named @file{etc/refcards/@var{lang}-refcard.*}, where @var{lang}
is a two-letter code of the language.  For example, the German version
of the reference card is in the files @file{etc/refcards/de-refcard.tex}
651
and @file{etc/recards/de-refcard.pdf}.
Glenn Morris's avatar
Glenn Morris committed
652 653 654 655 656 657 658 659

@item
There are many other commands in Emacs for getting help and
information.  To get a list of these commands, type @samp{?} after
@kbd{C-h}.

@end itemize

Glenn Morris's avatar
Glenn Morris committed
660
@node Getting a printed manual
Glenn Morris's avatar
Glenn Morris committed
661 662 663 664 665 666
@section How do I get a printed copy of the Emacs manual?
@cindex Printed Emacs manual, obtaining
@cindex Manual, obtaining a printed or HTML copy of
@cindex Emacs manual, obtaining a printed or HTML copy of

You can order a printed copy of the Emacs manual from the FSF.  For
667
details see the @uref{http://shop.fsf.org/, FSF on-line store}.
Glenn Morris's avatar
Glenn Morris committed
668

669
The full Texinfo source for the manual also comes in the @file{doc/emacs}
Glenn Morris's avatar
Glenn Morris committed
670
directory of the Emacs distribution, if you're daring enough to try to
671
print out this several-hundred-page manual yourself (@pxref{Printing a Texinfo
Glenn Morris's avatar
Glenn Morris committed
672 673 674
file}).

If you absolutely have to print your own copy, and you don't have @TeX{},
675
you can get a PostScript or PDF (or HTML) version from
Glenn Morris's avatar
Glenn Morris committed
676 677 678

@uref{http://www.gnu.org/software/emacs/manual/}

679
@xref{Learning how to do something}, for how to view the manual.
Glenn Morris's avatar
Glenn Morris committed
680

Glenn Morris's avatar
Glenn Morris committed
681
@node Emacs Lisp documentation
Glenn Morris's avatar
Glenn Morris committed
682 683 684 685 686 687 688 689 690 691 692
@section Where can I get documentation on Emacs Lisp?
@cindex Documentation on Emacs Lisp
@cindex Function documentation
@cindex Variable documentation
@cindex Emacs Lisp Reference Manual
@cindex Reference manual for Emacs Lisp

Within Emacs, you can type @kbd{C-h f} to get the documentation for a
function, @kbd{C-h v} for a variable.

For more information, the Emacs Lisp Reference Manual is available
693
in Info format.  @xref{Top, Emacs Lisp,, elisp, The
Glenn Morris's avatar
Glenn Morris committed
694 695 696
Emacs Lisp Reference Manual}.

You can also order a hardcopy of the manual, details on ordering it from
697
FSF are on the @uref{http://shop.fsf.org/, FSF on-line store}.
Glenn Morris's avatar
Glenn Morris committed
698 699 700 701 702

An HTML version of the Emacs Lisp Reference Manual is available at

@uref{http://www.gnu.org/software/emacs/elisp-manual/elisp.html}

Glenn Morris's avatar
Glenn Morris committed
703
@node Installing Texinfo documentation
Glenn Morris's avatar
Glenn Morris committed
704 705 706 707 708 709 710 711
@section How do I install a piece of Texinfo documentation?
@cindex Texinfo documentation, installing
@cindex Installing Texinfo documentation
@cindex New Texinfo files, installing
@cindex Documentation, installing new Texinfo files
@cindex Info files, how to install

First, you must turn the Texinfo files into Info files.  You may do this
712
using the stand-alone @file{makeinfo} program, available as part of the
Glenn Morris's avatar
Glenn Morris committed
713 714
Texinfo package at

715
@uref{http://www.gnu.org/software/texinfo/}
Glenn Morris's avatar
Glenn Morris committed
716 717 718

For information about the Texinfo format, read the Texinfo manual which
comes with the Texinfo package.  This manual also comes installed in
719
Info format, so you can read it from Emacs; type @kbd{C-h i m texinfo
Glenn Morris's avatar
Glenn Morris committed
720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803
@key{RET}}.

Alternatively, you could use the Emacs command @kbd{M-x
texinfo-format-buffer}, after visiting the Texinfo source file of the
manual you want to convert.

Neither @code{texinfo-format-buffer} nor @file{makeinfo} installs the
resulting Info files in Emacs's Info tree.  To install Info files,
perform these steps:

@enumerate
@item
Move the files to the @file{info} directory in the installed Emacs
distribution.  @xref{File-name conventions}, if you don't know where that
is.

@item
Run the @code{install-info} command, which is part of the Texinfo
distribution, to update the main Info directory menu, like this:

@example
 install-info --info-dir=@var{dir-path} @var{dir-path}/@var{file}
@end example

@noindent
where @var{dir-path} is the full path to the directory where you copied
the produced Info file(s), and @var{file} is the name of the Info file
you produced and want to install.

If you don't have the @code{install-info} command installed, you can
edit the file @file{info/dir} in the installed Emacs distribution, and
add a line for the top level node in the Info package that you are
installing.  Follow the examples already in this file.  The format is:

@example
* Topic: (relative-pathname).  Short description of topic.
@end example

@end enumerate

If you want to install Info files and you don't have the necessary
privileges, you have several options:

@itemize @bullet
@item
Info files don't actually need to be installed before being used.
You can use a prefix argument for the @code{info} command and specify
the name of the Info file in the minibuffer.  This goes to the node
named @samp{Top} in that file.  For example, to view a Info file named
@file{@var{info-file}} in your home directory, you can type this:

@example
@kbd{C-u C-h i ~/@var{info-file} @key{RET}}
@end example

Alternatively, you can feed a file name to the @code{Info-goto-node}
command (invoked by pressing @key{g} in Info mode) by typing the name
of the file in parentheses, like this:

@example
@kbd{C-h i g (~/@var{info-file}) @key{RET}}
@end example

@item
You can create your own Info directory.  You can tell Emacs where that
Info directory is by adding its pathname to the value of the variable
@code{Info-default-directory-list}.  For example, to use a private Info
directory which is a subdirectory of your home directory named @file{Info},
you could put this in your @file{.emacs} file:

@lisp
(setq Info-default-directory-list
      (cons "~/Info" Info-default-directory-list))
@end lisp

You will need a top-level Info file named @file{dir} in this directory
which has everything the system @file{dir} file has in it, except it should
list only entries for Info files in that directory.  You might not need
it if all files in this directory were referenced by other @file{dir}
files.  The node lists from all @file{dir} files in
@code{Info-default-directory-list} are merged by the Info system.

@end itemize

Glenn Morris's avatar
Glenn Morris committed
804
@node Printing a Texinfo file
Glenn Morris's avatar
Glenn Morris committed
805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825
@section How do I print a Texinfo file?
@cindex Printing a Texinfo file
@cindex Texinfo file, printing
@cindex Printing documentation

You can't get nicely printed output from Info files; you must still have
the original Texinfo source file for the manual you want to print.

Assuming you have @TeX{} installed on your system, follow these steps:

@enumerate

@item
Make sure the first line of the Texinfo file looks like this:

@example
\input texinfo
@end example

You may need to change @samp{texinfo} to the full pathname of the
@file{texinfo.tex} file, which comes with Emacs as
826
@file{doc/misc/texinfo.tex} (or copy or link it into the current directory).
Glenn Morris's avatar
Glenn Morris committed
827 828 829 830 831 832 833 834 835

@item
Type @kbd{texi2dvi @var{texinfo-source}}, where @var{texinfo-source} is
the name of the Texinfo source file for which you want to produce a
printed copy.

The @samp{texi2dvi} script is part of the GNU Texinfo distribution
(@pxref{Installing Texinfo documentation}).

836 837
Alternatively, @samp{texi2pdf} produces PDF files.

Glenn Morris's avatar
Glenn Morris committed
838 839 840 841 842 843 844 845 846 847 848
@item
Print the DVI file @file{@var{texinfo-source}.dvi} in the normal way for
printing DVI files at your site.  For example, if you have a PostScript
printer, run the @code{dvips} program to print the DVI file on that
printer.

@end enumerate

To get more general instructions, retrieve the latest Texinfo package
(@pxref{Installing Texinfo documentation}).

Glenn Morris's avatar
Glenn Morris committed
849
@node Viewing Info files outside of Emacs
Glenn Morris's avatar
Glenn Morris committed
850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870
@section Can I view Info files without using Emacs?
@cindex Viewing Info files
@cindex Info file viewers
@cindex Alternative Info file viewers

Yes.  Here are some alternative programs:

@itemize @bullet

@item
@code{info}, a stand-alone version of the Info program, comes as part of
the Texinfo package.  @xref{Installing Texinfo documentation}, for
details.

@item
Tkinfo, an Info viewer that runs under X Window system and uses Tcl/Tk.
You can get Tkinfo at
@uref{http://math-www.uni-paderborn.de/~axel/tkinfo/}.

@end itemize

Glenn Morris's avatar
Glenn Morris committed
871
@node Informational files for Emacs
Glenn Morris's avatar
Glenn Morris committed
872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896
@section What informational files are available for Emacs?
@cindex Informational files included with Emacs
@cindex Files included with Emacs
@cindex @file{COPYING}, description of file
@cindex @file{DISTRIB}, description of file
@cindex @file{GNU}, description of file
@cindex @file{INTERVIEW}, description of file
@cindex @file{MACHINES}, description of file
@cindex @file{MAILINGLISTS}, description of file
@cindex @file{NEWS}, description of file

This isn't a frequently asked question, but it should be!  A variety of
informational files about Emacs and relevant aspects of the GNU project
are available for you to read.

The following files are available in the @file{etc} directory of the
Emacs distribution (see @ref{File-name conventions}, if you're not sure
where that is).

@table @file

@item COPYING
GNU General Public License

@item DISTRIB
897
Emacs Availability Information
Glenn Morris's avatar
Glenn Morris committed
898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923

@item GNU
The GNU Manifesto

@item INTERVIEW
Richard Stallman discusses his public-domain UNIX-compatible software
system with BYTE editors

@item MACHINES
Status of Emacs on Various Machines and Systems

@item MAILINGLISTS
GNU Project Electronic Mailing Lists

@item NEWS
Emacs news, a history of recent user-visible changes

@end table

More GNU information, including back issues of the @cite{GNU's
Bulletin}, are at

@uref{http://www.gnu.org/bulletins/bulletins.html} and

@uref{http://www.cs.pdx.edu/~trent/gnu/gnu.html}

Glenn Morris's avatar
Glenn Morris committed
924
@node Help installing Emacs
Glenn Morris's avatar
Glenn Morris committed
925 926 927 928 929
@section Where can I get help in installing Emacs?
@cindex Installation help
@cindex Help installing Emacs

@xref{Installing Emacs}, for some basic installation hints, and see
930
@ref{Problems building Emacs}, if you have problems with the installation.
Glenn Morris's avatar
Glenn Morris committed
931

932 933 934
The web-page @uref{http://www.fsf.org/resources/service/} lists
companies and individuals willing to sell you help in installing or
using Emacs.
Glenn Morris's avatar
Glenn Morris committed
935

Glenn Morris's avatar
Glenn Morris committed
936
@node Obtaining the FAQ
Glenn Morris's avatar
Glenn Morris committed
937 938 939 940
@section Where can I get the latest version of this FAQ?
@cindex FAQ, obtaining the
@cindex Latest FAQ version, obtaining the

941 942 943 944
The Emacs FAQ is distributed with Emacs in Info format.  You can read it
by selecting the @samp{Emacs FAQ} option from the @samp{Help} menu of
the Emacs menu bar at the top of any Emacs frame, or by typing @kbd{C-h
C-f} (@kbd{M-x view-emacs-FAQ}).
Glenn Morris's avatar
Glenn Morris committed
945 946 947


@c ------------------------------------------------------------
Glenn Morris's avatar
Glenn Morris committed
948
@node Status of Emacs
Glenn Morris's avatar
Glenn Morris committed
949 950 951
@chapter Status of Emacs
@cindex Status of Emacs

952 953
This chapter gives you basic information about Emacs, including the
status of its latest version.
Glenn Morris's avatar
Glenn Morris committed
954 955 956 957

@menu
* Origin of the term Emacs::
* Latest version of Emacs::
958
* New in Emacs 23::
Glenn Morris's avatar
Glenn Morris committed
959
* New in Emacs 22::
960 961
* New in Emacs 21::
* New in Emacs 20::
Glenn Morris's avatar
Glenn Morris committed
962 963
@end menu

Glenn Morris's avatar
Glenn Morris committed
964
@node Origin of the term Emacs
Glenn Morris's avatar
Glenn Morris committed
965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991
@section Where does the name ``Emacs'' come from?
@cindex Origin of the term ``Emacs''
@cindex Emacs name origin
@cindex TECO
@cindex Original version of Emacs

Emacs originally was an acronym for Editor MACroS.  RMS says he ``picked
the name Emacs because @key{E} was not in use as an abbreviation on ITS at
the time.''  The first Emacs was a set of macros written in 1976 at MIT
by RMS for the editor TECO (Text Editor and COrrector, originally Tape
Editor and COrrector) under ITS on a PDP-10.  RMS had already extended
TECO with a ``real-time'' full-screen mode with reprogrammable keys.
Emacs was started by @email{gls@@east.sun.com, Guy Steele} as a project
to unify the many divergent TECO command sets and key bindings at MIT,
and completed by RMS.

Many people have said that TECO code looks a lot like line noise; you
can read more at @uref{news:alt.lang.teco}.  Someone has written a TECO
implementation in Emacs Lisp (to find it, see @ref{Packages that do not
come with Emacs}); it would be an interesting project to run the
original TECO Emacs inside of Emacs.

@cindex Why Emacs?
For some not-so-serious alternative reasons for Emacs to have that
name, check out the file @file{etc/JOKES} (@pxref{File-name
conventions}).

Glenn Morris's avatar
Glenn Morris committed
992
@node Latest version of Emacs
Glenn Morris's avatar
Glenn Morris committed
993 994 995 996
@section What is the latest version of Emacs?
@cindex Version, latest
@cindex Latest version of Emacs

997 998
Emacs @value{VER} is the current version as of this writing.  A version
number with two components (e.g. @samp{22.1}) indicates a released
999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018
version; three components indicate a development
version (e.g. @samp{23.0.50} is what will eventually become @samp{23.1}).

Because Emacs undergoes many changes before a release, the version
number of a development version is not especially meaningful.  It is
better to refer to the date on which the sources were retrieved from the
development repository.

The following sections list some of the major new features in the last
few Emacs releases.  For full details of the changes in any version of
Emacs, type @kbd{C-h C-n} (@kbd{M-x view-emacs-news}).  As of Emacs 22,
you can give this command a prefix argument to read about which features
were new in older versions.

@node New in Emacs 23
@section What is different about Emacs 23?
@cindex Differences between Emacs 22 and Emacs 23
@cindex Emacs 23, new features in
@cindex Recently introduced features
@cindex Default features
Glenn Morris's avatar
Glenn Morris committed
1019

1020
@itemize
Glenn Morris's avatar
Glenn Morris committed
1021

1022 1023 1024 1025 1026 1027 1028
@cindex Anti-aliased fonts
@cindex Freetype fonts
@item
Emacs has a new font code that can use multiple font backends,
including freetype and fontconfig.  Emacs can use the Xft library for
anti-aliasing, and the otf and m17n libraries for complex text layout and
text shaping.
Glenn Morris's avatar
Glenn Morris committed
1029

1030 1031 1032 1033 1034
@cindex Unicode
@cindex Character sets
@item
The Emacs character set is now a superset of Unicode.  Several new
language environments have been added.
Glenn Morris's avatar
Glenn Morris committed
1035

1036 1037 1038 1039 1040
@cindex Multi-tty support
@cindex X and tty displays
@item
Emacs now supports using both X displays and ttys in the same session
(@samp{multi-tty}).
Glenn Morris's avatar
Glenn Morris committed
1041

1042 1043 1044
@cindex Daemon mode
@item
Emacs can be started as a daemon in the background.
Glenn Morris's avatar
Glenn Morris committed
1045

1046 1047 1048 1049 1050 1051 1052
@cindex NeXTSTEP port
@cindex GNUstep port
@cindex Mac OS X Cocoa
@item
There is a new NeXTSTEP port of Emacs.  This supports GNUstep and Mac OS
X (via the Cocoa libraries).  The Carbon port of Emacs, which supported
Mac OS X in Emacs 22, has been removed.
Glenn Morris's avatar
Glenn Morris committed
1053

1054 1055 1056 1057
@cindex Directory-local variables
@item
Directory-local variables can now be defined, in a similar manner to
file-local variables.
Glenn Morris's avatar
Glenn Morris committed
1058

1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070
@item
Transient Mark mode (@pxref{Highlighting a region}) is on by default.

@end itemize

@noindent
Other changes include: support for serial port access; D-Bus bindings; a
new Visual Line mode for line-motion; improved completion; a new mode
(@samp{DocView}) for viewing of PDF, PostScript, and DVI documents; nXML
mode (for editing XML documents) is included; VC has been updated for
newer version control systems; etc.  As always, consult the @file{NEWS}
file for more information.
Glenn Morris's avatar
Glenn Morris committed
1071 1072


Glenn Morris's avatar
Glenn Morris committed
1073
@node New in Emacs 22
Glenn Morris's avatar
Glenn Morris committed
1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091
@section What is different about Emacs 22?
@cindex Differences between Emacs 21 and Emacs 22
@cindex Emacs 22, new features in

@itemize
@cindex GTK+ Toolkit
@cindex Drag-and-drop
@item
Emacs can be built with GTK+ widgets, and supports drag-and-drop
operation on X.

@cindex Supported systems
@item
Emacs 22 features support for GNU/Linux systems on S390 and x86-64
machines, as well as support for the Mac OS X and Cygwin operating
systems.

@item
1092
The native MS-Windows, and Mac OS X builds include full support
Glenn Morris's avatar
Glenn Morris committed
1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167
for images, toolbar, and tooltips.

@item
Font Lock mode, Auto Compression mode, and File Name Shadow Mode are
enabled by default.

@item
The maximum size of buffers has been doubled and is 256M on 32-bit
machines.

@item
Links can be followed with @kbd{mouse-1}, in addition to @kbd{mouse-2}.

@cindex Mouse wheel
@item
Mouse wheel support is enabled by default.

@item
Window fringes are customizable.

@item
The mode line of the selected window is now highlighted.

@item
The minibuffer prompt is displayed in a distinct face.

@item
Abbrev definitions are read automatically at startup.

@item
Grep mode is separate from Compilation mode and has many new options and
commands specific to grep.

@item
The original Emacs macro system has been replaced by the new Kmacro
package, which provides many new commands and features and a simple
interface that uses the function keys F3 and F4.  Macros are stored in a
macro ring, and can be debugged and edited interactively.

@item
The Grand Unified Debugger (GUD) can be used with a full graphical user
interface to GDB; this provides many features found in traditional
development environments, making it easy to manipulate breakpoints, add
watch points, display the call stack, etc.  Breakpoints are visually
indicated in the source buffer.

@item
@cindex New modes
Many new modes and packages have been included in Emacs, such as Calc,
TRAMP, URL, IDO, CUA, ERC, rcirc, Table, Image-Dired, SES, Ruler, Org,
PGG, Flymake, Password, Printing, Reveal, wdired, t-mouse, longlines,
savehist, Conf mode, Python mode, DNS mode, etc.

@cindex Multilingual Environment
@item
Leim is now part of Emacs.  Unicode support has been much improved, and
the following input methods have been added: belarusian, bulgarian-bds,
bulgarian-phonetic, chinese-sisheng, croatian, dutch, georgian,
latin-alt-postfix, latin-postfix, latin-prefix, latvian-keyboard,
lithuanian-numeric, lithuanian-keyboard, malayalam-inscript, rfc1345,
russian-computer, sgml, slovenian, tamil-inscript, ucs,
ukrainian-computer, vietnamese-telex, and welsh.

The following language environments have also been added: Belarusian,
Bulgarian, Chinese-EUC-TW, Croatian, French, Georgian, Italian, Latin-6,
Latin-7, Latvian, Lithuanian, Malayalam, Russian, Slovenian, Swedish,
Tajik, Tamil, UTF-8, Ukrainian, Welsh, and Windows-1255.

@cindex Documentation
@cindex Emacs Lisp Manual
@item
In addition, Emacs 22 now includes the Emacs Lisp Reference Manual
(@pxref{Emacs Lisp documentation}) and the Emacs Lisp Intro.
@end itemize

1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205

@node New in Emacs 21
@section What is different about Emacs 21?
@cindex Differences between Emacs 20 and Emacs 21
@cindex Emacs 21, new features in

@cindex Variable-size fonts
@cindex Toolbar support
Emacs 21 features a thorough rewrite of the display engine.  The new
display engine supports variable-size fonts, images, and can play sounds
on platforms which support that.  As a result, the visual appearance of
Emacs, when it runs on a windowed display, is much more reminiscent of
modern GUI programs, and includes 3D widgets (used for the mode line and
the scroll bars), a configurable and extensible toolbar, tooltips
(a.k.a.@: balloon help), and other niceties.

@cindex Colors on text-only terminals
@cindex TTY colors
In addition, Emacs 21 supports faces on text-only terminals.  This means
that you can now have colors when you run Emacs on a GNU/Linux console
and on @code{xterm} with @kbd{emacs -nw}.


@node New in Emacs 20
@section What is different about Emacs 20?
@cindex Differences between Emacs 19 and Emacs 20
@cindex Emacs 20, new features in

The differences between Emacs versions 18 and 19 were rather dramatic;
the introduction of frames, faces, and colors on windowing systems was
obvious to even the most casual user.

There are differences between Emacs versions 19 and 20 as well, but many
are more subtle or harder to find.  Among the changes are the inclusion
of MULE code for languages that use non-Latin characters and for mixing
several languages in the same document; the ``Customize'' facility for
modifying variables without having to use Lisp; and automatic conversion
of files from Macintosh, Microsoft, and Unix platforms.
Glenn Morris's avatar
Glenn Morris committed
1206 1207

@c ------------------------------------------------------------
Glenn Morris's avatar
Glenn Morris committed
1208
@node Common requests
Glenn Morris's avatar
Glenn Morris committed
1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263
@chapter Common requests
@cindex Common requests

@menu
* Setting up a customization file::
* Using Customize::
* Colors on a TTY::
* Debugging a customization file::
* Displaying the current line or column::
* Displaying the current file name in the titlebar::
* Turning on abbrevs by default::
* Associating modes with files::
* Highlighting a region::
* Replacing highlighted text::
* Controlling case sensitivity::
* Working with unprintable characters::
* Searching for/replacing newlines::
* Yanking text in isearch::
* Wrapping words automatically::
* Turning on auto-fill by default::
* Changing load-path::
* Using an already running Emacs process::
* Compiler error messages::
* Indenting switch statements::
* Customizing C and C++ indentation::
* Horizontal scrolling::
* Overwrite mode::
* Turning off beeping::
* Turning the volume down::
* Automatic indentation::
* Matching parentheses::
* Hiding #ifdef lines::
* Repeating commands::
* Valid X resources::
* Evaluating Emacs Lisp code::
* Changing the length of a Tab::
* Inserting text at the beginning of each line::
* Forcing the cursor to remain in the same column::
* Forcing Emacs to iconify itself::
* Using regular expressions::
* Replacing text across multiple files::
* Documentation for etags::
* Disabling backups::
* Disabling auto-save-mode::
* Going to a line by number::
* Modifying pull-down menus::
* Deleting menus and menu options::
* Turning on syntax highlighting::
* Scrolling only one line::
* Editing MS-DOS files::
* Filling paragraphs with a single space::
* Escape sequences in shell output::
* Fullscreen mode on MS-Windows::
@end menu

Glenn Morris's avatar
Glenn Morris committed
1264
@node Setting up a customization file
Glenn Morris's avatar
Glenn Morris committed
1265 1266 1267 1268 1269 1270 1271 1272
@section How do I set up a @file{.emacs} file properly?
@cindex @file{.emacs} file, setting up
@cindex @file{.emacs} file, locating
@cindex Init file, setting up
@cindex Customization file, setting up

@inforef{Init File, Init File, emacs}.

1273 1274 1275 1276
In general, new Emacs users should not be provided with @file{.emacs}
files, because this can cause confusing non-standard behavior.  Then
they send questions to @email{help-gnu-emacs@@gnu.org} asking why Emacs
isn't behaving as documented.
Glenn Morris's avatar
Glenn Morris committed
1277

1278 1279 1280 1281
Emacs includes the Customize facility (@pxref{Using Customize}).  This
allows users who are unfamiliar with Emacs Lisp to modify their
@file{.emacs} files in a relatively straightforward way, using menus
rather than Lisp code.
Glenn Morris's avatar
Glenn Morris committed
1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292

While Customize might indeed make it easier to configure Emacs,
consider taking a bit of time to learn Emacs Lisp and modifying your
@file{.emacs} directly.  Simple configuration options are described
rather completely in @inforef{Init File, Init File, emacs}, for users
interested in performing frequently requested, basic tasks.

Sometimes users are unsure as to where their @file{.emacs} file should
be found.  Visiting the file as @file{~/.emacs} from Emacs will find
the correct file.

Glenn Morris's avatar
Glenn Morris committed
1293
@node Using Customize
Glenn Morris's avatar
Glenn Morris committed
1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311
@section How do I start using Customize?
@cindex Customize groups
@cindex Customizing variables
@cindex Customizing faces

The main Customize entry point is @kbd{M-x customize @key{RET}}.  This
command takes you to a buffer listing all the available Customize
groups.  From there, you can access all customizable options and faces,
change their values, and save your changes to your init file.
@inforef{Easy Customization, Easy Customization, emacs}.

If you know the name of the group in advance (e.g. ``shell''), use
@kbd{M-x customize-group @key{RET}}.

If you wish to customize a single option, use @kbd{M-x customize-option
@key{RET}}.  This command prompts you for the name of the option to
customize, with completion.

Glenn Morris's avatar
Glenn Morris committed
1312
@node Colors on a TTY
Glenn Morris's avatar
Glenn Morris committed
1313 1314 1315 1316 1317 1318 1319
@section How do I get colors and syntax highlighting on a TTY?
@cindex Colors on a TTY
@cindex Syntax highlighting on a TTY
@cindex Console, colors

In Emacs 21.1 and later, colors and faces are supported in non-windowed mode,
i.e.@: on Unix and GNU/Linux text-only terminals and consoles, and when
1320
invoked as @samp{emacs -nw} on X, and MS-Windows.  (Colors and faces were
Glenn Morris's avatar
Glenn Morris committed
1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331
supported in the MS-DOS port since Emacs 19.29.)  Emacs automatically
detects color support at startup and uses it if available.  If you think
that your terminal supports colors, but Emacs won't use them, check the
@code{termcap} entry for your display type for color-related
capabilities.

The command @kbd{M-x list-colors-display} pops up a window which
exhibits all the colors Emacs knows about on the current display.

Syntax highlighting is on by default since version 22.1.

Glenn Morris's avatar
Glenn Morris committed
1332
@node Debugging a customization file
Glenn Morris's avatar
Glenn Morris committed
1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353
@section How do I debug a @file{.emacs} file?
@cindex Debugging @file{.emacs} file
@cindex @file{.emacs} debugging
@cindex Init file debugging
@cindex @samp{-debug-init} option

Start Emacs with the @samp{-debug-init} command-line option.  This
enables the Emacs Lisp debugger before evaluating your @file{.emacs}
file, and places you in the debugger if something goes wrong.  The top
line in the @file{trace-back} buffer will be the error message, and the
second or third line of that buffer will display the Lisp code from your
@file{.emacs} file that caused the problem.

You can also evaluate an individual function or argument to a function
in your @file{.emacs} file by moving the cursor to the end of the
function or argument and typing @kbd{C-x C-e} (@kbd{M-x
eval-last-sexp}).

Use @kbd{C-h v} (@kbd{M-x describe-variable}) to check the value of
variables which you are trying to set or use.

Glenn Morris's avatar
Glenn Morris committed
1354
@node Displaying the current line or column
Glenn Morris's avatar
Glenn Morris committed
1355 1356 1357 1358 1359 1360 1361
@section How do I make Emacs display the current line (or column) number?
@cindex @code{line-number-mode}
@cindex Displaying the current line or column
@cindex Line number, displaying the current
@cindex Column, displaying the current
@cindex @code{mode-line-format}

1362 1363 1364 1365
By default, Emacs displays the current line number of the point in the
mode line.  You can toggle this feature off or on with the command
@kbd{M-x line-number-mode}, or by setting the variable
@code{line-number-mode}.  Note that Emacs will not display the line
Glenn Morris's avatar
Glenn Morris committed
1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376
number if the buffer's size in bytes is larger than the value of the
variable @code{line-number-display-limit}.

You can similarly display the current column with
@kbd{M-x column-number-mode}, or by putting the form

@lisp
(setq column-number-mode t)
@end lisp

@noindent
1377
in your @file{.emacs} file.  This feature is off by default.
Glenn Morris's avatar
Glenn Morris committed
1378 1379 1380 1381