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

@setchapternewpage odd

9
@c This is used in many places
10
@set VER 21.3
11

Karl Berry's avatar
Karl Berry committed
12
@copying
13
Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
14
Copyright 1994,1995,1996,1997,1998,1999,2000 Reuven M. Lerner@*
Dave Love's avatar
Dave Love committed
15 16
Copyright 1992,1993 Steven Byrnes@*
Copyright 1990,1991,1992 Joseph Brian Wells@*
Dave Love's avatar
Dave Love committed
17

Karl Berry's avatar
Karl Berry committed
18
@quotation
Dave Love's avatar
Dave Love committed
19 20 21 22 23 24 25 26 27 28 29 30 31
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.
32 33 34

[This version has been somewhat edited from the last-posted version
(as of August 1999) for inclusion in the Emacs distribution.]
Karl Berry's avatar
Karl Berry committed
35 36
@end quotation
@end copying
37

Karl Berry's avatar
Karl Berry committed
38 39 40 41
@dircategory Emacs
@direntry
* Emacs FAQ: (efaq).	Frequently Asked Questions about Emacs.
@end direntry
Dave Love's avatar
Dave Love committed
42 43 44 45 46 47 48 49 50

@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
Karl Berry's avatar
Karl Berry committed
51
@insertcopying
Dave Love's avatar
Dave Love committed
52 53 54 55 56 57
@end titlepage

@node    Top, FAQ notation, (dir), (dir)

This is the GNU Emacs FAQ, last updated on @today{}.

58 59 60
The FAQ is maintained as a Texinfo document, allowing us to create HTML,
Info, and TeX documents from a single source file, and is slowly but
surely being improved.  Please bear with us as we improve on this
61 62 63
format.  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.
Dave Love's avatar
Dave Love committed
64 65

@menu
Thien-Thi Nguyen's avatar
Thien-Thi Nguyen committed
66 67 68 69 70 71 72 73 74 75 76 77 78
* 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::
Dave Love's avatar
Dave Love committed
79 80 81 82 83 84 85
@end menu

@c ------------------------------------------------------------
@node FAQ notation, General questions, Top, Top
@chapter FAQ notation
@cindex FAQ notation

86
This chapter describes notation used in the GNU Emacs FAQ, as well as in
Dave Love's avatar
Dave Love committed
87 88 89 90 91
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
Thien-Thi Nguyen's avatar
Thien-Thi Nguyen committed
92 93 94 95 96
* Basic keys::
* Extended commands::
* On-line manual::
* File-name conventions::
* Common acronyms::
Dave Love's avatar
Dave Love committed
97 98 99
@end menu

@node Basic keys, Extended commands, FAQ notation, FAQ notation
Eli Zaretskii's avatar
Eli Zaretskii committed
100
@section What do these mean: @kbd{C-h}, @kbd{C-M-a}, @key{RET}, @kbd{@key{ESC} a}, etc.?
Dave Love's avatar
Dave Love committed
101 102 103
@cindex Basic keys
@cindex Control key, notation for
@cindex @key{Meta} key, notation for
104
@cindex Control-Meta characters, notation for
Dave Love's avatar
Dave Love committed
105
@cindex @kbd{C-h}, definition of
Eli Zaretskii's avatar
Eli Zaretskii committed
106
@cindex @kbd{C-M-h}, definition of
Dave Love's avatar
Dave Love committed
107 108 109 110 111 112
@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
113
@cindex Notation for keys
Dave Love's avatar
Dave Love committed
114 115 116 117 118 119 120 121

@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
122
(if your computer doesn't have a @key{Meta} key, @pxref{No Meta key})
Dave Love's avatar
Dave Love committed
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137

@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
138 139 140
@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)
Dave Love's avatar
Dave Love committed
141 142 143 144 145 146 147 148 149 150 151 152 153

@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
154 155 156 157 158 159 160 161 162
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.
Dave Love's avatar
Dave Love committed
163

164
The @acronym{ASCII} code sent by @kbd{C-x} (except for @kbd{C-?}) is the value
Dave Love's avatar
Dave Love committed
165
that would be sent by pressing just @key{x} minus 96 (or 64 for
166
upper-case @key{X}) and will be from 0 to 31.  On Unix and GNU/Linux
167 168
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,
169 170 171 172
@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.}.
Dave Love's avatar
Dave Love committed
173

174
@kbd{C-?} (aka @key{DEL}) is @acronym{ASCII} code 127.  It is a misnomer to call
175
@kbd{C-?}  a ``control'' key, since 127 has both bits 5 and 6 turned ON.
176
Also, on very few keyboards does @kbd{C-?} generate @acronym{ASCII} code 127.
Dave Love's avatar
Dave Love committed
177

178 179 180
@inforef{Text Characters, Text Characters, emacs}, and @inforef{Keys,
Keys, emacs}, for more information.  (@xref{On-line manual}, for more
information about Info.)
Dave Love's avatar
Dave Love committed
181 182 183 184 185 186 187 188

