faq.texi 153 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
This is the version of the FAQ distributed with Emacs @value{VER}, and
mainly describes that version.  Although there is some information on
Glenn Morris's avatar
Glenn Morris committed
72
older versions, details about very old releases (now only of historical
73 74 75 76 77 78 79 80 81 82
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
@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
Glenn Morris's avatar
Glenn Morris committed
219 220
@kbd{M-n} (or up-arrow and down-arrow) to see previous commands entered.
An Emacs @dfn{command} is an @dfn{interactive} Emacs function.
Glenn Morris's avatar
Glenn Morris committed
221 222 223 224 225 226 227 228 229

@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}.

230 231 232 233 234
@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
235 236
@cindex Info, finding topics in

237
When we refer you to some @var{topic} in the Emacs manual, you can
Glenn Morris's avatar
Glenn Morris committed
238 239 240 241 242 243 244 245 246 247 248 249 250
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.

Glenn Morris's avatar
Glenn Morris committed
251 252 253
If you are reading this FAQ in Info, you can simply press @key{RET} on a
reference to follow it.

Glenn Morris's avatar
Glenn Morris committed
254 255 256
@xref{Getting a printed manual}, if you would like a paper copy of the
Emacs manual.

Glenn Morris's avatar
Glenn Morris committed
257
@node File-name conventions
Glenn Morris's avatar
Glenn Morris committed
258
@section What are @file{etc/GNU}, @file{src/config.h}, @file{site-lisp/default.el}, etc.?
Glenn Morris's avatar
Glenn Morris committed
259 260 261 262 263
@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
264
into subdirectories; e.g. @file{etc}, @file{lisp}, and @file{src}.
Glenn Morris's avatar
Glenn Morris committed
265 266 267
Some of these (e.g. @file{etc} and @file{lisp}) are present both in
an installed Emacs and in the sources, but some (e.g. @file{src}) are
only found in the sources.
Glenn Morris's avatar
Glenn Morris committed
268 269 270 271 272 273 274 275

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.)

