comparison man/faq.texi @ 90317:34c8b755296d

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-23 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 113-118) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 38-39) - Update from CVS
author Miles Bader <miles@gnu.org>
date Fri, 24 Feb 2006 08:08:56 +0000
parents d1c5430c5bff 1c9e76acce59
children e6bf73e43cf4
comparison
equal deleted inserted replaced
90316:458ed0c8c4c3 90317:34c8b755296d
421 The FSF has maintained archives of all of the GNU mailing lists for many 421 The FSF has maintained archives of all of the GNU mailing lists for many
422 years, although there may be some unintentional gaps in coverage. The 422 years, although there may be some unintentional gaps in coverage. The
423 archive is not particularly well organized or easy to retrieve 423 archive is not particularly well organized or easy to retrieve
424 individual postings from, but pretty much everything is there. 424 individual postings from, but pretty much everything is there.
425 425
426 The archive is at @uref{ftp://ftp-mailing-list-archives.gnu.org}. 426 The archive is at @uref{ftp://lists.gnu.org/}.
427 427
428 The archive can be browsed over the web at 428 The archive can be browsed over the web at
429 @uref{http://mail.gnu.org/archive/html/, the GNU mail archive}. 429 @uref{http://lists.gnu.org/archive/html/, the GNU mail archive}.
430 430
431 Web-based Usenet search services, such as 431 Web-based Usenet search services, such as
432 @uref{http://groups.google.com, Google}, also archive the 432 @uref{http://groups.google.com/groups/dir?sel=33592484, Google}, also
433 @code{gnu.*} groups. 433 archive the @code{gnu.*} groups.
434
435 You can read the archives of the @code{gnu.*} groups and post new
436 messages at @uref{http://gmane.org/, Gmane}.
434 437
435 @node Reporting bugs, Unsubscribing from Emacs lists, Newsgroup archives, General questions 438 @node Reporting bugs, Unsubscribing from Emacs lists, Newsgroup archives, General questions
436 @section Where should I report bugs and other problems with Emacs? 439 @section Where should I report bugs and other problems with Emacs?
437 @cindex Bug reporting 440 @cindex Bug reporting
438 @cindex Good bug reports 441 @cindex Good bug reports
439 @cindex How to submit a bug report 442 @cindex How to submit a bug report
440 @cindex Reporting bugs 443 @cindex Reporting bugs
441 444
442 The correct way to report Emacs bugs is by e-mail to 445 The correct way to report Emacs bugs is to use the command
443 @email{bug-gnu-emacs@@gnu.org}. Anything sent here also appears in the 446 @kbd{M-x report-emacs-bug}. It sets up a mail buffer with the
447 essential information and the correct e-mail address which is
448 @email{bug-gnu-emacs@@gnu.org} for the released versions of Emacs.
449 Anything sent to @email{bug-gnu-emacs@@gnu.org} also appears in the
444 newsgroup @uref{news:gnu.emacs.bug}, but please use e-mail instead of 450 newsgroup @uref{news:gnu.emacs.bug}, but please use e-mail instead of
445 news to submit the bug report. This ensures a reliable return address 451 news to submit the bug report. This ensures a reliable return address
446 so you can be contacted for further details. 452 so you can be contacted for further details.
447 453
448 Be sure to read the ``Bugs'' section of the Emacs manual before reporting 454 Be sure to read the ``Bugs'' section of the Emacs manual before reporting
449 a bug to bug-gnu-emacs! The manual describes in detail how to submit a 455 a bug! The manual describes in detail how to submit a useful bug
450 useful bug report. (@xref{On-line manual}, if you don't know how to read the 456 report (@pxref{Bugs, , Reporting Bugs, emacs, The GNU Emacs Manual}).
451 manual.) 457 (@xref{On-line manual}, if you don't know how to read the manual.)
452 458
453 RMS says: 459 RMS says:
454 460
455 @quotation 461 @quotation
456 Sending bug reports to @email{help-gnu-emacs@@gnu.org} (which has the 462 Sending bug reports to @email{help-gnu-emacs@@gnu.org} (which has the
672 @cindex HTML version of Emacs manual, obtaining 678 @cindex HTML version of Emacs manual, obtaining
673 An HTML version of the manual is at 679 An HTML version of the manual is at
674 680
675 @uref{http://www.gnu.org/software/emacs/manual/emacs.html} 681 @uref{http://www.gnu.org/software/emacs/manual/emacs.html}
676 682
683 The manual is available in other formats at
684
685 @uref{http://www.gnu.org/software/emacs/manual/}
686
677 @xref{Learning how to do something}, for how to view the manual on-line. 687 @xref{Learning how to do something}, for how to view the manual on-line.
678 688
679 @node Emacs Lisp documentation, Installing Texinfo documentation, Getting a printed manual, Getting help 689 @node Emacs Lisp documentation, Installing Texinfo documentation, Getting a printed manual, Getting help
680 @section Where can I get documentation on Emacs Lisp? 690 @section Where can I get documentation on Emacs Lisp?
681 @cindex Documentation on Emacs Lisp 691 @cindex Documentation on Emacs Lisp
761 If you want to install Info files and you don't have the necessary 771 If you want to install Info files and you don't have the necessary
762 privileges, you have several options: 772 privileges, you have several options:
763 773
764 @itemize @bullet 774 @itemize @bullet
765 @item 775 @item
766 Info files don't actually need to be installed before being used. You 776 Info files don't actually need to be installed before being used.
767 can feed a file name to the @code{Info-goto-node} command (invoked by 777 You can use a prefix argument for the @code{info} command and specify
768 pressing @key{g} in Info mode) by typing the name of the file in 778 the name of the Info file in the minibuffer. This goes to the node
769 parentheses. This goes to the node named ``Top'' in that file. For 779 named @samp{Top} in that file. For example, to view a Info file named
770 example, to view a Info file named @file{@var{info-file}} in your home 780 @file{@var{info-file}} in your home directory, you can type this:
771 directory, you can type this: 781
782 @example
783 @kbd{C-u C-h i ~/@var{info-file} @key{RET}}
784 @end example
785
786 Alternatively, you can feed a file name to the @code{Info-goto-node}
787 command (invoked by pressing @key{g} in Info mode) by typing the name
788 of the file in parentheses, like this:
772 789
773 @example 790 @example
774 @kbd{C-h i g (~/@var{info-file}) @key{RET}} 791 @kbd{C-h i g (~/@var{info-file}) @key{RET}}
775 @end example 792 @end example
776 793
1072 @cindex Version, latest 1089 @cindex Version, latest
1073 @cindex Latest version of Emacs 1090 @cindex Latest version of Emacs
1074 1091
1075 Emacs @value{VER} is the current version as of this writing. 1092 Emacs @value{VER} is the current version as of this writing.
1076 1093
1077 @node New in Emacs 20, New in Emacs 21, Latest version of Emacs, Status of Emacs 1094 @node New in Emacs 20, New in Emacs 21, Latest version of Emacs, Status of Emacs
1078 @section What is different about Emacs 20? 1095 @section What is different about Emacs 20?
1079 @cindex Differences between Emacs 19 and Emacs 20 1096 @cindex Differences between Emacs 19 and Emacs 20
1080 @cindex Emacs 20, new features in 1097 @cindex Emacs 20, new features in
1081 1098
1082 To find out what has changed in recent versions, type @kbd{C-h C-n} 1099 To find out what has changed in recent versions, type @kbd{C-h C-n}
1120 @cindex TTY colors 1137 @cindex TTY colors
1121 In addition, Emacs 21 supports faces on text-only terminals. This means 1138 In addition, Emacs 21 supports faces on text-only terminals. This means
1122 that you can now have colors when you run Emacs on a GNU/Linux console 1139 that you can now have colors when you run Emacs on a GNU/Linux console
1123 and on @code{xterm} with @kbd{emacs -nw}. 1140 and on @code{xterm} with @kbd{emacs -nw}.
1124 1141
1125 @node New in Emacs 22, , New in Emacs 21, Status of Emacs 1142 @node New in Emacs 22, , New in Emacs 21, Status of Emacs
1126 @section What is different about Emacs 22? 1143 @section What is different about Emacs 22?
1127 @cindex Differences between Emacs 21 and Emacs 22 1144 @cindex Differences between Emacs 21 and Emacs 22
1128 @cindex Emacs 22, new features in 1145 @cindex Emacs 22, new features in
1129 @cindex Recently introduced features 1146 @cindex Recently introduced features
1130 1147
1161 @cindex Common requests 1178 @cindex Common requests
1162 1179
1163 @menu 1180 @menu
1164 * Setting up a customization file:: 1181 * Setting up a customization file::
1165 * Using Customize:: 1182 * Using Customize::
1183 * Colors on a TTY::
1166 * Debugging a customization file:: 1184 * Debugging a customization file::
1167 * Colors on a TTY::
1168 * Displaying the current line or column:: 1185 * Displaying the current line or column::
1169 * Displaying the current file name in the titlebar:: 1186 * Displaying the current file name in the titlebar::
1170 * Turning on abbrevs by default:: 1187 * Turning on abbrevs by default::
1171 * Turning on auto-fill by default::
1172 * Associating modes with files:: 1188 * Associating modes with files::
1189 * Highlighting a region::
1190 * Replacing highlighted text::
1191 * Controlling case sensitivity::
1173 * Working with unprintable characters:: 1192 * Working with unprintable characters::
1174 * Highlighting a region::
1175 * Controlling case sensitivity::
1176 * Wrapping words automatically::
1177 * Searching for/replacing newlines:: 1193 * Searching for/replacing newlines::
1178 * Yanking text in isearch:: 1194 * Yanking text in isearch::
1195 * Wrapping words automatically::
1196 * Turning on auto-fill by default::
1179 * Spell-checkers:: 1197 * Spell-checkers::
1180 * Checking TeX and *roff documents:: 1198 * Checking TeX and *roff documents::
1181 * Changing load-path:: 1199 * Changing load-path::
1182 * Using an already running Emacs process:: 1200 * Using an already running Emacs process::
1183 * Compiler error messages:: 1201 * Compiler error messages::
1194 * Valid X resources:: 1212 * Valid X resources::
1195 * Evaluating Emacs Lisp code:: 1213 * Evaluating Emacs Lisp code::
1196 * Changing the length of a Tab:: 1214 * Changing the length of a Tab::
1197 * Inserting text at the beginning of each line:: 1215 * Inserting text at the beginning of each line::
1198 * Underlining paragraphs:: 1216 * Underlining paragraphs::
1199 * Repeating a command as many times as possible::
1200 * Forcing the cursor to remain in the same column:: 1217 * Forcing the cursor to remain in the same column::
1201 * Forcing Emacs to iconify itself:: 1218 * Forcing Emacs to iconify itself::
1202 * Using regular expressions:: 1219 * Using regular expressions::
1203 * Replacing text across multiple files:: 1220 * Replacing text across multiple files::
1204 * Documentation for etags:: 1221 * Documentation for etags::
1207 * Going to a line by number:: 1224 * Going to a line by number::
1208 * Modifying pull-down menus:: 1225 * Modifying pull-down menus::
1209 * Deleting menus and menu options:: 1226 * Deleting menus and menu options::
1210 * Turning on syntax highlighting:: 1227 * Turning on syntax highlighting::
1211 * Scrolling only one line:: 1228 * Scrolling only one line::
1212 * Replacing highlighted text::
1213 * Editing MS-DOS files:: 1229 * Editing MS-DOS files::
1214 * Filling paragraphs with a single space:: 1230 * Filling paragraphs with a single space::
1215 * Escape sequences in shell output:: 1231 * Escape sequences in shell output::
1216 @end menu 1232 @end menu
1217 1233
1385 1401
1386 @lisp 1402 @lisp
1387 (setq frame-title-format "%b") 1403 (setq frame-title-format "%b")
1388 @end lisp 1404 @end lisp
1389 1405
1390 @node Turning on abbrevs by default, Turning on auto-fill by default, Displaying the current file name in the titlebar, Common requests 1406 @node Turning on abbrevs by default, Associating modes with files, Displaying the current file name in the titlebar, Common requests
1391 @section How do I turn on abbrevs by default just in mode @var{mymode}? 1407 @section How do I turn on abbrevs by default just in mode @var{mymode}?
1392 @cindex Abbrevs, turning on by default 1408 @cindex Abbrevs, turning on by default
1393 1409
1394 Put this in your @file{.emacs} file: 1410 Put this in your @file{.emacs} file:
1395 1411
1404 @end lisp 1420 @end lisp
1405 1421
1406 Starting with Emacs 22, the standard abbrevs file is read automatically 1422 Starting with Emacs 22, the standard abbrevs file is read automatically
1407 at startup, so the first of these two forms becomes unnecessary. 1423 at startup, so the first of these two forms becomes unnecessary.
1408 1424
1409 @node Turning on auto-fill by default, Associating modes with files, Turning on abbrevs by default, Common requests 1425 @node Associating modes with files, Highlighting a region, Turning on abbrevs by default, Common requests
1410 @section How do I turn on @code{auto-fill-mode} by default?
1411 @cindex @code{auto-fill-mode}, activating automatically
1412 @cindex Filling automatically
1413 @cindex Automatic entry to @code{auto-fill-mode}
1414
1415 To turn on @code{auto-fill-mode} just once for one buffer, use @kbd{M-x
1416 auto-fill-mode}.
1417
1418 To turn it on for every buffer in a certain mode, you must use the hook
1419 for that mode. For example, to turn on @code{auto-fill} mode for all
1420 text buffers, including the following in your @file{.emacs} file:
1421
1422 @lisp
1423 (add-hook 'text-mode-hook 'turn-on-auto-fill)
1424 @end lisp
1425
1426 If you want @code{auto-fill} mode on in all major modes, do this:
1427
1428 @lisp
1429 (setq-default auto-fill-function 'do-auto-fill)
1430 @end lisp
1431
1432 @node Associating modes with files, Working with unprintable characters, Turning on auto-fill by default, Common requests
1433 @section How do I make Emacs use a certain major mode for certain files? 1426 @section How do I make Emacs use a certain major mode for certain files?
1434 @cindex Associating modes with files 1427 @cindex Associating modes with files
1435 @cindex File extensions and modes 1428 @cindex File extensions and modes
1436 @cindex @code{auto-mode-alist}, modifying 1429 @cindex @code{auto-mode-alist}, modifying
1437 @cindex Modes, associating with file extensions 1430 @cindex Modes, associating with file extensions
1457 determines which interpreter you're using by examining the first line of 1450 determines which interpreter you're using by examining the first line of
1458 the script.) This feature only applies when the file name doesn't 1451 the script.) This feature only applies when the file name doesn't
1459 indicate which mode to use. Use @kbd{C-h v} (or @kbd{M-x 1452 indicate which mode to use. Use @kbd{C-h v} (or @kbd{M-x
1460 describe-variable}) on @code{interpreter-mode-alist} to learn more. 1453 describe-variable}) on @code{interpreter-mode-alist} to learn more.
1461 1454
1462 @node Working with unprintable characters, Highlighting a region, Associating modes with files, Common requests 1455 @node Highlighting a region, Replacing highlighted text, Associating modes with files, Common requests
1456 @section How can I highlight a region of text in Emacs?
1457 @cindex Highlighting text
1458 @cindex Text, highlighting
1459 @cindex @code{transient-mark-mode}
1460 @cindex Region, highlighting a
1461
1462 You can cause the region to be highlighted when the mark is active by
1463 including
1464
1465 @lisp
1466 (transient-mark-mode t)
1467 @end lisp
1468
1469 @noindent
1470 in your @file{.emacs} file.
1471
1472 @node Replacing highlighted text, Controlling case sensitivity, Highlighting a region, Common requests
1473 @section How can I replace highlighted text with what I type?
1474 @cindex @code{delete-selection-mode}
1475 @cindex Replacing highlighted text
1476 @cindex Highlighting and replacing text
1477
1478 Use @code{delete-selection-mode}, which you can start automatically by
1479 placing the following Lisp form in your @file{.emacs} file:
1480
1481 @lisp
1482 (delete-selection-mode 1)
1483 @end lisp
1484
1485 According to the documentation string for @code{delete-selection-mode}
1486 (which you can read using @kbd{M-x describe-function @key{RET}
1487 delete-selection-mode @key{RET}}):
1488
1489 @quotation
1490 When ON, typed text replaces the selection if the selection is active.
1491 When OFF, typed text is just inserted at point.
1492 @end quotation
1493
1494 This mode also allows you to delete (not kill) the highlighted region by
1495 pressing @key{DEL}.
1496
1497 @node Controlling case sensitivity, Working with unprintable characters, Replacing highlighted text, Common requests
1498 @section How do I control Emacs's case-sensitivity when searching/replacing?
1499 @cindex @code{case-fold-search}
1500 @cindex Case sensitivity of searches
1501 @cindex Searching without case sensitivity
1502 @cindex Ignoring case in searches
1503
1504 For searching, the value of the variable @code{case-fold-search}
1505 determines whether they are case sensitive:
1506
1507 @lisp
1508 (setq case-fold-search nil) ; make searches case sensitive
1509 (setq case-fold-search t) ; make searches case insensitive
1510 @end lisp
1511
1512 @cindex Case sensitivity in replacements
1513 @cindex Replacing, and case sensitivity
1514 @cindex @code{case-replace}
1515 Similarly, for replacing, the variable @code{case-replace} determines
1516 whether replacements preserve case.
1517
1518 You can also toggle case sensitivity at will in isearch with @kbd{M-c}.
1519
1520 To change the case sensitivity just for one major mode, use the major
1521 mode's hook. For example:
1522
1523 @lisp
1524 (add-hook '@var{foo}-mode-hook
1525 (lambda ()
1526 (setq case-fold-search nil)))
1527 @end lisp
1528
1529 @node Working with unprintable characters, Searching for/replacing newlines, Controlling case sensitivity, Common requests
1463 @section How do I search for, delete, or replace unprintable (eight-bit or control) characters? 1530 @section How do I search for, delete, or replace unprintable (eight-bit or control) characters?
1464 @cindex Unprintable characters, working with 1531 @cindex Unprintable characters, working with
1465 @cindex Working with unprintable characters 1532 @cindex Working with unprintable characters
1466 @cindex Control characters, working with 1533 @cindex Control characters, working with
1467 @cindex Eight-bit characters, working with 1534 @cindex Eight-bit characters, working with
1505 Replacing is similar to the above. To replace all unprintable 1572 Replacing is similar to the above. To replace all unprintable
1506 characters with a colon, use: 1573 characters with a colon, use:
1507 1574
1508 M-x replace-regexp @key{RET} [^ @key{TAB} C-q @key{LFD} C-q @key{RET} C-q C-l @key{SPC} -~] @key{RET} : @key{RET} 1575 M-x replace-regexp @key{RET} [^ @key{TAB} C-q @key{LFD} C-q @key{RET} C-q C-l @key{SPC} -~] @key{RET} : @key{RET}
1509 1576
1510 @itemize @bullet 1577 @node Searching for/replacing newlines, Yanking text in isearch, Working with unprintable characters, Common requests
1511
1512 @item
1513 You don't need to quote @key{TAB} with either isearch or typing
1514 something in the minibuffer.
1515
1516 @end itemize
1517
1518 @node Highlighting a region, Controlling case sensitivity, Working with unprintable characters, Common requests
1519 @section How can I highlight a region of text in Emacs?
1520 @cindex Highlighting text
1521 @cindex Text, highlighting
1522 @cindex @code{transient-mark-mode}
1523 @cindex Region, highlighting a
1524
1525 You can cause the region to be highlighted when the mark is active by
1526 including
1527
1528 @lisp
1529 (transient-mark-mode t)
1530 @end lisp
1531
1532 @noindent
1533 in your @file{.emacs} file. (Also see @ref{Turning on syntax
1534 highlighting}.)
1535
1536 @node Controlling case sensitivity, Searching for/replacing newlines, Highlighting a region, Common requests
1537 @section How do I control Emacs's case-sensitivity when searching/replacing?
1538 @cindex @code{case-fold-search}
1539 @cindex Case sensitivity of searches
1540 @cindex Searching without case sensitivity
1541 @cindex Ignoring case in searches
1542
1543 For searching, the value of the variable @code{case-fold-search}
1544 determines whether they are case sensitive:
1545
1546 @lisp
1547 (setq case-fold-search nil) ; make searches case sensitive
1548 (setq case-fold-search t) ; make searches case insensitive
1549 @end lisp
1550
1551 @cindex Case sensitivity in replacements
1552 @cindex Replacing, and case sensitivity
1553 @cindex @code{case-replace}
1554 Similarly, for replacing, the variable @code{case-replace} determines
1555 whether replacements preserve case.
1556
1557 You can also toggle case sensitivity at will in isearch with @kbd{M-c}.
1558
1559 To change the case sensitivity just for one major mode, use the major
1560 mode's hook. For example:
1561
1562 @lisp
1563 (add-hook '@var{foo}-mode-hook
1564 (lambda ()
1565 (setq case-fold-search nil)))
1566 @end lisp
1567
1568 @node Searching for/replacing newlines, Yanking text in isearch, Controlling case sensitivity, Common requests
1569 @section How do I input a newline character in isearch or query-replace? 1578 @section How do I input a newline character in isearch or query-replace?
1570 @cindex Searching for newlines 1579 @cindex Searching for newlines
1571 @cindex Replacing newlines 1580 @cindex Replacing newlines
1572 1581
1573 Use @kbd{C-q C-j}. For more information, see @inforef{Special Isearch, 1582 Use @kbd{C-q C-j}. For more information, see @inforef{Special Isearch,
1579 @cindex Yanking text into the search string 1588 @cindex Yanking text into the search string
1580 @cindex isearch yanking 1589 @cindex isearch yanking
1581 1590
1582 Use @kbd{M-y}. @inforef{Isearch Yank, Isearch Yanking, emacs}. 1591 Use @kbd{M-y}. @inforef{Isearch Yank, Isearch Yanking, emacs}.
1583 1592
1584 @node Wrapping words automatically, Spell-checkers, Yanking text in isearch, Common requests 1593 @node Wrapping words automatically, Turning on auto-fill by default, Yanking text in isearch, Common requests
1585 @section How do I make Emacs wrap words for me? 1594 @section How do I make Emacs wrap words for me?
1586 @cindex Wrapping word automatically 1595 @cindex Wrapping word automatically
1587 @cindex Wrapping lines 1596 @cindex Wrapping lines
1588 @cindex Line wrap 1597 @cindex Line wrap
1589 @cindex @code{auto-fill-mode}, introduction to 1598 @cindex @code{auto-fill-mode}, introduction to
1593 Use @code{auto-fill-mode}, activated by typing @kbd{M-x auto-fill-mode}. 1602 Use @code{auto-fill-mode}, activated by typing @kbd{M-x auto-fill-mode}.
1594 The default maximum line width is 70, determined by the variable 1603 The default maximum line width is 70, determined by the variable
1595 @code{fill-column}. To learn how to turn this on automatically, see 1604 @code{fill-column}. To learn how to turn this on automatically, see
1596 @ref{Turning on auto-fill by default}. 1605 @ref{Turning on auto-fill by default}.
1597 1606
1598 @node Spell-checkers, Checking TeX and *roff documents, Wrapping words automatically, Common requests 1607 @node Turning on auto-fill by default, Spell-checkers, Wrapping words automatically, Common requests
1608 @section How do I turn on @code{auto-fill-mode} by default?
1609 @cindex @code{auto-fill-mode}, activating automatically
1610 @cindex Filling automatically
1611 @cindex Automatic entry to @code{auto-fill-mode}
1612
1613 To turn on @code{auto-fill-mode} just once for one buffer, use @kbd{M-x
1614 auto-fill-mode}.
1615
1616 To turn it on for every buffer in a certain mode, you must use the hook
1617 for that mode. For example, to turn on @code{auto-fill} mode for all
1618 text buffers, including the following in your @file{.emacs} file:
1619
1620 @lisp
1621 (add-hook 'text-mode-hook 'turn-on-auto-fill)
1622 @end lisp
1623
1624 If you want @code{auto-fill} mode on in all major modes, do this:
1625
1626 @lisp
1627 (setq-default auto-fill-function 'do-auto-fill)
1628 @end lisp
1629
1630 @node Spell-checkers, Checking TeX and *roff documents, Turning on auto-fill by default, Common requests
1599 @section Where can I get a better spelling checker for Emacs? 1631 @section Where can I get a better spelling checker for Emacs?
1600 @cindex Checking spelling 1632 @cindex Checking spelling
1601 @cindex Spelling, checking text documents 1633 @cindex Spelling, checking text documents
1602 1634
1603 Use Ispell. @xref{Ispell}. 1635 Use Ispell. @xref{Ispell}.
1843 In Emacs 21 and later, this is on by default: if the variable 1875 In Emacs 21 and later, this is on by default: if the variable
1844 @code{truncate-lines} is non-@code{nil} in the current buffer, Emacs 1876 @code{truncate-lines} is non-@code{nil} in the current buffer, Emacs
1845 automatically scrolls the display horizontally when point moves off the 1877 automatically scrolls the display horizontally when point moves off the
1846 left or right edge of the window. 1878 left or right edge of the window.
1847 1879
1880 Note that this is overridden by the variable
1881 @code{truncate-partial-width-windows} if that variable is non-nil
1882 and the current buffer is not full-frame width.
1883
1848 In Emacs 20, use the @code{hscroll-mode}. Here is some information from 1884 In Emacs 20, use the @code{hscroll-mode}. Here is some information from
1849 the documentation, available by typing @kbd{C-h f hscroll-mode @key{RET}}: 1885 the documentation, available by typing @kbd{C-h f hscroll-mode @key{RET}}:
1850 1886
1851 Automatically scroll horizontally when the point moves off the 1887 Automatically scroll horizontally when the point moves off the
1852 left or right edge of the window. 1888 left or right edge of the window.
2033 2069
2034 @kbd{M-x hide-ifdef-mode}. (This is a minor mode.) You might also want 2070 @kbd{M-x hide-ifdef-mode}. (This is a minor mode.) You might also want
2035 to investigate @file{cpp.el}, which is distributed with Emacs. 2071 to investigate @file{cpp.el}, which is distributed with Emacs.
2036 2072
2037 @node Repeating commands, Valid X resources, Hiding #ifdef lines, Common requests 2073 @node Repeating commands, Valid X resources, Hiding #ifdef lines, Common requests
2038 @section Is there an equivalent to the @code{.} (dot) command of vi? 2074 @section How do I repeat a command as many times as possible?
2039 @cindex Repeating commands as with @code{vi} 2075 @cindex Repeating commands many times
2040 @cindex Command, repeat last 2076 @cindex Commands, repeating many times
2041 @cindex @code{.}, equivalent to @code{vi} command 2077 @cindex @code{.}, equivalent to @code{vi} command
2042
2043 (@code{.} is the redo command in @code{vi}. It redoes the last
2044 insertion/deletion.)
2045 2078
2046 As of Emacs 20.3, there is indeed a @code{repeat} command (@kbd{C-x z}) 2079 As of Emacs 20.3, there is indeed a @code{repeat} command (@kbd{C-x z})
2047 that repeats the last command. If you preface it with a prefix 2080 that repeats the last command. If you preface it with a prefix
2048 argument, the prefix arg is applied to the command. 2081 argument, the prefix arg is applied to the command.
2049 2082
2052 minibuffer to get arguments. In @code{repeat-complex-command} you can 2085 minibuffer to get arguments. In @code{repeat-complex-command} you can
2053 type @kbd{M-p} and @kbd{M-n} (and also up-arrow and down-arrow, if your 2086 type @kbd{M-p} and @kbd{M-n} (and also up-arrow and down-arrow, if your
2054 keyboard has these keys) to scan through all the different complex 2087 keyboard has these keys) to scan through all the different complex
2055 commands you've typed. 2088 commands you've typed.
2056 2089
2057 To repeat a set of commands, use keyboard macros. (@inforef{Keyboard 2090 To repeat a set of commands, use keyboard macros. Use @kbd{C-x (} and
2058 Macros, Keyboard Macros, emacs}.) 2091 @kbd{C-x )} to make a keyboard macro that invokes the command and then
2059 2092 type @kbd{C-x e}. (@inforef{Keyboard Macros, Keyboard Macros, emacs}.)
2060 If you're really desperate for the @code{.} command, use VIPER, a 2093
2061 @code{vi} emulation mode which comes with Emacs, and which appears to 2094 If you're really desperate for the @code{.} command in @code{vi} that
2062 support it. (@xref{VIPER}.) 2095 redoes the last insertion/deletion, use VIPER, a @code{vi} emulation
2096 mode which comes with Emacs, and which appears to support it.
2097 (@xref{VIPER}.)
2063 2098
2064 @node Valid X resources, Evaluating Emacs Lisp code, Repeating commands, Common requests 2099 @node Valid X resources, Evaluating Emacs Lisp code, Repeating commands, Common requests
2065 @section What are the valid X resource settings (i.e., stuff in .Xdefaults)? 2100 @section What are the valid X resource settings (i.e., stuff in .Xdefaults)?
2066 @cindex Resources, X 2101 @cindex Resources, X
2067 @cindex X resources 2102 @cindex X resources
2156 2191
2157 If you are trying to prefix a yanked mail message with @samp{>}, you 2192 If you are trying to prefix a yanked mail message with @samp{>}, you
2158 might want to set the variable @code{mail-yank-prefix}. In Message 2193 might want to set the variable @code{mail-yank-prefix}. In Message
2159 buffers, you can even use @kbd{M-;} to cite yanked messages (@kbd{M-;} 2194 buffers, you can even use @kbd{M-;} to cite yanked messages (@kbd{M-;}
2160 runs the function @code{comment-region}, it is a general-purpose 2195 runs the function @code{comment-region}, it is a general-purpose
2161 mechanism to comment regions). 2196 mechanism to comment regions) (@pxref{Changing the included text prefix}).
2162 2197
2163 @node Underlining paragraphs, Repeating a command as many times as possible, Inserting text at the beginning of each line, Common requests 2198 @node Underlining paragraphs, Forcing the cursor to remain in the same column, Inserting text at the beginning of each line, Common requests
2164 @section How do I insert @samp{_^H} before each character in a region to get an underlined paragraph? 2199 @section How do I insert @samp{_^H} before each character in a region to get an underlined paragraph?
2165 @cindex Underlining a region of text 2200 @cindex Underlining a region of text
2166 @cindex @code{underline-region} 2201 @cindex @code{underline-region}
2167 2202
2168 Mark the region and then type @kbd{M-x underline-region @key{RET}}. 2203 Mark the region and then type @kbd{M-x underline-region @key{RET}}.
2169 2204
2170 @node Repeating a command as many times as possible, Forcing the cursor to remain in the same column, Underlining paragraphs, Common requests 2205 @node Forcing the cursor to remain in the same column, Forcing Emacs to iconify itself, Underlining paragraphs, Common requests
2171 @section How do I repeat a command as many times as possible?
2172 @cindex Repeating commands many times
2173 @cindex Commands, repeating many times
2174
2175 Use @kbd{C-x (} and @kbd{C-x )} to make a keyboard macro that invokes
2176 the command and then type @kbd{M-0 C-x e}.
2177
2178 Any messages your command prints in the echo area will be suppressed.
2179
2180 If you need to repeat a command a small number of times, you can use
2181 @kbd{C-x z} (@pxref{Repeating commands}) or @kbd{C-x e}.
2182
2183 @node Forcing the cursor to remain in the same column, Forcing Emacs to iconify itself, Repeating a command as many times as possible, Common requests
2184 @section How do I make Emacs behave like this: when I go up or down, the cursor should stay in the same column even if the line is too short? 2206 @section How do I make Emacs behave like this: when I go up or down, the cursor should stay in the same column even if the line is too short?
2185 @cindex @code{picture-mode} 2207 @cindex @code{picture-mode}
2186 @cindex Remaining in the same column, regardless of contents 2208 @cindex Remaining in the same column, regardless of contents
2187 @cindex Vertical movement in empty documents 2209 @cindex Vertical movement in empty documents
2188 2210
2189 @kbd{M-x picture-mode}. 2211 Use @kbd{M-x picture-mode}.
2212
2213 See also the variable @code{track-eol} and the command
2214 @code{set-goal-column} bound to @kbd{C-x C-n}
2215 (@pxref{Moving Point, , , emacs, The GNU Emacs Manual}).
2190 2216
2191 @node Forcing Emacs to iconify itself, Using regular expressions, Forcing the cursor to remain in the same column, Common requests 2217 @node Forcing Emacs to iconify itself, Using regular expressions, Forcing the cursor to remain in the same column, Common requests
2192 @section How do I tell Emacs to iconify itself? 2218 @section How do I tell Emacs to iconify itself?
2193 @cindex Iconification under the X Window System 2219 @cindex Iconification under the X Window System
2194 @cindex X Window System and iconification 2220 @cindex X Window System and iconification
2238 The ``tags'' feature of Emacs includes the command 2264 The ``tags'' feature of Emacs includes the command
2239 @code{tags-query-replace} which performs a query-replace across all the 2265 @code{tags-query-replace} which performs a query-replace across all the
2240 files mentioned in the @file{TAGS} file. @inforef{Tags Search, Tags Search, 2266 files mentioned in the @file{TAGS} file. @inforef{Tags Search, Tags Search,
2241 emacs}. 2267 emacs}.
2242 2268
2243 As of Emacs 19.29, Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x 2269 As of Emacs 19.29, Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x d})
2244 d}) supports the command @code{dired-do-query-replace}, which allows 2270 supports the command @code{dired-do-query-replace} (@kbd{Q}), which allows
2245 users to replace regular expressions in multiple files. 2271 users to replace regular expressions in multiple files.
2246 2272
2247 @node Documentation for etags, Disabling backups, Replacing text across multiple files, Common requests 2273 @node Documentation for etags, Disabling backups, Replacing text across multiple files, Common requests
2248 @section Where is the documentation for @code{etags}? 2274 @section Where is the documentation for @code{etags}?
2249 @cindex Documentation for @code{etags} 2275 @cindex Documentation for @code{etags}
2535 ps-print-region-with-faces}. You will need a way to send text to a 2561 ps-print-region-with-faces}. You will need a way to send text to a
2536 PostScript printer, or a PostScript interpreter such as Ghostscript; 2562 PostScript printer, or a PostScript interpreter such as Ghostscript;
2537 consult the documentation of the variables @code{ps-printer-name}, 2563 consult the documentation of the variables @code{ps-printer-name},
2538 @code{ps-lpr-command}, and @code{ps-lpr-switches} for more details. 2564 @code{ps-lpr-command}, and @code{ps-lpr-switches} for more details.
2539 2565
2540 @node Scrolling only one line, Replacing highlighted text, Turning on syntax highlighting, Common requests 2566 @node Scrolling only one line, Editing MS-DOS files, Turning on syntax highlighting, Common requests
2541 @section How can I force Emacs to scroll only one line when I move past the bottom of the screen? 2567 @section How can I force Emacs to scroll only one line when I move past the bottom of the screen?
2542 @cindex Scrolling only one line 2568 @cindex Scrolling only one line
2543 @cindex Reducing the increment when scrolling 2569 @cindex Reducing the increment when scrolling
2544 2570
2545 Customize the @code{scroll-conservatively} variable with @kbd{M-x 2571 Customize the @code{scroll-conservatively} variable with @kbd{M-x
2551 2577
2552 @lisp 2578 @lisp
2553 (setq scroll-conservatively most-positive-fixnum) 2579 (setq scroll-conservatively most-positive-fixnum)
2554 @end lisp 2580 @end lisp
2555 2581
2556 @node Replacing highlighted text, Editing MS-DOS files, Scrolling only one line, Common requests 2582 @node Editing MS-DOS files, Filling paragraphs with a single space, Scrolling only one line, Common requests
2557 @section How can I replace highlighted text with what I type?
2558 @cindex @code{delete-selection-mode}
2559 @cindex Replacing highlighted text
2560 @cindex Highlighting and replacing text
2561
2562 Use @code{delete-selection-mode}, which you can start automatically by
2563 placing the following Lisp form in your @file{.emacs} file:
2564
2565 @lisp
2566 (delete-selection-mode 1)
2567 @end lisp
2568
2569 According to the documentation string for @code{delete-selection-mode}
2570 (which you can read using @kbd{M-x describe-function @key{RET}
2571 delete-selection-mode @key{RET}}):
2572
2573 @quotation
2574 When ON, typed text replaces the selection if the selection is active.
2575 When OFF, typed text is just inserted at point.
2576 @end quotation
2577
2578 This mode also allows you to delete (not kill) the highlighted region by
2579 pressing @key{DEL}.
2580
2581 @node Editing MS-DOS files, Filling paragraphs with a single space, Replacing highlighted text, Common requests
2582 @section How can I edit MS-DOS files using Emacs? 2583 @section How can I edit MS-DOS files using Emacs?
2583 @cindex Editing MS-DOS files 2584 @cindex Editing MS-DOS files
2584 @cindex MS-DOS files, editing 2585 @cindex MS-DOS files, editing
2585 @cindex Microsoft files, editing 2586 @cindex Microsoft files, editing
2586 @cindex Windows files, editing 2587 @cindex Windows files, editing
2599 (@pxref{Packages that do not come with Emacs}). Among other things, 2600 (@pxref{Packages that do not come with Emacs}). Among other things,
2600 @code{crypt++} transparently modifies MS-DOS files as they are loaded 2601 @code{crypt++} transparently modifies MS-DOS files as they are loaded
2601 and saved, allowing you to ignore the different conventions that Unix 2602 and saved, allowing you to ignore the different conventions that Unix
2602 and MS-DOS have for delineating the end of a line. 2603 and MS-DOS have for delineating the end of a line.
2603 2604
2604 @node Filling paragraphs with a single space, Escape sequences in shell output, Editing MS-DOS files, Common requests 2605 @node Filling paragraphs with a single space, Escape sequences in shell output, Editing MS-DOS files, Common requests
2605 @section How can I tell Emacs to fill paragraphs with a single space after each period? 2606 @section How can I tell Emacs to fill paragraphs with a single space after each period?
2606 @cindex One space following periods 2607 @cindex One space following periods
2607 @cindex Single space following periods 2608 @cindex Single space following periods
2608 @cindex Periods, one space following 2609 @cindex Periods, one space following
2609 2610
2611 2612
2612 @lisp 2613 @lisp
2613 (setq sentence-end-double-space nil) 2614 (setq sentence-end-double-space nil)
2614 @end lisp 2615 @end lisp
2615 2616
2616 @node Escape sequences in shell output, , Filling paragraphs with a single space, Common requests 2617 @node Escape sequences in shell output, , Filling paragraphs with a single space, Common requests
2617 @section Why these strange escape sequences from @code{ls} from the Shell mode? 2618 @section Why these strange escape sequences from @code{ls} from the Shell mode?
2618 @cindex Escape sequences in @code{ls} output 2619 @cindex Escape sequences in @code{ls} output
2619 @cindex @code{ls} in Shell mode 2620 @cindex @code{ls} in Shell mode
2620 2621
2621 This happens because @code{ls} is aliased to @samp{ls --color} in your 2622 This happens because @code{ls} is aliased to @samp{ls --color} in your
3476 from Emacs with @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.el, 3477 from Emacs with @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.el,
3477 the @file{ell} package}. 3478 the @file{ell} package}.
3478 3479
3479 Many authors post their packages to the @uref{news:gnu.emacs.sources, 3480 Many authors post their packages to the @uref{news:gnu.emacs.sources,
3480 Emacs sources newsgroup}. You can search the archives of this 3481 Emacs sources newsgroup}. You can search the archives of this
3481 group with @uref{http://groups.google.com, Google}, for example. 3482 group with @uref{http://groups.google.com/group/gnu.emacs.sources, Google},
3483 or @uref{http://dir.gmane.org/gmane.emacs.sources, Gmane}, for example.
3482 3484
3483 Several packages are stored in 3485 Several packages are stored in
3484 @uref{http://emacswiki.org/elisp/, the Lisp area of the Emacs Wiki}. 3486 @uref{http://emacswiki.org/elisp/, the Lisp area of the Emacs Wiki}.
3485 3487
3486 For a long time, the Emacs Lisp Archive provided a central repository 3488 For a long time, the Emacs Lisp Archive provided a central repository
3487 for Emacs packages. Sadly, it has not been active for some time, 3489 for Emacs packages. Sadly, it has not been active for some time,
3488 although you can still access the old files at 3490 although you can still access the old files at
3489 3491
3490 @uref{ftp://ftp.cis.ohio-state.edu/pub/emacs-lisp/WWW/index.html} 3492 @uref{ftp://ftp.cis.ohio-state.edu/pub/emacs-lisp/WWW/index.html}
3493
3494 Read the file @file{etc/MORE.STUFF} for more information about
3495 external packages.
3491 3496
3492 @node Current GNU distributions, Difference between Emacs and XEmacs, Packages that do not come with Emacs, Finding Emacs and related packages 3497 @node Current GNU distributions, Difference between Emacs and XEmacs, Packages that do not come with Emacs, Finding Emacs and related packages
3493 @section Where can I get other up-to-date GNU stuff? 3498 @section Where can I get other up-to-date GNU stuff?
3494 @cindex Current GNU distributions 3499 @cindex Current GNU distributions
3495 @cindex Sources for current GNU distributions 3500 @cindex Sources for current GNU distributions
3713 @cindex VMS, Emacs for 3718 @cindex VMS, Emacs for
3714 3719
3715 Up-to-date information about GNU software (including Emacs) for VMS is 3720 Up-to-date information about GNU software (including Emacs) for VMS is
3716 available at @uref{http://vms.gnu.org/}. 3721 available at @uref{http://vms.gnu.org/}.
3717 3722
3718 @node Modes for various languages, , Emacs for VMS and DECwindows, Finding Emacs and related packages 3723 @node Modes for various languages, , Emacs for VMS and DECwindows, Finding Emacs and related packages
3719 @section Where can I get modes for Lex, Yacc/Bison, Bourne shell, csh, C@t{++}, Objective-C, Pascal, Java, and Awk? 3724 @section Where can I get modes for Lex, Yacc/Bison, Bourne shell, csh, C@t{++}, Objective-C, Pascal, Java, and Awk?
3720 @cindex Awk, mode for 3725 @cindex Awk, mode for
3721 @cindex @code{awk-mode} 3726 @cindex @code{awk-mode}
3722 @cindex Bison, mode for 3727 @cindex Bison, mode for
3723 @cindex Bourne Shell, mode for 3728 @cindex Bourne Shell, mode for
4780 @c solved? 4785 @c solved?
4781 4786
4782 This will disable the use of the extra keysyms systemwide, which may be 4787 This will disable the use of the extra keysyms systemwide, which may be
4783 undesirable if you actually intend to use them. 4788 undesirable if you actually intend to use them.
4784 4789
4785 @node SPC no longer completes file names, , ExtendChar key does not work as Meta, Key bindings 4790 @node SPC no longer completes file names, , ExtendChar key does not work as Meta, Key bindings
4786 @section Why doesn't SPC complete file names anymore? 4791 @section Why doesn't SPC complete file names anymore?
4787 @cindex @kbd{SPC} file name completion 4792 @cindex @kbd{SPC} file name completion
4788 4793
4789 Starting with Emacs 22.1, @kbd{SPC} no longer completes file names in 4794 Starting with Emacs 22.1, @kbd{SPC} no longer completes file names in
4790 the minibuffer, so that file names with embedded spaces could be typed 4795 the minibuffer, so that file names with embedded spaces could be typed