@node Extended commands, On-line manual, Basic keys, FAQ notation
@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
189
command, then type @key{RET}.  (@xref{Basic keys}, if you're not sure
Dave Love's avatar
Dave Love committed
190 191 192 193 194 195 196
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
197 198 199
@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.
Dave Love's avatar
Dave Love committed
200

201
@cindex @key{Do} key
Dave Love's avatar
Dave Love committed
202 203
Your system administrator may have bound other key sequences to invoke
@code{execute-extended-command}.  A function key labeled @kbd{Do} is a
204
good candidate for this, on keyboards that have such a key.
Dave Love's avatar
Dave Love committed
205

206 207
If you need to run non-interactive Emacs functions, see @ref{Evaluating
Emacs Lisp code}.
Dave Love's avatar
Dave Love committed
208

209
@node On-line manual, File-name conventions, Extended commands, FAQ notation
Dave Love's avatar
Dave Love committed
210 211 212 213 214 215
@section How do I read topic XXX in the on-line manual?
@cindex On-line manual, reading topics in
@cindex Reading topics in the on-line manual
@cindex Finding topics in the on-line manual
@cindex Info, finding topics in

216 217 218
When we refer you to some @var{topic} in the on-line manual, you can
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}}.
Dave Love's avatar
Dave Love committed
219 220 221 222

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

223 224
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}}.
Dave Love's avatar
Dave Love committed
225

226 227 228
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.
Dave Love's avatar
Dave Love committed
229

230
@xref{Getting a printed manual}, if you would like a paper copy of the
Dave Love's avatar
Dave Love committed
231 232
Emacs manual.

233
@node File-name conventions, Common acronyms, On-line manual, FAQ notation
Dave Love's avatar
Dave Love committed
234
@section What are @file{etc/SERVICE}, @file{src/config.h}, and @file{lisp/default.el}?
235 236
@cindex File-name conventions
@cindex Conventions for file names
Dave Love's avatar
Dave Love committed
237 238 239 240 241 242 243 244 245
@cindex Directories and files that come with Emacs

These are files that come with Emacs.  The Emacs distribution is divided
into subdirectories; the important ones are @file{etc}, @file{lisp}, and
@file{src}.

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
246 247 248
@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.)
Dave Love's avatar
Dave Love committed
249 250 251

The location of your Info directory (i.e., where on-line documentation
is stored) is kept in the variable @code{Info-default-directory-list}.  Use
252
@kbd{C-h v Info-default-directory-list @key{RET}} to see the value of
Dave Love's avatar
Dave Love committed
253 254 255 256
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
default, Info documentation is placed in @file{/usr/local/info}.

257 258 259
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
260
also available via the Emacs @samp{Help} menu, or by typing @kbd{C-h ?}
261
(@kbd{M-x help-for-help}).
Dave Love's avatar
Dave Love committed
262 263 264 265

Your system administrator may have removed the @file{src} directory and
many files from the @file{etc} directory.

266
@node Common acronyms,  , File-name conventions, FAQ notation
Dave Love's avatar
Dave Love committed
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 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
@section What are FSF, LPF, OSF, GNU, RMS, FTP, and GPL?
@cindex FSF, definition of
@cindex LPF, definition of
@cindex OSF, 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 OSF
Open Software Foundation

@item GNU
GNU's Not Unix

@item RMS
Richard Matthew Stallman

@item FTP
File Transfer Protocol

@item GPL
GNU General Public License

@end table

Avoid confusing the FSF, the LPF, and the OSF.  The LPF opposes
look-and-feel copyrights and software patents.  The FSF aims to make
high quality free software available for everyone.  The OSF is a
consortium of computer vendors which develops commercial software for
Unix systems.

311 312
The word ``free'' in the title of the Free Software Foundation refers to
``freedom,'' not ``zero dollars.''  Anyone can charge any price for
Dave Love's avatar
Dave Love committed
313 314
GPL-covered software that they want to.  However, in practice, the
freedom enforced by the GPL leads to low prices, because you can always
315
get the software for less money from someone else, since everyone has
Dave Love's avatar
Dave Love committed
316 317 318 319 320 321 322
the right to resell or give away GPL-covered software.

@c ------------------------------------------------------------
@node    General questions, Getting help, FAQ notation, Top
@chapter General questions
@cindex General questions

323
This chapter contains general questions having to do with Emacs, the
Dave Love's avatar
Dave Love committed
324 325 326
Free Software Foundation, and related organizations.

@menu
Thien-Thi Nguyen's avatar
Thien-Thi Nguyen committed
327 328 329 330 331 332 333
* The LPF::
* Real meaning of copyleft::
* Guidelines for newsgroup postings::
* Newsgroup archives::
* Reporting bugs::
* Unsubscribing from Emacs lists::
* Contacting the FSF::
Dave Love's avatar
Dave Love committed
334 335 336 337 338 339 340 341 342 343 344 345
@end menu

@node The LPF, Real meaning of copyleft, General questions, General questions
@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
look-and-feel copyrights.  To get more information, feel free to contact
the LPF via e-mail or otherwise.  You may also contact
346
@email{jbw@@cs.bu.edu, Joe Wells}; he will be happy to talk to you
Dave Love's avatar
Dave Love committed
347 348 349 350
about the LPF.