276
The location of your Info directory (i.e., where Info documentation
Glenn Morris's avatar
Glenn Morris committed
277 278 279 280
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
Glenn Morris's avatar
Glenn Morris committed
281
default, Emacs Info documentation is placed in @file{/usr/local/share/info}.
Glenn Morris's avatar
Glenn Morris committed
282

Glenn Morris's avatar
Glenn Morris committed
283 284
For information on some of the files in the @file{etc} directory,
@pxref{Informational files for Emacs}.
Glenn Morris's avatar
Glenn Morris committed
285

Glenn Morris's avatar
Glenn Morris committed
286
@node Common acronyms
287
@section What are FSF, LPF, GNU, RMS, FTP, and GPL?
Glenn Morris's avatar
Glenn Morris committed
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 319 320
@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

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

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
333
@node General questions
Glenn Morris's avatar
Glenn Morris committed
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349
@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
350
@node The LPF
Glenn Morris's avatar
Glenn Morris committed
351 352 353 354 355 356 357
@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
358 359
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
360

Glenn Morris's avatar
Glenn Morris committed
361
@node Real meaning of copyleft
Glenn Morris's avatar
Glenn Morris committed
362 363 364 365 366 367 368 369 370
@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
371 372 373 374 375 376
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
377 378 379 380 381 382 383 384 385 386 387 388 389

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
390
@node Guidelines for newsgroup postings
391
@section  What are appropriate messages for the various Emacs newsgroups?
Glenn Morris's avatar
Glenn Morris committed
392 393 394 395 396 397 398 399
@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
Glenn Morris's avatar
Glenn Morris committed
400 401 402 403 404
mailing list (@pxref{Informational files for Emacs}).  For those lists
which are gatewayed with newsgroups, it lists both the newsgroup name
and the mailing list address.  The Emacs mailing lists are also
described at @uref{http://savannah.gnu.org/mail/?group=emacs, the Emacs
Savannah page}.
Glenn Morris's avatar
Glenn Morris committed
405 406

The newsgroup @uref{news:comp.emacs} is for discussion of Emacs programs
407
in general.  The newsgroup @uref{news:gnu.emacs.help} is specifically
408 409
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
410 411 412 413 414 415 416 417 418 419 420 421

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
422
@node Newsgroup archives
Glenn Morris's avatar
Glenn Morris committed
423 424 425 426 427 428 429
@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
Glenn Morris's avatar
Glenn Morris committed
430 431 432
archive can be browsed over the web at
@uref{http://lists.gnu.org/archive/html/, the GNU mail archive}.  Raw
files can be downloaded from @uref{ftp://lists.gnu.org/}.
Glenn Morris's avatar
Glenn Morris committed
433 434

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
archive the @code{gnu.*} groups.

Glenn Morris's avatar
Glenn Morris committed
438
You can also read the archives of the @code{gnu.*} groups and post new
439
messages at @uref{http://gmane.org/, Gmane}.  Gmane is a service that
Glenn Morris's avatar
Glenn Morris committed
440 441
presents mailing lists as newsgroups (even those without a traditional
mail-to-news gateway).
Glenn Morris's avatar
Glenn Morris committed
442

Glenn Morris's avatar
Glenn Morris committed
443
@node Reporting bugs
Glenn Morris's avatar
Glenn Morris committed
444 445 446 447 448 449 450 451
@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
452
essential information and the correct e-mail address, which is
Glenn Morris's avatar
Glenn Morris committed
453 454 455 456 457 458 459 460 461
@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}).
462
(@xref{Emacs manual}, if you don't know how to read the manual.)
Glenn Morris's avatar
Glenn Morris committed
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 493

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
494
@node Unsubscribing from Emacs lists
495
@section  How do I unsubscribe from a mailing list?
Glenn Morris's avatar
Glenn Morris committed
496 497 498
@cindex Unsubscribing from GNU mailing lists
@cindex Removing yourself from GNU mailing lists

499
If you are receiving a GNU mailing list named @var{list}, you should be
Glenn Morris's avatar
Glenn Morris committed
500
able to unsubscribe from it by sending a request to the address
501 502 503 504
@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
505

Glenn Morris's avatar
Glenn Morris committed
506
@node Contacting the FSF
Glenn Morris's avatar
Glenn Morris committed
507 508 509 510 511 512
@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

Glenn Morris's avatar
Glenn Morris committed
513 514 515
For up-to-date information, see
@uref{http://www.fsf.org/about/contact.html, the FSF contact web-page}.

Glenn Morris's avatar
Glenn Morris committed
516 517 518
@table @asis

@item E-mail
519
info@@fsf.org
Glenn Morris's avatar
Glenn Morris committed
520 521 522 523 524 525 526 527

@item Telephone
+1-617-542-5942

@item Fax
+1-617-542-2652

@item World Wide Web
528
@uref{http://www.fsf.org/}
Glenn Morris's avatar
Glenn Morris committed
529 530 531 532 533 534 535 536 537 538 539

@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
540
@uref{http://shop.fsf.org/, FSF on-line store}.
Glenn Morris's avatar
Glenn Morris committed
541 542

@c ------------------------------------------------------------
Glenn Morris's avatar
Glenn Morris committed
543
@node Getting help
Glenn Morris's avatar
Glenn Morris committed
544 545 546
@chapter Getting help
@cindex Getting help

547
This chapter tells you how to get help with Emacs.
Glenn Morris's avatar
Glenn Morris committed
548 549 550 551 552 553 554 555 556 557 558 559 560 561

@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
562
@node Basic editing
Glenn Morris's avatar
Glenn Morris committed
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581
@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
582 583
sequence listed.  Each of the resulting key sequences (e.g. @key{F1} is
common) invokes help.
Glenn Morris's avatar
Glenn Morris committed
584 585 586 587

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
588
@node Learning how to do something
Glenn Morris's avatar
Glenn Morris committed
589 590 591 592 593 594 595 596 597 598 599 600
@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
601
The complete text of the Emacs manual is available via the Info
Glenn Morris's avatar
Glenn Morris committed
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 643 644 645 646
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
647
invoke them.  You can order one from the FSF for $2 (or 10 for $18),
Glenn Morris's avatar
Glenn Morris committed
648
or you can print your own from the @file{etc/refcards/refcard.tex} or
649
@file{etc/refcards/refcard.pdf} files in the Emacs distribution.
Glenn Morris's avatar
Glenn Morris committed
650 651 652 653 654
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}
655
and @file{etc/recards/de-refcard.pdf}.
Glenn Morris's avatar
Glenn Morris committed
656 657 658 659 660 661 662 663

@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
664
@node Getting a printed manual
Glenn Morris's avatar
Glenn Morris committed
665 666 667 668 669 670
@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
671
details see the @uref{http://shop.fsf.org/, FSF on-line store}.
Glenn Morris's avatar
Glenn Morris committed
672

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

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

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

Glenn Morris's avatar
Glenn Morris committed
683
@xref{Learning how to do something}, for how to view the manual from Emacs.
Glenn Morris's avatar
Glenn Morris committed
684

Glenn Morris's avatar
Glenn Morris committed
685
@node Emacs Lisp documentation
Glenn Morris's avatar
Glenn Morris committed
686 687 688 689 690 691 692 693 694 695 696
@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
Glenn Morris's avatar
Glenn Morris committed
697 698
in Info format (@pxref{Top, Emacs Lisp,, elisp, The
Emacs Lisp Reference Manual}).
Glenn Morris's avatar
Glenn Morris committed
699

Glenn Morris's avatar
Glenn Morris committed
700 701 702
You can also order a hardcopy of the manual from the FSF, for details
see the @uref{http://shop.fsf.org/, FSF on-line store}.  (This manual is
not always in print.)
Glenn Morris's avatar
Glenn Morris committed
703 704 705 706 707

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
708
@node Installing Texinfo documentation
Glenn Morris's avatar
Glenn Morris committed
709 710 711 712 713 714 715
@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

Glenn Morris's avatar
Glenn Morris committed
716 717 718 719 720 721 722 723
Emacs releases come with pre-built Info files, and the normal install
process places them in the correct location.  This is true for most
applications that provide Info files.  The following section is only
relevant if you want to install extra Info files by hand.

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

725
@uref{http://www.gnu.org/software/texinfo/}
Glenn Morris's avatar
Glenn Morris committed
726 727 728

For information about the Texinfo format, read the Texinfo manual which
comes with the Texinfo package.  This manual also comes installed in
729
Info format, so you can read it from Emacs; type @kbd{C-h i m texinfo
Glenn Morris's avatar
Glenn Morris committed
730 731
@key{RET}}.

Glenn Morris's avatar
Glenn Morris committed
732 733
@c FIXME is this a complete alternative?
@c Probably not, given that we require makeinfo to build Emacs.
Glenn Morris's avatar
Glenn Morris committed
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
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
Glenn Morris's avatar
Glenn Morris committed
803
(add-to-list 'Info-default-directory-list "~/Info")
Glenn Morris's avatar
Glenn Morris committed
804 805 806
@end lisp

You will need a top-level Info file named @file{dir} in this directory
Glenn Morris's avatar
Glenn Morris committed
807 808 809 810 811 812
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 (fortuitously) 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.
Glenn Morris's avatar
Glenn Morris committed
813 814 815

@end itemize

Glenn Morris's avatar
Glenn Morris committed
816
@node Printing a Texinfo file
Glenn Morris's avatar
Glenn Morris committed
817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837
@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
838
@file{doc/misc/texinfo.tex} (or copy or link it into the current directory).
Glenn Morris's avatar
Glenn Morris committed
839 840 841 842

@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
Glenn Morris's avatar
Glenn Morris committed
843 844
printed copy.  The @samp{texi2dvi} script is part of the GNU Texinfo
distribution.
Glenn Morris's avatar
Glenn Morris committed
845

846 847
Alternatively, @samp{texi2pdf} produces PDF files.

Glenn Morris's avatar
Glenn Morris committed
848 849 850 851 852 853 854 855 856 857 858
@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
859
@node Viewing Info files outside of Emacs
Glenn Morris's avatar
Glenn Morris committed
860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880
@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
881
@node Informational files for Emacs
Glenn Morris's avatar
Glenn Morris committed
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.

Glenn Morris's avatar
Glenn Morris committed
897 898 899 900 901
The following files (and others) are available in the @file{etc}
directory of the Emacs distribution (see @ref{File-name conventions}, if
you're not sure where that is).  Many of these files are 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
902 903 904 905 906 907 908

@table @file

@item COPYING
GNU General Public License

@item DISTRIB
909
Emacs Availability Information
Glenn Morris's avatar
Glenn Morris committed
910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935

@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
936
@node Help installing Emacs
Glenn Morris's avatar
Glenn Morris committed
937 938 939 940 941
@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
942
@ref{Problems building Emacs}, if you have problems with the installation.
Glenn Morris's avatar
Glenn Morris committed
943

Glenn Morris's avatar
Glenn Morris committed
944 945 946
@uref{http://www.fsf.org/resources/service/, The GNU Service directory}
lists companies and individuals willing to sell you help in installing
or using Emacs and other GNU software.
Glenn Morris's avatar
Glenn Morris committed
947

Glenn Morris's avatar
Glenn Morris committed
948
@node Obtaining the FAQ
Glenn Morris's avatar
Glenn Morris committed
949 950 951 952
@section Where can I get the latest version of this FAQ?
@cindex FAQ, obtaining the
@cindex Latest FAQ version, obtaining the

953 954 955
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
Glenn Morris's avatar
Glenn Morris committed
956 957 958
C-f} (@kbd{M-x view-emacs-FAQ}).  The very latest version is available
in the Emacs development repository.
@c FIXME add link to a section on that.
Glenn Morris's avatar
Glenn Morris committed
959 960

@c ------------------------------------------------------------
Glenn Morris's avatar
Glenn Morris committed
961
@node Status of Emacs
Glenn Morris's avatar
Glenn Morris committed
962 963 964
@chapter Status of Emacs
@cindex Status of Emacs

965 966
This chapter gives you basic information about Emacs, including the
status of its latest version.
Glenn Morris's avatar
Glenn Morris committed
967 968 969 970

@menu
* Origin of the term Emacs::
* Latest version of Emacs::
971
* New in Emacs 23::
Glenn Morris's avatar
Glenn Morris committed
972
* New in Emacs 22::
973 974
* New in Emacs 21::
* New in Emacs 20::
Glenn Morris's avatar
Glenn Morris committed
975 976
@end menu

Glenn Morris's avatar
Glenn Morris committed
977
@node Origin of the term Emacs
Glenn Morris's avatar
Glenn Morris committed
978 979 980 981 982 983 984 985 986 987
@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
Glenn Morris's avatar
Glenn Morris committed
988 989 990 991 992 993
Editor and COrrector) under ITS (the Incompatible Timesharing System) 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.
Glenn Morris's avatar
Glenn Morris committed
994 995 996 997 998 999 1000 1001 1002 1003 1004 1005

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
1006
@node Latest version of Emacs
Glenn Morris's avatar
Glenn Morris committed
1007 1008 1009 1010
@section What is the latest version of Emacs?
@cindex Version, latest
@cindex Latest version of Emacs

1011 1012
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
1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032
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
1033

1034
@itemize
Glenn Morris's avatar
Glenn Morris committed
1035

1036 1037 1038 1039 1040 1041 1042
@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
1043

1044 1045 1046 1047 1048
@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
1049

1050 1051 1052 1053 1054
@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
1055

1056 1057 1058
@cindex Daemon mode
@item
Emacs can be started as a daemon in the background.
Glenn Morris's avatar
Glenn Morris committed
1059

1060 1061 1062 1063 1064 1065 1066
@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
1067

1068 1069 1070 1071
@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
1072

1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084
@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
1085 1086


Glenn Morris's avatar
Glenn Morris committed
1087
@node New in Emacs 22
Glenn Morris's avatar
Glenn Morris committed
1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105
@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
1106
The native MS-Windows, and Mac OS X builds include full support
Glenn Morris's avatar
Glenn Morris committed
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 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181
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

1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219

@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
1220 1221

@c ------------------------------------------------------------
Glenn Morris's avatar
Glenn Morris committed
1222
@node Common requests
Glenn Morris's avatar
Glenn Morris committed
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 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277
@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
1278
@node Setting up a customization file
Glenn Morris's avatar
Glenn Morris committed
1279 1280 1281 1282 1283 1284 1285 1286
@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}.

1287 1288 1289 1290
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
1291

1292 1293 1294 1295
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
1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306

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
1307
@node Using Customize
Glenn Morris's avatar
Glenn Morris committed
1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325
@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
1326
@node Colors on a TTY
Glenn Morris's avatar
Glenn Morris committed
1327 1328 1329 1330 1331 1332 1333
@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
1334
invoked as @samp{emacs -nw} on X, and MS-Windows.  (Colors and faces were
Glenn Morris's avatar
Glenn Morris committed
1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345
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
1346
@node Debugging a customization file
Glenn Morris's avatar
Glenn Morris committed
1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367
@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
1368
@node Displaying the current line or column
Glenn Morris's avatar
Glenn Morris committed
1369 1370 1371 1372 1373 1374 1375
@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}

1376 1377 1378 1379
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
1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390
number if the buffer's size in bytes is larger than the value of the
variable @code{line-number