You can find more information about the LPF in the file @file{etc/LPF}.
More papers describing the LPF's views are available on the Internet and
351
also from @uref{http://lpf.ai.mit.edu/, the LPF home page}.
Dave Love's avatar
Dave Love committed
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371

@node Real meaning of copyleft, Guidelines for newsgroup postings, The LPF, General questions
@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
set any precedents.  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.

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
372 373 374 375 376
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.
Dave Love's avatar
Dave Love committed
377 378 379 380 381 382 383 384
@end quotation

@node Guidelines for newsgroup postings, Newsgroup archives, Real meaning of copyleft, General questions
@section  What are appropriate messages for @uref{news:gnu.emacs.help}, @uref{news:gnu.emacs.bug}, @uref{news:comp.emacs}, etc.?
@cindex Newsgroups, appropriate messages for
@cindex GNU newsgroups, appropriate messages for
@cindex Usenet groups, appropriate messages for
@cindex Mailing lists, appropriate messages for
385
@cindex Posting messages to newsgroups
Dave Love's avatar
Dave Love committed
386

387 388 389
@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
Dave Love's avatar
Dave Love committed
390 391 392
of the file.)  For those lists which are gatewayed with newsgroups, it
lists both the newsgroup name and the mailing list address.

393 394 395 396
The newsgroup @uref{news:comp.emacs} is for discussion of Emacs programs
in general.  This includes Emacs along with various other
implementations, such as XEmacs, JOVE, MicroEmacs, Freemacs, MG,
Unipress, CCA, and Epsilon.
Dave Love's avatar
Dave Love committed
397 398

Many people post Emacs questions to @uref{news:comp.emacs} because they
399 400
don't receive any of the @code{gnu.*} newsgroups.  Arguments have been
made both for and against posting GNU-Emacs-specific material to
Dave Love's avatar
Dave Love committed
401 402
@uref{news:comp.emacs}.  You have to decide for yourself.

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

@uref{news:gnu.emacs.bug} is a place where bug reports appear, but avoid
412
posting bug reports to this newsgroup directly (@pxref{Reporting bugs}).
Dave Love's avatar
Dave Love committed
413 414 415

@node Newsgroup archives, Reporting bugs, Guidelines for newsgroup postings, General questions
@section Where can I get old postings to @uref{news:gnu.emacs.help} and other GNU groups?
416
@cindex Archived postings from @code{gnu.emacs.help}
Dave Love's avatar
Dave Love committed
417 418 419 420 421 422 423 424 425 426
@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://ftp-mailing-list-archives.gnu.org}.

427 428
The archive can be browsed over the web at 
@uref{http://mail.gnu.org/archive/html/, the GNU mail archive}.
Dave Love's avatar
Dave Love committed
429 430

Web-based Usenet search services, such as
431
@uref{http://groups.google.com, Google}, also archive the
432
@code{gnu.*} groups.
Dave Love's avatar
Dave Love committed
433 434 435 436 437 438 439 440 441 442 443 444 445 446

@node Reporting bugs, Unsubscribing from Emacs lists, Newsgroup archives, General questions
@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 by e-mail to
@email{bug-gnu-emacs@@gnu.org}.  Anything sent here 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.

447
Be sure to read the ``Bugs'' section of the Emacs manual before reporting
Dave Love's avatar
Dave Love committed
448
a bug to bug-gnu-emacs!  The manual describes in detail how to submit a
449
useful bug report.  (@xref{On-line manual}, if you don't know how to read the
Dave Love's avatar
Dave Love committed
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468
manual.)

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
469
@code{gnu.emacs.help} asking if anyone can help you.
Dave Love's avatar
Dave Love committed
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486
@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

@node Unsubscribing from Emacs lists, Contacting the FSF, Reporting bugs, General questions
@section  How do I unsubscribe from this mailing list?
@cindex Unsubscribing from GNU mailing lists
@cindex Removing yourself from GNU mailing lists

487 488 489
If you are receiving a GNU mailing list named @var{list}, you might be
able to unsubscribe from it by sending a request to the address
@email{@var{list}-request@@gnu.org}.  However, this will not work if you are
Dave Love's avatar
Dave Love committed
490 491 492
not listed on the main mailing list, but instead receive the mail from a
distribution point.  In that case, you will have to track down at which
distribution point you are listed.  Inspecting the @samp{Received} headers
493 494 495 496
on the mail messages may help, along with liberal use of the @samp{EXPN} or
@samp{VRFY} sendmail commands through @samp{telnet @var{site-address}
smtp}.  Ask your postmaster for help, if you cannot figure out these
details.
Dave Love's avatar
Dave Love committed
497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526

@node Contacting the FSF,  , Unsubscribing from Emacs lists, General questions
@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
gnu@@gnu.org

@item Telephone
+1-617-542-5942

@item Fax
+1-617-542-2652

@item World Wide Web
@uref{http://www.gnu.org/}

@item Postal address
Free Software Foundation@*
59 Temple Place - Suite 330@*
Boston, MA 02111-1307@*
USA@*

@end table

527 528
@cindex Ordering GNU software
For details on how to order items directly from the FSF, see the
529
@uref{http://www.gnu.org/order/order.html, GNU Web site}.
Dave Love's avatar
Dave Love committed
530 531 532 533 534 535

@c ------------------------------------------------------------
@node Getting help, Status of Emacs, General questions, Top
@chapter Getting help
@cindex Getting help

536
This chapter tells you how to get help with Emacs
Dave Love's avatar
Dave Love committed
537 538

@menu
Thien-Thi Nguyen's avatar
Thien-Thi Nguyen committed
539 540 541 542 543 544 545 546 547 548
* 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::
Dave Love's avatar
Dave Love committed
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573
@end menu

@node Basic editing, Learning how to do something, Getting help, Getting help
@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.

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
sequence listed.  Each of the resulting key sequences invokes help.

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

There is also a WWW-based tutorial for Emacs 18, much of which is also
574
relevant for later versions of Emacs, available at
Dave Love's avatar
Dave Love committed
575 576 577 578 579 580 581 582 583 584 585 586 587 588

@uref{http://kufacts.cc.ukans.edu/cwis/writeups/misc/emacsguide.html}

@node Learning how to do something, Getting a printed manual, Basic editing, Getting help
@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

589
@cindex Reading the Emacs manual
Dave Love's avatar
Dave Love committed
590 591 592 593 594 595
@item
The complete text of the Emacs manual is available on-line via the Info
hypertext reader.  Type @kbd{C-h i} to invoke Info.  Typing @key{h}
immediately after entering Info will provide a short tutorial on how to
use it.

596 597
@cindex Lookup a subject in a manual
@cindex Index search in a manual
Dave Love's avatar
Dave Love committed
598
@item
599 600 601 602 603 604 605 606 607 608
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
Dave Love's avatar
Dave Love committed
609 610 611 612 613
@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}).

614 615
@cindex Command description in the manual
@item
Juri Linkov's avatar
Juri Linkov committed
616
The command @kbd{C-h F} (@code{Info-goto-emacs-command-node}) prompts
617 618 619 620
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
Dave Love's avatar
Dave Love committed
621 622 623 624
@item
You can list all of the functions and variables whose names contain a
certain word using @kbd{M-x apropos}.

625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645
@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
invoke them.  You can order one from the FSF for $1 (or 10 for $5),
or you can print your own from the @file{etc/refcard.tex} or
@file{etc/refcard.ps} files in the Emacs distribution.  Beginning with
version 21.1, the Emacs distribution comes with translations of the
reference card into several languages; look for files named
@file{etc/@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/de-refcard.tex} and @file{etc/de-refcard.ps}.

Dave Love's avatar
Dave Love committed
646 647 648 649 650 651 652 653 654 655
@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

@node Getting a printed manual, Emacs Lisp documentation, Learning how to do something, Getting help
@section How do I get a printed copy of the Emacs manual?
@cindex Printed Emacs manual, obtaining
656 657
@cindex Manual, obtaining a printed or HTML copy of
@cindex Emacs manual, obtaining a printed or HTML copy of
Dave Love's avatar
Dave Love committed
658 659

You can order a printed copy of the Emacs manual from the FSF.  For
660
details see the @uref{http://www.gnu.org/order/order.html, GNU Web site}.
Dave Love's avatar
Dave Love committed
661

662 663
@c The number 620 below is version-dependent!
The full Texinfo source for the manual also comes in the @file{man}
Dave Love's avatar
Dave Love committed
664
directory of the Emacs distribution, if you're daring enough to try to
665
print out this 620-page manual yourself (@pxref{Printing a Texinfo
Dave Love's avatar
Dave Love committed
666 667 668 669 670
file}).

If you absolutely have to print your own copy, and you don't have @TeX{},
you can get a PostScript version from

671
@uref{http://www.gnu.org/manual/emacs/ps/emacs.ps.gz}
Dave Love's avatar
Dave Love committed
672

673
@cindex HTML version of Emacs manual, obtaining
674
An HTML version of the manual is at
Dave Love's avatar
Dave Love committed
675

676
@uref{www.gnu.org/manual/emacs/index.html}
Dave Love's avatar
Dave Love committed
677

678
@xref{Learning how to do something}, for how to view the manual on-line.
Dave Love's avatar
Dave Love committed
679 680 681 682 683 684 685 686 687 688 689 690

@node Emacs Lisp documentation, Installing Texinfo documentation, Getting a printed manual, Getting help
@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.

691 692
For more information, obtain the Emacs Lisp Reference Manual.  Details
on ordering it from FSF are on the
693
@uref{http://www.gnu.org/order/order.html, GNU Web site}.
Dave Love's avatar
Dave Love committed
694 695 696 697 698

The Emacs Lisp Reference Manual is also available on-line, in Info
format.  Texinfo source for the manual (along with pregenerated Info
files) is available at

699
@uref{ftp://ftp.gnu.org/pub/gnu/emacs/elisp-manual-21-2.6.tar.gz}
Dave Love's avatar
Dave Love committed
700

701 702 703 704
and all mirrors of @samp{ftp.gnu.org} (for a list, @pxref{Current GNU
distributions}).  @xref{Installing Texinfo documentation}, if you want
to install the Info files, or @ref{Printing a Texinfo file}, if you want
to use the Texinfo source to print the manual yourself.
Dave Love's avatar
Dave Love committed
705

706
An HTML version of the Emacs Lisp Reference Manual is available at
Dave Love's avatar
Dave Love committed
707

708
@uref{http://www.gnu.org/manual/elisp-manual-21-2.6/elisp.html}
Dave Love's avatar
Dave Love committed
709 710 711 712 713 714 715

@node Installing Texinfo documentation, Printing a Texinfo file, Emacs Lisp documentation, Getting help
@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
716
@cindex Info files, how to install
Dave Love's avatar
Dave Love committed
717 718 719 720 721

First, you must turn the Texinfo files into Info files.  You may do this
using the stand-alone @file{makeinfo} program, available as part of the latest
Texinfo package at

722
@uref{ftp://ftp.gnu.org/pub/gnu/texinfo/texinfo-4.0.tar.gz}
Dave Love's avatar
Dave Love committed
723

724 725
and all mirrors of @samp{ftp.gnu.org} (for a list, @pxref{Current GNU
distributions}).
Dave Love's avatar
Dave Love committed
726 727

For information about the Texinfo format, read the Texinfo manual which
728 729 730 731 732 733 734
comes with the Texinfo package.  This manual also comes installed in
Info format, so you can read it on-line; type @kbd{C-h i m texinfo
@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.
Dave Love's avatar
Dave Love committed
735 736

Neither @code{texinfo-format-buffer} nor @file{makeinfo} installs the
737 738
resulting Info files in Emacs's Info tree.  To install Info files,
perform these steps:
Dave Love's avatar
Dave Love committed
739 740

@enumerate
741 742
@item
Move the files to the @file{info} directory in the installed Emacs
743
distribution.  @xref{File-name conventions}, if you don't know where that
744
is.
Dave Love's avatar
Dave Love committed
745

746 747 748 749 750 751 752
@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
Dave Love's avatar
Dave Love committed
753

754 755 756 757 758 759 760 761 762
@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:
Dave Love's avatar
Dave Love committed
763 764 765 766 767

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

Thien-Thi Nguyen's avatar
Thien-Thi Nguyen committed
768
@end enumerate
Dave Love's avatar
Dave Love committed
769 770 771 772 773 774 775 776 777

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 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
778 779 780
parentheses.  This goes to the node named ``Top'' in that file.  For
example, to view a Info file named @file{@var{info-file}} in your home
directory, you can type this:
Dave Love's avatar
Dave Love committed
781

782 783 784
@example
@kbd{C-h i g (~/@var{info-file}) @key{RET}}
@end example
Dave Love's avatar
Dave Love committed
785 786

@item
787
You can create your own Info directory.  You can tell Emacs where that
Dave Love's avatar
Dave Love committed
788 789
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
790
directory which is a subdirectory of your home directory named @file{Info},
Dave Love's avatar
Dave Love committed
791 792 793 794 795 796 797 798
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
799
which has everything the system @file{dir} file has in it, except it should
Dave Love's avatar
Dave Love committed
800 801 802 803 804 805 806 807 808 809 810
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

@node Printing a Texinfo file, Viewing Info files outside of Emacs, Installing Texinfo documentation, Getting help
@section How do I print a Texinfo file?
@cindex Printing a Texinfo file
@cindex Texinfo file, printing
811
@cindex Printing documentation
Dave Love's avatar
Dave Love committed
812 813 814 815 816 817 818 819

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

820 821
@item
Make sure the first line of the Texinfo file looks like this:
Dave Love's avatar
Dave Love committed
822 823 824 825 826

@example
\input texinfo
@end example

827 828 829
You may need to change @samp{texinfo} to the full pathname of the
@file{texinfo.tex} file, which comes with Emacs as
@file{man/texinfo.tex} (or copy or link it into the current directory).
Dave Love's avatar
Dave Love committed
830

831 832 833 834
@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.
Dave Love's avatar
Dave Love committed
835

836 837
The @samp{texi2dvi} script is part of the GNU Texinfo distribution
(@pxref{Installing Texinfo documentation}).
Dave Love's avatar
Dave Love committed
838

839 840 841 842 843
@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.
Dave Love's avatar
Dave Love committed
844 845 846 847

@end enumerate

To get more general instructions, retrieve the latest Texinfo package
848
(@pxref{Installing Texinfo documentation}).
Dave Love's avatar
Dave Love committed
849 850 851 852 853 854 855 856 857 858 859

@node Viewing Info files outside of Emacs, Informational files for Emacs, Printing a Texinfo file, Getting help
@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

860 861 862 863
@item
@code{info}, a stand-alone version of the Info program, comes as part of
the Texinfo package.  @xref{Installing Texinfo documentation}, for
details.
Dave Love's avatar
Dave Love committed
864

865 866 867
@item
Xinfo, a stand-alone version of the Info program that runs under X
Window system.  You can get it at
Dave Love's avatar
Dave Love committed
868
@uref{ftp://ftp.gnu.org/pub/gnu/xinfo/xinfo-1.01.01.tar.gz} and all
869 870
mirrors of @samp{ftp.gnu.org} (see @ref{Current GNU distributions}, for a
list of mirrors).
Dave Love's avatar
Dave Love committed
871

872 873 874 875
@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/}.
Dave Love's avatar
Dave Love committed
876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899

@end itemize

@node Informational files for Emacs, Help installing Emacs, Viewing Info files outside of Emacs, Getting help
@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{FTP}, description of file
@cindex @file{GNU}, description of file
@cindex @file{INTERVIEW}, description of file
@cindex @file{LPF}, description of file
@cindex @file{MACHINES}, description of file
@cindex @file{MAILINGLISTS}, description of file
@cindex @file{NEWS}, description of file
@cindex @file{SERVICE}, description of file
@cindex @file{SUN-SUPPORT}, 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
900
Emacs distribution (see @ref{File-name conventions}, if you're not sure
901
where that is).
Dave Love's avatar
Dave Love committed
902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931

@table @file

@item COPYING
Emacs General Public License

@item DISTRIB
Emacs Availability Information, including the popular "Free Software
Foundation Order Form"

@item FTP
How to get GNU Software by Internet FTP or by UUCP

@item GNU
The GNU Manifesto

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

@item LPF
Why you should join the League for Programming Freedom

@item MACHINES
Status of Emacs on Various Machines and Systems

@item MAILINGLISTS
GNU Project Electronic Mailing Lists

@item NEWS
932
Emacs news, a history of recent user-visible changes
Dave Love's avatar
Dave Love committed
933 934 935 936 937 938 939 940 941 942 943 944 945

@item SERVICE
GNU Service Directory

@item SUN-SUPPORT
including "Using Emacstool with GNU Emacs"

@end table

Latest versions of the above files also available at

@uref{ftp://ftp.gnu.org/pub/gnu/GNUinfo/}

946 947
More GNU information, including back issues of the @cite{GNU's
Bulletin}, are at
Dave Love's avatar
Dave Love committed
948 949 950 951 952 953 954 955 956 957

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

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

@node Help installing Emacs, Obtaining the FAQ, Informational files for Emacs, Getting help
@section Where can I get help in installing Emacs?
@cindex Installation help
@cindex Help installing Emacs

958 959 960
@xref{Installing Emacs}, for some basic installation hints, and see
@ref{Problems building Emacs}, or @ref{Linking with -lX11 fails}, if you
have problems with the installation.
Dave Love's avatar
Dave Love committed
961

962
The file @file{etc/SERVICE} (see @ref{File-name conventions}, if you're
963 964 965 966
not sure where that is) lists companies and individuals willing to sell
you help in installing or using Emacs.  An up-to-date version this file
is available on @samp{ftp.gnu.org} (@pxref{Informational files for
Emacs}).
Dave Love's avatar
Dave Love committed
967 968 969 970 971 972 973 974 975 976 977 978 979 980

@node Obtaining the FAQ,  , Help installing Emacs, Getting help
@section Where can I get the latest version of this FAQ?
@cindex FAQ, obtaining the
@cindex Latest FAQ version, obtaining the
@cindex Retrieving the latest FAQ version
@cindex E-mail, retrieving the FAQ via
@cindex Web, reading the FAQ on the

The Emacs FAQ is available in several ways:

@itemize @bullet

@item
981 982
Inside of Emacs itself.  You can get it from selecting the @samp{Emacs
FAQ} option from the @samp{Help} menu of the Emacs menu bar at the top
Juri Linkov's avatar
Juri Linkov committed
983
of any Emacs frame, or by typing @kbd{C-h C-f} (@kbd{M-x view-emacs-FAQ}).
Dave Love's avatar
Dave Love committed
984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001

@item
Via USENET.  If you can read news, the FAQ should be available in your
news spool, in both the @uref{news:gnu.emacs.help} and
@uref{news:comp.emacs} newsgroups.  Every news reader should allow you
to read any news article that is still in the news spool, even if you
have read the article before.  You may need to read the instructions for
your news reader to discover how to do this.  In @file{rn}, this command
will do this for you at the article selection level:

@example
?GNU Emacs Frequently Asked Questions?rc:m
@end example

In Gnus, you should type @kbd{C-u C-x C-s} from the @file{*Summary*}
buffer or @kbd{C-u @key{SPC}} from the @file{*Newsgroup*} buffer to view
all articles in a newsgroup.

1002 1003
If the FAQ articles have expired and have been deleted from your news
spool, it might (or might not) do some good to complain to your news
Dave Love's avatar
Dave Love committed
1004 1005 1006
administrator, because the most recent FAQ should not expire for a
while.

1007 1008
@item
Via HTTP or FTP.  You can always fetch the latest FAQ from
Dave Love's avatar
Dave Love committed
1009 1010 1011 1012 1013 1014 1015

@uref{http://www.lerner.co.il/emacs/} and

@uref{ftp://ftp.lerner.co.il/pub/emacs/}

@item
In the Emacs distribution.  Since Emacs 18.56, the FAQ at the time
1016 1017
of release has been part of the Emacs distribution as either
@file{etc/FAQ} or @file{man/faq.texi} (@pxref{File-name conventions}).
Dave Love's avatar
Dave Love committed
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052

@item
Via the World Wide Web.  A hypertext version is available at

@uref{http://www.lerner.co.il/emacs/}

@item
Via anonymous ftp and e-mail from @file{rtfm.mit.edu} (and its mirror in
Europe), the main repository for FAQs and other items posted to
news.answers.  The Emacs FAQs are available at

@uref{ftp://rtfm.mit.edu/pub/usenet/comp.emacs/} and

@uref{ftp://ftp.uni-paderborn.de/pub/doc/FAQ/comp/emacs/}

If you do not have access to anonymous FTP, you can access the archives
using the @file{rtfm.mit.edu} mail server.  The Emacs FAQ can be
retrieved by sending mail to @email{mail-server@@rtfm.mit.edu} with a
blank subject and containing

@example
send usenet/news.answers/GNU-Emacs-FAQ/diffs
send usenet/news.answers/GNU-Emacs-FAQ/part1
send usenet/news.answers/GNU-Emacs-FAQ/part2
send usenet/news.answers/GNU-Emacs-FAQ/part3
send usenet/news.answers/GNU-Emacs-FAQ/part4
send usenet/news.answers/GNU-Emacs-FAQ/part5
@end example

For more information, send email to @email{mail-server@@rtfm.mit.edu}
with "help" and "index" in the body on separate lines.

@item
As the very last resort, you can e-mail a request to
@email{emacs-faq@@lerner.co.il}.  Don't do this unless you have made a
1053
good-faith effort to obtain the FAQ list via one of the methods listed
Dave Love's avatar
Dave Love committed
1054 1055 1056 1057 1058 1059 1060 1061 1062
above.

@end itemize

@c ------------------------------------------------------------
@node    Status of Emacs, Common requests, Getting help, Top
@chapter Status of Emacs
@cindex Status of Emacs

1063
This chapter gives you basic information about Emacs, including its
Dave Love's avatar
Dave Love committed
1064 1065 1066
latest version status.

@menu
Thien-Thi Nguyen's avatar
Thien-Thi Nguyen committed
1067 1068 1069 1070
* Origin of the term Emacs::
* Latest version of Emacs::
* New in Emacs 20::
* New in Emacs 21::
Dave Love's avatar
Dave Love committed
1071 1072 1073
@end menu

@node Origin of the term Emacs, Latest version of Emacs, Status of Emacs, Status of Emacs
1074 1075
@section Where does the name ``Emacs'' come from?
@cindex Origin of the term ``Emacs''
Dave Love's avatar
Dave Love committed
1076 1077 1078 1079
@cindex Emacs name origin
@cindex TECO
@cindex Original version of Emacs

1080
Emacs originally was an acronym for Editor MACroS.  RMS says he ``picked
Dave Love's avatar
Dave Love committed
1081
the name Emacs because @key{E} was not in use as an abbreviation on ITS at
1082
the time.''  The first Emacs was a set of macros written in 1976 at MIT
Dave Love's avatar
Dave Love committed
1083 1084
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
1085
TECO with a ``real-time'' full-screen mode with reprogrammable keys.
Dave Love's avatar
Dave Love committed
1086 1087 1088 1089 1090 1091
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
1092 1093 1094
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.
Dave Love's avatar
Dave Love committed
1095

1096
@cindex Why Emacs?
Dave Love's avatar
Dave Love committed
1097
For some not-so-serious alternative reasons for Emacs to have that
1098
name, check out the file @file{etc/JOKES} (@pxref{File-name
1099
conventions}).
Dave Love's avatar
Dave Love committed
1100 1101 1102 1103

@node Latest version of Emacs, New in Emacs 20, Origin of the term Emacs, Status of Emacs
@section What is the latest version of Emacs?
@cindex Version, latest
1104
@cindex Latest version of Emacs
Dave Love's avatar
Dave Love committed
1105

1106
Emacs @value{VER} is the current version as of this writing.
Dave Love's avatar
Dave Love committed
1107

1108
@node New in Emacs 20,  New in Emacs 21, Latest version of Emacs, Status of Emacs
Dave Love's avatar
Dave Love committed
1109 1110 1111 1112
@section What is different about Emacs 20?
@cindex Differences between Emacs 19 and Emacs 20
@cindex Emacs 20, new features in

Juri Linkov's avatar
Juri Linkov committed
1113
To find out what has changed in recent versions, type @kbd{C-h C-n}
Dave Love's avatar
Dave Love committed
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123
(@kbd{M-x view-emacs-news}).  The oldest changes are at the bottom of
the file, so you might want to read it starting there, rather than at
the top.

The differences between Emacs versions 18 and 19 was 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
1124 1125 1126 1127
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.
Dave Love's avatar
Dave Love committed
1128 1129 1130 1131 1132 1133

A number of older Lisp packages, such as Gnus, Supercite and the
calendar/diary, have been updated and enhanced to work with Emacs 20,
and are now included with the standard distribution.


1134 1135 1136 1137 1138 1139 1140 1141 1142 1143
@node New in Emacs 21, , New in Emacs 20, Status of Emacs
@section What is different about Emacs 21?
@cindex Differences between Emacs 20 and Emacs 21
@cindex Emacs 21, new features in
@cindex Recently introduced features

@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
1144
on platforms which support that.  As a result, the visual appearance of
1145 1146 1147 1148 1149
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.

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

Dave Love's avatar
Dave Love committed
1156 1157 1158 1159 1160 1161
@c ------------------------------------------------------------
@node    Common requests, Bugs and problems, Status of Emacs, Top
@chapter Common requests
@cindex Common requests

@menu
Thien-Thi Nguyen's avatar
Thien-Thi Nguyen committed
1162 1163 1164 1165 1166 1167 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 1206 1207 1208 1209 1210
* Setting up a customization file::
* Debugging a customization file::
* Colors on a TTY::
* Displaying the current line or column::
* Displaying the current file name in the titlebar::
* Turning on abbrevs by default::
* Turning on auto-fill by default::
* Associating modes with files::
* Working with unprintable characters::
* Highlighting a region::
* Controlling case sensitivity::
* Wrapping words automatically::
* Spell-checkers::
* Checking TeX and *roff documents::
* 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 > at the beginning of each line::
* Underlining paragraphs::
* Repeating a command as many times as possible::
* 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::
* Replacing highlighted text::
* Editing MS-DOS files::
* Filling paragraphs with a single space::
* Escape sequences in shell output::
Dave Love's avatar
Dave Love committed
1211 1212
@end menu

1213
@node Setting up a customization file, Colors on a TTY, Common requests, Common requests
Dave Love's avatar
Dave Love committed
1214 1215
@section How do I set up a @file{.emacs} file properly?
@cindex @file{.emacs} file, setting up
1216
@cindex @file{.emacs} file, locating
Dave Love's avatar
Dave Love committed
1217 1218 1219
@cindex Init file, setting up
@cindex Customization file, setting up

Juanma Barranquero's avatar
Juanma Barranquero committed
1220
@inforef{Init File, Init File, emacs}.
Dave Love's avatar
Dave Love committed
1221 1222 1223 1224 1225 1226

In general, new Emacs users should not have @file{.emacs} files, because
it causes confusing non-standard behavior.  Then they send questions to
@email{help-gnu-emacs@@gnu.org} asking why Emacs isn't behaving as
documented.

1227 1228 1229 1230 1231 1232
Beginning with version 20.1, Emacs includes the new Customize
facility, which can be invoked using @kbd{M-x customize @key{RET}}.
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.  Not all packages support Customize as of this
writing, but the number is growing fairly steadily.
Dave Love's avatar
Dave Love committed
1233

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

1240 1241 1242 1243
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.

1244 1245 1246 1247 1248 1249
@node Colors on a TTY, Debugging a customization file, Setting up a customization file, Common requests
@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

1250
In Emacs 21.1 and later, colors and faces are supported in non-windowed mode,
1251
i.e.@: on Unix and GNU/Linux text-only terminals and consoles, and when
1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265
invoked as @samp{emacs -nw} on X and MS-Windows.  (Colors and faces were
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 usually turned off by default; see @ref{Turning
on syntax highlighting}, for instructions how to turn it on.

@node Debugging a customization file, Displaying the current line or column, Colors on a TTY, Common requests
Dave Love's avatar
Dave Love committed
1266 1267 1268 1269
@section How do I debug a @file{.emacs} file?
@cindex Debugging @file{.emacs} file
@cindex @file{.emacs} debugging
@cindex Init file debugging
1270
@cindex @samp{-debug-init} option
Dave Love's avatar
Dave Love committed
1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286

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.

1287
@node Displaying the current line or column, Displaying the current file name in the titlebar, Debugging a customization file, Common requests
Dave Love's avatar
Dave Love committed
1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302
@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}

To have Emacs automatically display the current line number of the point
in the mode line, do @kbd{M-x line-number-mode}.  You can also put the
form

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

1303
@noindent
Dave Love's avatar
Dave Love committed
1304
in your @file{.emacs} file to achieve this whenever you start Emacs.
1305 1306 1307 1308
(Line number display is on by default, unless your site-specific
initialization disables it.) Note that Emacs will not display the line
number if the buffer's size in bytes is larger than the value of the
variable @code{line-number-display-limit}.
Dave Love's avatar
Dave Love committed
1309 1310 1311 1312 1313

As of Emacs 20, you can similarly display the current column with
@kbd{M-x column-number-mode}, or by putting the form

@lisp
Thien-Thi Nguyen's avatar
Thien-Thi Nguyen committed
1314
(setq column-number-mode t)
Dave Love's avatar
Dave Love committed
1315 1316
@end lisp

1317
@noindent
Dave Love's avatar
Dave Love committed
1318 1319
in your @file{.emacs} file.

1320 1321
The @code{"%c"} format specifier in the variable @code{mode-line-format}
will insert the current column's value into the mode line.  See the
Dave Love's avatar
Dave Love committed
1322 1323 1324 1325
documentation for @code{mode-line-format} (using @kbd{C-h v
mode-line-format @key{RET}}) for more information on how to set and use
this variable.

1326 1327 1328 1329
Users of all Emacs versions can display the current column using the
@samp{column} package written by @email{abraham@@dina.kvl.dk, Per
Abrahamsen}.  @xref{Packages that do not come with Emacs}, for
instructions on how to get it.
Dave Love's avatar
Dave Love committed
1330

1331 1332
@cindex Set number capability in @code{vi} emulators
None of the @code{vi} emulation modes provide the ``set number''
1333 1334 1335 1336
capability of @code{vi} (as far as we know).  The @samp{setnu} package
written by @email{kyle@@wonderworks.com, Kyle Jones} provides this
feature.  So too does @samp{wb-line-number}, written by
@email{naoki.y.nakamura@@nifty.com, Naoki Nakamura}.
Dave Love's avatar
Dave Love committed
1337

1338 1339 1340 1341
@node Displaying the current file name in the titlebar, Turning on abbrevs by default, Displaying the current line or column, Common requests
@section How can I modify the titlebar to contain the current file name?
@cindex Titlebar, displaying the current file name in
@cindex File name, displaying in the titlebar
Dave Love's avatar
Dave Love committed
1342 1343
@cindex @code{frame-title-format}

Eli Zaretskii's avatar