Mercurial > emacs
comparison man/faq.texi @ 88155:d7ddb3e565de
sync with trunk
author | Henrik Enberg <henrik.enberg@telia.com> |
---|---|
date | Mon, 16 Jan 2006 00:03:54 +0000 |
parents | bb4e71346ae7 |
children |
comparison
equal
deleted
inserted
replaced
88154:8ce476d3ba36 | 88155:d7ddb3e565de |
---|---|
5 @c %**end of header | 5 @c %**end of header |
6 | 6 |
7 @setchapternewpage odd | 7 @setchapternewpage odd |
8 | 8 |
9 @c This is used in many places | 9 @c This is used in many places |
10 @set VER 21.3 | 10 @set VER 22.1 |
11 | 11 |
12 @copying | 12 @copying |
13 Copyright 2001, 2002 Free Software Foundation, Inc. | 13 Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
14 Copyright 1994,1995,1996,1997,1998,1999,2000 Reuven M. Lerner@* | 14 Copyright 1994,1995,1996,1997,1998,1999,2000 Reuven M. Lerner@* |
15 Copyright 1992,1993 Steven Byrnes@* | 15 Copyright 1992,1993 Steven Byrnes@* |
16 Copyright 1990,1991,1992 Joseph Brian Wells@* | 16 Copyright 1990,1991,1992 Joseph Brian Wells@* |
17 | 17 |
18 @quotation | 18 @quotation |
19 This list of frequently asked questions about GNU Emacs with answers | 19 This list of frequently asked questions about GNU Emacs with answers |
20 ("FAQ") may be translated into other languages, transformed into other | 20 (``FAQ'') may be translated into other languages, transformed into other |
21 formats (e.g. Texinfo, Info, WWW, WAIS), and updated with new information. | 21 formats (e.g. Texinfo, Info, WWW, WAIS), and updated with new information. |
22 | 22 |
23 The same conditions apply to any derivative of the FAQ as apply to the FAQ | 23 The same conditions apply to any derivative of the FAQ as apply to the FAQ |
24 itself. Every copy of the FAQ must include this notice or an approved | 24 itself. Every copy of the FAQ must include this notice or an approved |
25 translation, information on who is currently maintaining the FAQ and how to | 25 translation, information on who is currently maintaining the FAQ and how to |
28 | 28 |
29 The FAQ may be copied and redistributed under these conditions, except that | 29 The FAQ may be copied and redistributed under these conditions, except that |
30 the FAQ may not be embedded in a larger literary work unless that work | 30 the FAQ may not be embedded in a larger literary work unless that work |
31 itself allows free copying and redistribution. | 31 itself allows free copying and redistribution. |
32 | 32 |
33 [This version has been somewhat edited from the last-posted version | 33 [This version has been heavily edited since it was included in the Emacs |
34 (as of August 1999) for inclusion in the Emacs distribution.] | 34 distribution.] |
35 @end quotation | 35 @end quotation |
36 @end copying | 36 @end copying |
37 | 37 |
38 @dircategory Emacs | 38 @dircategory Emacs |
39 @direntry | 39 @direntry |
56 This is the GNU Emacs FAQ, last updated on @today{}. | 56 This is the GNU Emacs FAQ, last updated on @today{}. |
57 | 57 |
58 The FAQ is maintained as a Texinfo document, allowing us to create HTML, | 58 The FAQ is maintained as a Texinfo document, allowing us to create HTML, |
59 Info, and TeX documents from a single source file, and is slowly but | 59 Info, and TeX documents from a single source file, and is slowly but |
60 surely being improved. Please bear with us as we improve on this | 60 surely being improved. Please bear with us as we improve on this |
61 format. If you have any suggestions or questions, please contact | 61 format. This FAQ is maintained as a part of GNU Emacs. If you find |
62 @email{emacs-faq@@lerner.co.il, the FAQ maintainers}. | 62 any errors, or have any suggestions, please use @kbd{M-x report-emacs-bug} |
63 to report them. | |
63 | 64 |
64 @menu | 65 @menu |
65 * FAQ notation:: | 66 * FAQ notation:: |
66 * General questions:: | 67 * General questions:: |
67 * Getting help:: | 68 * Getting help:: |
158 | 159 |
159 @noindent | 160 @noindent |
160 Any real spaces in such a key sequence should be ignored; only @key{SPC} | 161 Any real spaces in such a key sequence should be ignored; only @key{SPC} |
161 really means press the space key. | 162 really means press the space key. |
162 | 163 |
163 The ASCII code sent by @kbd{C-x} (except for @kbd{C-?}) is the value | 164 The @acronym{ASCII} code sent by @kbd{C-x} (except for @kbd{C-?}) is the value |
164 that would be sent by pressing just @key{x} minus 96 (or 64 for | 165 that would be sent by pressing just @key{x} minus 96 (or 64 for |
165 upper-case @key{X}) and will be from 0 to 31. On Unix and GNU/Linux | 166 upper-case @key{X}) and will be from 0 to 31. On Unix and GNU/Linux |
166 terminals, the ASCII code sent by @kbd{M-x} is the sum of 128 and the | 167 terminals, the @acronym{ASCII} code sent by @kbd{M-x} is the sum of 128 and the |
167 ASCII code that would be sent by pressing just @key{x}. Essentially, | 168 @acronym{ASCII} code that would be sent by pressing just @key{x}. Essentially, |
168 @key{Control} turns off bits 5 and 6 and @key{Meta} turns on bit | 169 @key{Control} turns off bits 5 and 6 and @key{Meta} turns on bit |
169 7@footnote{ | 170 7@footnote{ |
170 DOS and Windows terminals don't set bit 7 when the @key{Meta} key is | 171 DOS and Windows terminals don't set bit 7 when the @key{Meta} key is |
171 pressed.}. | 172 pressed.}. |
172 | 173 |
173 @kbd{C-?} (aka @key{DEL}) is ASCII code 127. It is a misnomer to call | 174 @kbd{C-?} (aka @key{DEL}) is @acronym{ASCII} code 127. It is a misnomer to call |
174 @kbd{C-?} a ``control'' key, since 127 has both bits 5 and 6 turned ON. | 175 @kbd{C-?} a ``control'' key, since 127 has both bits 5 and 6 turned ON. |
175 Also, on very few keyboards does @kbd{C-?} generate ASCII code 127. | 176 Also, on very few keyboards does @kbd{C-?} generate @acronym{ASCII} code 127. |
176 | 177 |
177 @inforef{Text Characters, Text Characters, emacs}, and @inforef{Keys, | 178 @inforef{Text Characters, Text Characters, emacs}, and @inforef{Keys, |
178 Keys, emacs}, for more information. (@xref{On-line manual}, for more | 179 Keys, emacs}, for more information. (@xref{On-line manual}, for more |
179 information about Info.) | 180 information about Info.) |
180 | 181 |
421 archive is not particularly well organized or easy to retrieve | 422 archive is not particularly well organized or easy to retrieve |
422 individual postings from, but pretty much everything is there. | 423 individual postings from, but pretty much everything is there. |
423 | 424 |
424 The archive is at @uref{ftp://ftp-mailing-list-archives.gnu.org}. | 425 The archive is at @uref{ftp://ftp-mailing-list-archives.gnu.org}. |
425 | 426 |
426 As of this writing, the archives are not yet working. | 427 The archive can be browsed over the web at |
428 @uref{http://mail.gnu.org/archive/html/, the GNU mail archive}. | |
427 | 429 |
428 Web-based Usenet search services, such as | 430 Web-based Usenet search services, such as |
429 @uref{http://www.dejanews.com, DejaNews}, also archive the | 431 @uref{http://groups.google.com, Google}, also archive the |
430 @code{gnu.*} groups. | 432 @code{gnu.*} groups. |
431 | 433 |
432 @node Reporting bugs, Unsubscribing from Emacs lists, Newsgroup archives, General questions | 434 @node Reporting bugs, Unsubscribing from Emacs lists, Newsgroup archives, General questions |
433 @section Where should I report bugs and other problems with Emacs? | 435 @section Where should I report bugs and other problems with Emacs? |
434 @cindex Bug reporting | 436 @cindex Bug reporting |
514 @item World Wide Web | 516 @item World Wide Web |
515 @uref{http://www.gnu.org/} | 517 @uref{http://www.gnu.org/} |
516 | 518 |
517 @item Postal address | 519 @item Postal address |
518 Free Software Foundation@* | 520 Free Software Foundation@* |
519 59 Temple Place - Suite 330@* | 521 51 Franklin Street, Fifth Floor@* |
520 Boston, MA 02111-1307@* | 522 Boston, MA 02110-1301@* |
521 USA@* | 523 USA@* |
522 | 524 |
523 @end table | 525 @end table |
524 | 526 |
525 @cindex Ordering GNU software | 527 @cindex Ordering GNU software |
526 For details on how to order items directly from the FSF, see the | 528 For details on how to order items directly from the FSF, see the |
527 @uref{http://www.gnu.org/order/order.html, GNU Web site}, and also the | 529 @uref{http://www.gnu.org/order/order.html, GNU Web site}. |
528 files @file{etc/ORDERS}, @file{ORDERS.EUROPE}, and @file{ORDERS.JAPAN}. | |
529 | 530 |
530 @c ------------------------------------------------------------ | 531 @c ------------------------------------------------------------ |
531 @node Getting help, Status of Emacs, General questions, Top | 532 @node Getting help, Status of Emacs, General questions, Top |
532 @chapter Getting help | 533 @chapter Getting help |
533 @cindex Getting help | 534 @cindex Getting help |
553 @cindex Beginning editing | 554 @cindex Beginning editing |
554 @cindex Tutorial, invoking the | 555 @cindex Tutorial, invoking the |
555 @cindex Self-paced tutorial, invoking the | 556 @cindex Self-paced tutorial, invoking the |
556 @cindex Help system, entering the | 557 @cindex Help system, entering the |
557 | 558 |
558 Type @kbd{C-h t} to invoke the self-paced tutorial. Just typing @kbd{C-h} | 559 Type @kbd{C-h t} to invoke the self-paced tutorial. Just typing |
559 enters the help system. | 560 @kbd{C-h} enters the help system. Starting with Emacs 22, the tutorial |
561 is available in many foreign languages such as French, German, Japanese, | |
562 Russian, etc. Use @kbd{M-x help-with-tutorial-spec-language @key{RET}} | |
563 to choose your language and start the tutorial. | |
560 | 564 |
561 Your system administrator may have changed @kbd{C-h} to act like | 565 Your system administrator may have changed @kbd{C-h} to act like |
562 @key{DEL} to deal with local keyboards. You can use @kbd{M-x | 566 @key{DEL} to deal with local keyboards. You can use @kbd{M-x |
563 help-for-help} instead to invoke help. To discover what key (if any) | 567 help-for-help} instead to invoke help. To discover what key (if any) |
564 invokes help on your system, type @kbd{M-x where-is @key{RET} | 568 invokes help on your system, type @kbd{M-x where-is @key{RET} |
567 sequence listed. Each of the resulting key sequences invokes help. | 571 sequence listed. Each of the resulting key sequences invokes help. |
568 | 572 |
569 Emacs help works best if it is invoked by a single key whose value | 573 Emacs help works best if it is invoked by a single key whose value |
570 should be stored in the variable @code{help-char}. | 574 should be stored in the variable @code{help-char}. |
571 | 575 |
572 There is also a WWW-based tutorial for Emacs 18, much of which is also | |
573 relevant for later versions of Emacs, available at | |
574 | |
575 @uref{http://kufacts.cc.ukans.edu/cwis/writeups/misc/emacsguide.html} | |
576 | |
577 @node Learning how to do something, Getting a printed manual, Basic editing, Getting help | 576 @node Learning how to do something, Getting a printed manual, Basic editing, Getting help |
578 @section How do I find out how to do something in Emacs? | 577 @section How do I find out how to do something in Emacs? |
579 @cindex Help for Emacs | 578 @cindex Help for Emacs |
580 @cindex Learning to do something in Emacs | 579 @cindex Learning to do something in Emacs |
581 @cindex Reference card for Emacs | 580 @cindex Reference card for Emacs |
586 @itemize @bullet | 585 @itemize @bullet |
587 | 586 |
588 @cindex Reading the Emacs manual | 587 @cindex Reading the Emacs manual |
589 @item | 588 @item |
590 The complete text of the Emacs manual is available on-line via the Info | 589 The complete text of the Emacs manual is available on-line via the Info |
591 hypertext reader. Type @kbd{C-h i} to invoke Info. Typing @key{h} | 590 hypertext reader. Type @kbd{C-h r} to display the manual in Info mode. |
592 immediately after entering Info will provide a short tutorial on how to | 591 Typing @key{h} immediately after entering Info will provide a short |
593 use it. | 592 tutorial on how to use it. |
594 | 593 |
595 @cindex Lookup a subject in a manual | 594 @cindex Lookup a subject in a manual |
596 @cindex Index search in a manual | 595 @cindex Index search in a manual |
597 @item | 596 @item |
598 To quickly locate the section of the manual which discusses a certain | 597 To quickly locate the section of the manual which discusses a certain |
610 (actually which match a regular expression) using @kbd{C-h a} (@kbd{M-x | 609 (actually which match a regular expression) using @kbd{C-h a} (@kbd{M-x |
611 command-apropos}). | 610 command-apropos}). |
612 | 611 |
613 @cindex Command description in the manual | 612 @cindex Command description in the manual |
614 @item | 613 @item |
615 The command @kbd{C-h C-f} (@code{Info-goto-emacs-command-node}) prompts | 614 The command @kbd{C-h F} (@code{Info-goto-emacs-command-node}) prompts |
616 for the name of a command, and then attempts to find the section in the | 615 for the name of a command, and then attempts to find the section in the |
617 Emacs manual where that command is described. | 616 Emacs manual where that command is described. |
618 | 617 |
619 @cindex Finding commands and variables | 618 @cindex Finding commands and variables |
620 @item | 619 @item |
654 @cindex Printed Emacs manual, obtaining | 653 @cindex Printed Emacs manual, obtaining |
655 @cindex Manual, obtaining a printed or HTML copy of | 654 @cindex Manual, obtaining a printed or HTML copy of |
656 @cindex Emacs manual, obtaining a printed or HTML copy of | 655 @cindex Emacs manual, obtaining a printed or HTML copy of |
657 | 656 |
658 You can order a printed copy of the Emacs manual from the FSF. For | 657 You can order a printed copy of the Emacs manual from the FSF. For |
659 details see the @uref{http://www.gnu.org/order/order.html, GNU Web site} | 658 details see the @uref{http://www.gnu.org/order/order.html, GNU Web site}. |
660 and the file @file{etc/ORDERS}. | |
661 | 659 |
662 @c The number 620 below is version-dependent! | 660 @c The number 620 below is version-dependent! |
663 The full Texinfo source for the manual also comes in the @file{man} | 661 The full Texinfo source for the manual also comes in the @file{man} |
664 directory of the Emacs distribution, if you're daring enough to try to | 662 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 | 663 print out this 620-page manual yourself (@pxref{Printing a Texinfo |
666 file}). | 664 file}). |
667 | 665 |
668 If you absolutely have to print your own copy, and you don't have @TeX{}, | 666 If you absolutely have to print your own copy, and you don't have @TeX{}, |
669 you can get a PostScript version from | 667 you can get a PostScript version from |
670 | 668 |
671 @uref{http://www.gnu.org/manual/emacs/ps/emacs.ps.gz} | 669 @uref{http://www.gnu.org/software/emacs/manual/emacs.ps.gz} |
672 | 670 |
673 @cindex HTML version of Emacs manual, obtaining | 671 @cindex HTML version of Emacs manual, obtaining |
674 An HTML version of the manual is at | 672 An HTML version of the manual is at |
675 | 673 |
676 @uref{www.gnu.org/manual/emacs/index.html} | 674 @uref{http://www.gnu.org/software/emacs/manual/emacs.html} |
677 | 675 |
678 @xref{Learning how to do something}, for how to view the manual on-line. | 676 @xref{Learning how to do something}, for how to view the manual on-line. |
679 | 677 |
680 @node Emacs Lisp documentation, Installing Texinfo documentation, Getting a printed manual, Getting help | 678 @node Emacs Lisp documentation, Installing Texinfo documentation, Getting a printed manual, Getting help |
681 @section Where can I get documentation on Emacs Lisp? | 679 @section Where can I get documentation on Emacs Lisp? |
686 @cindex Reference manual for Emacs Lisp | 684 @cindex Reference manual for Emacs Lisp |
687 | 685 |
688 Within Emacs, you can type @kbd{C-h f} to get the documentation for a | 686 Within Emacs, you can type @kbd{C-h f} to get the documentation for a |
689 function, @kbd{C-h v} for a variable. | 687 function, @kbd{C-h v} for a variable. |
690 | 688 |
691 For more information, obtain the Emacs Lisp Reference Manual. Details | 689 For more information, the Emacs Lisp Reference Manual is available |
692 on ordering it from FSF are on the | 690 on-line, in Info format. @xref{Top, Emacs Lisp,, elisp, The |
693 @uref{http://www.gnu.org/order/order.html, GNU Web site} and in the file | 691 Emacs Lisp Reference Manual}. |
694 @file{etc/ORDERS}. | 692 |
695 | 693 You can also order a hardcopy of the manual, details on ordering it from |
696 The Emacs Lisp Reference Manual is also available on-line, in Info | 694 FSF are on the @uref{http://www.gnu.org/order/order.html, GNU Web site}. |
697 format. Texinfo source for the manual (along with pregenerated Info | |
698 files) is available at | |
699 | |
700 @uref{ftp://ftp.gnu.org/pub/gnu/emacs/elisp-manual-21-2.6.tar.gz} | |
701 | |
702 and all mirrors of @samp{ftp.gnu.org} (for a list, @pxref{Current GNU | |
703 distributions}). @xref{Installing Texinfo documentation}, if you want | |
704 to install the Info files, or @ref{Printing a Texinfo file}, if you want | |
705 to use the Texinfo source to print the manual yourself. | |
706 | 695 |
707 An HTML version of the Emacs Lisp Reference Manual is available at | 696 An HTML version of the Emacs Lisp Reference Manual is available at |
708 | 697 |
709 @uref{http://www.gnu.org/manual/elisp-manual-21-2.6/elisp.html} | 698 @uref{http://www.gnu.org/software/emacs/elisp-manual/elisp.html} |
710 | 699 |
711 @node Installing Texinfo documentation, Printing a Texinfo file, Emacs Lisp documentation, Getting help | 700 @node Installing Texinfo documentation, Printing a Texinfo file, Emacs Lisp documentation, Getting help |
712 @section How do I install a piece of Texinfo documentation? | 701 @section How do I install a piece of Texinfo documentation? |
713 @cindex Texinfo documentation, installing | 702 @cindex Texinfo documentation, installing |
714 @cindex Installing Texinfo documentation | 703 @cindex Installing Texinfo documentation |
718 | 707 |
719 First, you must turn the Texinfo files into Info files. You may do this | 708 First, you must turn the Texinfo files into Info files. You may do this |
720 using the stand-alone @file{makeinfo} program, available as part of the latest | 709 using the stand-alone @file{makeinfo} program, available as part of the latest |
721 Texinfo package at | 710 Texinfo package at |
722 | 711 |
723 @uref{ftp://ftp.gnu.org/pub/gnu/texinfo/texinfo-4.0.tar.gz} | 712 @uref{ftp://ftp.gnu.org/pub/gnu/texinfo/texinfo-4.8.tar.gz} |
724 | 713 |
725 and all mirrors of @samp{ftp.gnu.org} (for a list, @pxref{Current GNU | 714 and all mirrors of @samp{ftp.gnu.org} (for a list, @pxref{Current GNU |
726 distributions}). | 715 distributions}). |
727 | 716 |
728 For information about the Texinfo format, read the Texinfo manual which | 717 For information about the Texinfo format, read the Texinfo manual which |
902 where that is). | 891 where that is). |
903 | 892 |
904 @table @file | 893 @table @file |
905 | 894 |
906 @item COPYING | 895 @item COPYING |
907 Emacs General Public License | 896 GNU General Public License |
908 | 897 |
909 @item DISTRIB | 898 @item DISTRIB |
910 Emacs Availability Information, including the popular "Free Software | 899 Emacs Availability Information, including the popular Free Software |
911 Foundation Order Form" | 900 Foundation Order Form |
912 | 901 |
913 @item FTP | 902 @item FTP |
914 How to get GNU Software by Internet FTP or by UUCP | 903 How to get GNU Software by Internet FTP or by UUCP |
915 | 904 |
916 @item GNU | 905 @item GNU |
934 | 923 |
935 @item SERVICE | 924 @item SERVICE |
936 GNU Service Directory | 925 GNU Service Directory |
937 | 926 |
938 @item SUN-SUPPORT | 927 @item SUN-SUPPORT |
939 including "Using Emacstool with GNU Emacs" | 928 including ``Using Emacstool with GNU Emacs'' |
940 | 929 |
941 @end table | 930 @end table |
942 | |
943 Latest versions of the above files also available at | |
944 | |
945 @uref{ftp://ftp.gnu.org/pub/gnu/GNUinfo/} | |
946 | 931 |
947 More GNU information, including back issues of the @cite{GNU's | 932 More GNU information, including back issues of the @cite{GNU's |
948 Bulletin}, are at | 933 Bulletin}, are at |
949 | 934 |
950 @uref{http://www.gnu.org/bulletins/bulletins.html} and | 935 @uref{http://www.gnu.org/bulletins/bulletins.html} and |
979 @itemize @bullet | 964 @itemize @bullet |
980 | 965 |
981 @item | 966 @item |
982 Inside of Emacs itself. You can get it from selecting the @samp{Emacs | 967 Inside of Emacs itself. You can get it from selecting the @samp{Emacs |
983 FAQ} option from the @samp{Help} menu of the Emacs menu bar at the top | 968 FAQ} option from the @samp{Help} menu of the Emacs menu bar at the top |
984 of any Emacs frame, or by typing @kbd{C-h F} (@kbd{M-x view-emacs-FAQ}). | 969 of any Emacs frame, or by typing @kbd{C-h C-f} (@kbd{M-x view-emacs-FAQ}). |
985 | 970 |
986 @item | 971 @item |
987 Via USENET. If you can read news, the FAQ should be available in your | 972 Via USENET. If you can read news, the FAQ should be available in your |
988 news spool, in both the @uref{news:gnu.emacs.help} and | 973 news spool, in both the @uref{news:gnu.emacs.help} and |
989 @uref{news:comp.emacs} newsgroups. Every news reader should allow you | 974 @uref{news:comp.emacs} newsgroups. Every news reader should allow you |
1004 spool, it might (or might not) do some good to complain to your news | 989 spool, it might (or might not) do some good to complain to your news |
1005 administrator, because the most recent FAQ should not expire for a | 990 administrator, because the most recent FAQ should not expire for a |
1006 while. | 991 while. |
1007 | 992 |
1008 @item | 993 @item |
1009 Via HTTP or FTP. You can always fetch the latest FAQ from | |
1010 | |
1011 @uref{http://www.lerner.co.il/emacs/} and | |
1012 | |
1013 @uref{ftp://ftp.lerner.co.il/pub/emacs/} | |
1014 | |
1015 @item | |
1016 In the Emacs distribution. Since Emacs 18.56, the FAQ at the time | 994 In the Emacs distribution. Since Emacs 18.56, the FAQ at the time |
1017 of release has been part of the Emacs distribution as either | 995 of release has been part of the Emacs distribution as either |
1018 @file{etc/FAQ} or @file{man/faq.texi} (@pxref{File-name conventions}). | 996 @file{etc/FAQ} or @file{man/faq.texi} (@pxref{File-name conventions}). |
1019 | |
1020 @item | |
1021 Via the World Wide Web. A hypertext version is available at | |
1022 | |
1023 @uref{http://www.lerner.co.il/emacs/} | |
1024 | 997 |
1025 @item | 998 @item |
1026 Via anonymous ftp and e-mail from @file{rtfm.mit.edu} (and its mirror in | 999 Via anonymous ftp and e-mail from @file{rtfm.mit.edu} (and its mirror in |
1027 Europe), the main repository for FAQs and other items posted to | 1000 Europe), the main repository for FAQs and other items posted to |
1028 news.answers. The Emacs FAQs are available at | 1001 news.answers. The Emacs FAQs are available at |
1044 send usenet/news.answers/GNU-Emacs-FAQ/part4 | 1017 send usenet/news.answers/GNU-Emacs-FAQ/part4 |
1045 send usenet/news.answers/GNU-Emacs-FAQ/part5 | 1018 send usenet/news.answers/GNU-Emacs-FAQ/part5 |
1046 @end example | 1019 @end example |
1047 | 1020 |
1048 For more information, send email to @email{mail-server@@rtfm.mit.edu} | 1021 For more information, send email to @email{mail-server@@rtfm.mit.edu} |
1049 with "help" and "index" in the body on separate lines. | 1022 with @samp{help} and @samp{index} in the body on separate lines. |
1050 | |
1051 @item | |
1052 As the very last resort, you can e-mail a request to | |
1053 @email{emacs-faq@@lerner.co.il}. Don't do this unless you have made a | |
1054 good-faith effort to obtain the FAQ list via one of the methods listed | |
1055 above. | |
1056 | |
1057 @end itemize | 1023 @end itemize |
1058 | 1024 |
1059 @c ------------------------------------------------------------ | 1025 @c ------------------------------------------------------------ |
1060 @node Status of Emacs, Common requests, Getting help, Top | 1026 @node Status of Emacs, Common requests, Getting help, Top |
1061 @chapter Status of Emacs | 1027 @chapter Status of Emacs |
1067 @menu | 1033 @menu |
1068 * Origin of the term Emacs:: | 1034 * Origin of the term Emacs:: |
1069 * Latest version of Emacs:: | 1035 * Latest version of Emacs:: |
1070 * New in Emacs 20:: | 1036 * New in Emacs 20:: |
1071 * New in Emacs 21:: | 1037 * New in Emacs 21:: |
1038 * New in Emacs 22:: | |
1072 @end menu | 1039 @end menu |
1073 | 1040 |
1074 @node Origin of the term Emacs, Latest version of Emacs, Status of Emacs, Status of Emacs | 1041 @node Origin of the term Emacs, Latest version of Emacs, Status of Emacs, Status of Emacs |
1075 @section Where does the name ``Emacs'' come from? | 1042 @section Where does the name ``Emacs'' come from? |
1076 @cindex Origin of the term ``Emacs'' | 1043 @cindex Origin of the term ``Emacs'' |
1109 @node New in Emacs 20, New in Emacs 21, Latest version of Emacs, Status of Emacs | 1076 @node New in Emacs 20, New in Emacs 21, Latest version of Emacs, Status of Emacs |
1110 @section What is different about Emacs 20? | 1077 @section What is different about Emacs 20? |
1111 @cindex Differences between Emacs 19 and Emacs 20 | 1078 @cindex Differences between Emacs 19 and Emacs 20 |
1112 @cindex Emacs 20, new features in | 1079 @cindex Emacs 20, new features in |
1113 | 1080 |
1114 To find out what has changed in recent versions, type @kbd{C-h n} | 1081 To find out what has changed in recent versions, type @kbd{C-h C-n} |
1115 (@kbd{M-x view-emacs-news}). The oldest changes are at the bottom of | 1082 (@kbd{M-x view-emacs-news}). The oldest changes are at the bottom of |
1116 the file, so you might want to read it starting there, rather than at | 1083 the file, so you might want to read it starting there, rather than at |
1117 the top. | 1084 the top. |
1118 | 1085 |
1119 The differences between Emacs versions 18 and 19 was rather dramatic; | 1086 The differences between Emacs versions 18 and 19 was rather dramatic; |
1130 A number of older Lisp packages, such as Gnus, Supercite and the | 1097 A number of older Lisp packages, such as Gnus, Supercite and the |
1131 calendar/diary, have been updated and enhanced to work with Emacs 20, | 1098 calendar/diary, have been updated and enhanced to work with Emacs 20, |
1132 and are now included with the standard distribution. | 1099 and are now included with the standard distribution. |
1133 | 1100 |
1134 | 1101 |
1135 @node New in Emacs 21, , New in Emacs 20, Status of Emacs | 1102 @node New in Emacs 21, New in Emacs 22, New in Emacs 20, Status of Emacs |
1136 @section What is different about Emacs 21? | 1103 @section What is different about Emacs 21? |
1137 @cindex Differences between Emacs 20 and Emacs 21 | 1104 @cindex Differences between Emacs 20 and Emacs 21 |
1138 @cindex Emacs 21, new features in | 1105 @cindex Emacs 21, new features in |
1139 @cindex Recently introduced features | 1106 @cindex Recently introduced features |
1140 | 1107 |
1152 @cindex TTY colors | 1119 @cindex TTY colors |
1153 In addition, Emacs 21 supports faces on text-only terminals. This means | 1120 In addition, Emacs 21 supports faces on text-only terminals. This means |
1154 that you can now have colors when you run Emacs on a GNU/Linux console | 1121 that you can now have colors when you run Emacs on a GNU/Linux console |
1155 and on @code{xterm} with @kbd{emacs -nw}. | 1122 and on @code{xterm} with @kbd{emacs -nw}. |
1156 | 1123 |
1124 @node New in Emacs 22, , New in Emacs 21, Status of Emacs | |
1125 @section What is different about Emacs 22? | |
1126 @cindex Differences between Emacs 21 and Emacs 22 | |
1127 @cindex Emacs 22, new features in | |
1128 @cindex Recently introduced features | |
1129 | |
1130 @c FIXME: Improve this node before the 22.1 release. | |
1131 @cindex Default features | |
1132 Font-lock mode, auto-compression mode, and file name shadow mode are now | |
1133 enabled by default. It is now possible to follow links with | |
1134 @kbd{mouse-1}. | |
1135 | |
1136 @cindex Supported systems | |
1137 Emacs 22 features support for GNU/Linux systems on S390 and X86-64 | |
1138 machines, as well as support for the Mac OS X and Cygwin operating | |
1139 systems. | |
1140 | |
1141 @cindex GTK+ Toolkit | |
1142 @cindex Drag-and-drop | |
1143 @cindex Mouse wheel | |
1144 Emacs can now be built with GTK+ widgets, and supports drag-and-drop | |
1145 operation on X. Mouse wheel support is now enabled by default. | |
1146 | |
1147 @cindex New modes | |
1148 Many new modes and packages have been included in Emacs, such as Leim, | |
1149 Calc, Tramp and URL, as well as IDO, CUA, rcirc, conf-mode, | |
1150 python-mode, table, tumme, SES, ruler, Flymake, Org, etc. | |
1151 | |
1152 @cindex Documentation | |
1153 @cindex Emacs Lisp Manual | |
1154 In addition, Emacs 22 now includes the Emacs Lisp Reference Manual | |
1155 (@pxref{Emacs Lisp documentation}) and the Emacs Lisp Intro. | |
1156 | |
1157 @c ------------------------------------------------------------ | 1157 @c ------------------------------------------------------------ |
1158 @node Common requests, Bugs and problems, Status of Emacs, Top | 1158 @node Common requests, Bugs and problems, Status of Emacs, Top |
1159 @chapter Common requests | 1159 @chapter Common requests |
1160 @cindex Common requests | 1160 @cindex Common requests |
1161 | 1161 |
1162 @menu | 1162 @menu |
1163 * Setting up a customization file:: | 1163 * Setting up a customization file:: |
1164 * Using Customize:: | |
1164 * Debugging a customization file:: | 1165 * Debugging a customization file:: |
1165 * Colors on a TTY:: | 1166 * Colors on a TTY:: |
1166 * Displaying the current line or column:: | 1167 * Displaying the current line or column:: |
1167 * Displaying the current file name in the titlebar:: | 1168 * Displaying the current file name in the titlebar:: |
1168 * Turning on abbrevs by default:: | 1169 * Turning on abbrevs by default:: |
1209 * Editing MS-DOS files:: | 1210 * Editing MS-DOS files:: |
1210 * Filling paragraphs with a single space:: | 1211 * Filling paragraphs with a single space:: |
1211 * Escape sequences in shell output:: | 1212 * Escape sequences in shell output:: |
1212 @end menu | 1213 @end menu |
1213 | 1214 |
1214 @node Setting up a customization file, Colors on a TTY, Common requests, Common requests | 1215 @node Setting up a customization file, Using Customize, Common requests, Common requests |
1215 @section How do I set up a @file{.emacs} file properly? | 1216 @section How do I set up a @file{.emacs} file properly? |
1216 @cindex @file{.emacs} file, setting up | 1217 @cindex @file{.emacs} file, setting up |
1218 @cindex @file{.emacs} file, locating | |
1217 @cindex Init file, setting up | 1219 @cindex Init file, setting up |
1218 @cindex Customization file, setting up | 1220 @cindex Customization file, setting up |
1219 | 1221 |
1220 @inforef{Init File, Init File, emacs} | 1222 @inforef{Init File, Init File, emacs}. |
1221 | 1223 |
1222 In general, new Emacs users should not have @file{.emacs} files, because | 1224 In general, new Emacs users should not have @file{.emacs} files, because |
1223 it causes confusing non-standard behavior. Then they send questions to | 1225 it causes confusing non-standard behavior. Then they send questions to |
1224 @email{help-gnu-emacs@@gnu.org} asking why Emacs isn't behaving as | 1226 @email{help-gnu-emacs@@gnu.org} asking why Emacs isn't behaving as |
1225 documented. | 1227 documented. |
1226 | 1228 |
1227 Beginning with version 20.1, Emacs includes the new Customize | 1229 Beginning with version 20.1, Emacs includes the new Customize facility |
1228 facility, which can be invoked using @kbd{M-x customize @key{RET}}. | 1230 (@pxref{Using Customize}). This allows users who are unfamiliar with |
1229 This allows users who are unfamiliar with Emacs Lisp to modify their | 1231 Emacs Lisp to modify their @file{.emacs} files in a relatively |
1230 @file{.emacs} files in a relatively straightforward way, using menus | 1232 straightforward way, using menus rather than Lisp code. Most packages |
1231 rather than Lisp code. Not all packages support Customize as of this | 1233 support Customize as of this writing. |
1232 writing, but the number is growing fairly steadily. | |
1233 | 1234 |
1234 While Customize might indeed make it easier to configure Emacs, | 1235 While Customize might indeed make it easier to configure Emacs, |
1235 consider taking a bit of time to learn Emacs Lisp and modifying your | 1236 consider taking a bit of time to learn Emacs Lisp and modifying your |
1236 @file{.emacs} directly. Simple configuration options are described | 1237 @file{.emacs} directly. Simple configuration options are described |
1237 rather completely in @inforef{Init File, Init File, emacs}, for users | 1238 rather completely in @inforef{Init File, Init File, emacs}, for users |
1238 interested in performing frequently requested, basic tasks. | 1239 interested in performing frequently requested, basic tasks. |
1239 | 1240 |
1240 @node Colors on a TTY, Debugging a customization file, Setting up a customization file, Common requests | 1241 Sometimes users are unsure as to where their @file{.emacs} file should |
1242 be found. Visiting the file as @file{~/.emacs} from Emacs will find | |
1243 the correct file. | |
1244 | |
1245 @node Using Customize, Colors on a TTY, Setting up a customization file, Common requests | |
1246 @section How do I start using Customize? | |
1247 @cindex Customize groups | |
1248 @cindex Customizing variables | |
1249 @cindex Customizing faces | |
1250 | |
1251 The main Customize entry point is @kbd{M-x customize @key{RET}}. This | |
1252 command takes you to a buffer listing all the available Customize | |
1253 groups. From there, you can access all customizable options and faces, | |
1254 change their values, and save your changes to your init file. | |
1255 @inforef{Easy Customization, Easy Customization, emacs}. | |
1256 | |
1257 If you know the name of the group in advance (e.g. ``shell''), use | |
1258 @kbd{M-x customize-group @key{RET}}. | |
1259 | |
1260 If you wish to customize a single option, use @kbd{M-x customize-option | |
1261 @key{RET}}. This command prompts you for the name of the option to | |
1262 customize, with completion. | |
1263 | |
1264 @node Colors on a TTY, Debugging a customization file, Using Customize, Common requests | |
1241 @section How do I get colors and syntax highlighting on a TTY? | 1265 @section How do I get colors and syntax highlighting on a TTY? |
1242 @cindex Colors on a TTY | 1266 @cindex Colors on a TTY |
1243 @cindex Syntax highlighting on a TTY | 1267 @cindex Syntax highlighting on a TTY |
1244 @cindex Console, colors | 1268 @cindex Console, colors |
1245 | 1269 |
1253 capabilities. | 1277 capabilities. |
1254 | 1278 |
1255 The command @kbd{M-x list-colors-display} pops up a window which | 1279 The command @kbd{M-x list-colors-display} pops up a window which |
1256 exhibits all the colors Emacs knows about on the current display. | 1280 exhibits all the colors Emacs knows about on the current display. |
1257 | 1281 |
1258 Syntax highlighting is usually turned off by default; see @ref{Turning | 1282 Syntax highlighting is on by default since version 22.1. |
1259 on syntax highlighting}, for instructions how to turn it on. | |
1260 | 1283 |
1261 @node Debugging a customization file, Displaying the current line or column, Colors on a TTY, Common requests | 1284 @node Debugging a customization file, Displaying the current line or column, Colors on a TTY, Common requests |
1262 @section How do I debug a @file{.emacs} file? | 1285 @section How do I debug a @file{.emacs} file? |
1263 @cindex Debugging @file{.emacs} file | 1286 @cindex Debugging @file{.emacs} file |
1264 @cindex @file{.emacs} debugging | 1287 @cindex @file{.emacs} debugging |
1324 Abrahamsen}. @xref{Packages that do not come with Emacs}, for | 1347 Abrahamsen}. @xref{Packages that do not come with Emacs}, for |
1325 instructions on how to get it. | 1348 instructions on how to get it. |
1326 | 1349 |
1327 @cindex Set number capability in @code{vi} emulators | 1350 @cindex Set number capability in @code{vi} emulators |
1328 None of the @code{vi} emulation modes provide the ``set number'' | 1351 None of the @code{vi} emulation modes provide the ``set number'' |
1329 capability of @code{vi} (as far as we know). | 1352 capability of @code{vi} (as far as we know). The @samp{setnu} package |
1353 written by @email{kyle@@wonderworks.com, Kyle Jones} provides this | |
1354 feature. So too does @samp{wb-line-number}, written by | |
1355 @email{naoki.y.nakamura@@nifty.com, Naoki Nakamura}. | |
1330 | 1356 |
1331 @node Displaying the current file name in the titlebar, Turning on abbrevs by default, Displaying the current line or column, Common requests | 1357 @node Displaying the current file name in the titlebar, Turning on abbrevs by default, Displaying the current line or column, Common requests |
1332 @section How can I modify the titlebar to contain the current file name? | 1358 @section How can I modify the titlebar to contain the current file name? |
1333 @cindex Titlebar, displaying the current file name in | 1359 @cindex Titlebar, displaying the current file name in |
1334 @cindex File name, displaying in the titlebar | 1360 @cindex File name, displaying in the titlebar |
1371 | 1397 |
1372 (add-hook '@var{mymode}-mode-hook | 1398 (add-hook '@var{mymode}-mode-hook |
1373 (lambda () | 1399 (lambda () |
1374 (setq abbrev-mode t))) | 1400 (setq abbrev-mode t))) |
1375 @end lisp | 1401 @end lisp |
1402 | |
1403 Starting with Emacs 22, the standard abbrevs file is read automatically | |
1404 at startup, so the first of these two forms becomes unnecessary. | |
1376 | 1405 |
1377 @node Turning on auto-fill by default, Associating modes with files, Turning on abbrevs by default, Common requests | 1406 @node Turning on auto-fill by default, Associating modes with files, Turning on abbrevs by default, Common requests |
1378 @section How do I turn on @code{auto-fill-mode} by default? | 1407 @section How do I turn on @code{auto-fill-mode} by default? |
1379 @cindex @code{auto-fill-mode}, activating automatically | 1408 @cindex @code{auto-fill-mode}, activating automatically |
1380 @cindex Filling automatically | 1409 @cindex Filling automatically |
1520 @cindex Replacing, and case sensitivity | 1549 @cindex Replacing, and case sensitivity |
1521 @cindex @code{case-replace} | 1550 @cindex @code{case-replace} |
1522 Similarly, for replacing, the variable @code{case-replace} determines | 1551 Similarly, for replacing, the variable @code{case-replace} determines |
1523 whether replacements preserve case. | 1552 whether replacements preserve case. |
1524 | 1553 |
1554 You can also toggle case sensitivity at will in isearch with @kbd{M-c}. | |
1555 | |
1525 To change the case sensitivity just for one major mode, use the major | 1556 To change the case sensitivity just for one major mode, use the major |
1526 mode's hook. For example: | 1557 mode's hook. For example: |
1527 | 1558 |
1528 @lisp | 1559 @lisp |
1529 (add-hook '@var{foo}-mode-hook | 1560 (add-hook '@var{foo}-mode-hook |
1574 @end lisp | 1605 @end lisp |
1575 | 1606 |
1576 To do this relative to your home directory: | 1607 To do this relative to your home directory: |
1577 | 1608 |
1578 @lisp | 1609 @lisp |
1579 (setq load-path (cons "~/mysubdir/" load-path) | 1610 (setq load-path (cons "~/mysubdir/" load-path)) |
1580 @end lisp | 1611 @end lisp |
1581 | 1612 |
1582 @node Using an already running Emacs process, Compiler error messages, Changing load-path, Common requests | 1613 @node Using an already running Emacs process, Compiler error messages, Changing load-path, Common requests |
1583 @section How do I use an already running Emacs from another window? | 1614 @section How do I use an already running Emacs from another window? |
1584 @cindex @code{emacsclient} | 1615 @cindex @code{emacsclient} |
1607 | 1638 |
1608 @lisp | 1639 @lisp |
1609 (if (@var{some conditions are met}) (server-start)) | 1640 (if (@var{some conditions are met}) (server-start)) |
1610 @end lisp | 1641 @end lisp |
1611 | 1642 |
1612 When this is done, Emacs creates a Unix domain socket. | 1643 When this is done, Emacs creates a Unix domain socket named |
1613 The socket is either named @file{.emacs_server}, in the user's home directory, | 1644 @file{server} in @file{/tmp/emacs@var{userid}}. See |
1614 or @file{esrv-@var{userid}-@var{systemname}}, in the @file{/tmp} | 1645 @code{server-socket-dir}. |
1615 directory, depending on your system. See @code{server-socket-name}. | |
1616 | 1646 |
1617 To get your news reader, mail reader, etc., to invoke | 1647 To get your news reader, mail reader, etc., to invoke |
1618 @samp{emacsclient}, try setting the environment variable @code{EDITOR} | 1648 @samp{emacsclient}, try setting the environment variable @code{EDITOR} |
1619 (or sometimes @code{VISUAL}) to the value @samp{emacsclient}. You may | 1649 (or sometimes @code{VISUAL}) to the value @samp{emacsclient}. You may |
1620 have to specify the full pathname of the @samp{emacsclient} program | 1650 have to specify the full pathname of the @samp{emacsclient} program |
1632 @end example | 1662 @end example |
1633 | 1663 |
1634 @item | 1664 @item |
1635 Normal use: | 1665 Normal use: |
1636 | 1666 |
1637 When @samp{emacsclient} is run, it connects to the @file{.emacs_server} | 1667 When @samp{emacsclient} is run, it connects to the socket and passes its |
1638 socket and passes its command line options to @samp{server}. When | 1668 command line options to Emacs, which at the next opportunity will visit |
1639 @samp{server} receives these requests, it sends this information to the | 1669 the files specified. (Line numbers can be specified just like with |
1640 the Emacs process, which at the next opportunity will visit the files | 1670 Emacs.) The user will have to switch to the Emacs window by hand. When |
1641 specified. (Line numbers can be specified just like with Emacs.) The | 1671 the user is done editing a file, the user can type @kbd{C-x #} (or |
1642 user will have to switch to the Emacs window by hand. When the user is | 1672 @kbd{M-x server-edit}) to indicate this. If there is another buffer |
1643 done editing a file, the user can type @kbd{C-x #} (or @kbd{M-x | 1673 requested by @code{emacsclient}, Emacs will switch to it; otherwise |
1644 server-edit}) to indicate this. If there is another buffer requested by | |
1645 @code{emacsclient}, Emacs will switch to it; otherwise | |
1646 @code{emacsclient} will exit, signaling the calling program to continue. | 1674 @code{emacsclient} will exit, signaling the calling program to continue. |
1647 | 1675 |
1648 @samp{emacsclient} and @samp{server} must be running on machines which | |
1649 share the same filesystem for this to work. The pathnames that | |
1650 @samp{emacsclient} specifies should be correct for the filesystem that | |
1651 the Emacs process sees. The Emacs process should not be suspended at | |
1652 the time @samp{emacsclient} is invoked. On Unix and GNU/Linux systems, | |
1653 @samp{emacsclient} should either be invoked from another X window, or | |
1654 from a shell window inside Emacs itself, or from another interactive | |
1655 session, e.g., by means of a @code{screen} program. | |
1656 | |
1657 @cindex @code{gnuserv} | 1676 @cindex @code{gnuserv} |
1658 There is an enhanced version of @samp{emacsclient}/server called | 1677 There is an enhanced version of @samp{emacsclient} called |
1659 @samp{gnuserv}, written by @email{ange@@hplb.hpl.hp.com, Andy Norman} | 1678 @samp{gnuserv}, written by @email{ange@@hplb.hpl.hp.com, Andy Norman} |
1660 which is available in the Emacs Lisp Archive (@pxref{Packages that do | 1679 (@pxref{Packages that do not come with Emacs}). @samp{gnuserv} uses |
1661 not come with Emacs}). @samp{gnuserv} uses Internet domain sockets, so | 1680 Internet domain sockets, so it can work across most network connections. |
1662 it can work across most network connections. It also supports the | 1681 |
1663 execution of arbitrary Emacs Lisp forms and does not require the client | 1682 The most recent @samp{gnuserv} package is available at |
1664 program to wait for completion. | 1683 |
1665 | 1684 @uref{http://meltin.net/hacks/emacs/} |
1666 The alpha version of an enhanced @samp{gnuserv} is available at | |
1667 | |
1668 @uref{ftp://ftp.wellfleet.com/netman/psmith/emacs/gnuserv-2.1alpha.tar.gz} | |
1669 | 1685 |
1670 @end itemize | 1686 @end itemize |
1671 | 1687 |
1672 @node Compiler error messages, Indenting switch statements, Using an already running Emacs process, Common requests | 1688 @node Compiler error messages, Indenting switch statements, Using an already running Emacs process, Common requests |
1673 @section How do I make Emacs recognize my compiler's funny error messages? | 1689 @section How do I make Emacs recognize my compiler's funny error messages? |
1674 @cindex Compiler error messages, recognizing | 1690 @cindex Compiler error messages, recognizing |
1675 @cindex Recognizing non-standard compiler errors | 1691 @cindex Recognizing non-standard compiler errors |
1676 @cindex Regexps for recognizing compiler errors | 1692 @cindex Regexps for recognizing compiler errors |
1677 @cindex Errors, recognizing compiler | 1693 @cindex Errors, recognizing compiler |
1678 | 1694 |
1679 The variable @code{compilation-error-regexp-alist} helps control how | 1695 Customize the @code{compilation-error-regexp-alist} variable. |
1680 Emacs parses your compiler output. It is a list of triplets of the form: | |
1681 @code{(@var{regexp} @var{file-idx} @var{line-idx})}, where @var{regexp}, | |
1682 @var{file-idx} and @var{line-idx} are strings. To help determine what | |
1683 the constituent elements should be, load @file{compile.el} and then type | |
1684 @kbd{C-h v compilation-error-regexp-alist @key{RET}} to see the current | |
1685 value. A good idea is to look at @file{compile.el} itself as the | |
1686 comments included for this variable are quite useful---the regular | |
1687 expressions required for your compiler's output may be very close to one | |
1688 already provided. Once you have determined the proper regexps, use the | |
1689 following to inform Emacs of your changes: | |
1690 | |
1691 @lisp | |
1692 (setq compilation-error-regexp-alist | |
1693 (cons '(@var{regexp} @var{file-idx} @var{line-idx}) | |
1694 compilation-error-regexp-alist)) | |
1695 @end lisp | |
1696 | 1696 |
1697 @node Indenting switch statements, Customizing C and C++ indentation, Compiler error messages, Common requests | 1697 @node Indenting switch statements, Customizing C and C++ indentation, Compiler error messages, Common requests |
1698 @section How do I change the indentation for @code{switch}? | 1698 @section How do I change the indentation for @code{switch}? |
1699 @cindex @code{switch}, indenting | 1699 @cindex @code{switch}, indenting |
1700 @cindex Indenting of @code{switch} | 1700 @cindex Indenting of @code{switch} |
1720 The solution at first appears to be: set @code{c-indent-level} to 4 and | 1720 The solution at first appears to be: set @code{c-indent-level} to 4 and |
1721 @code{c-label-offset} to -2. However, this will give you an indentation | 1721 @code{c-label-offset} to -2. However, this will give you an indentation |
1722 spacing of four instead of two. | 1722 spacing of four instead of two. |
1723 | 1723 |
1724 The @emph{real} solution is to use @code{cc-mode} (the default mode for | 1724 The @emph{real} solution is to use @code{cc-mode} (the default mode for |
1725 C programming in Emacs 20 and later) and add the following line to yoyr | 1725 C programming in Emacs 20 and later) and add the following line to your |
1726 @file{.emacs}: | 1726 @file{.emacs}: |
1727 | 1727 |
1728 @lisp | 1728 @lisp |
1729 (c-set-offset 'case-label '+) | 1729 (c-set-offset 'case-label '+) |
1730 @end lisp | 1730 @end lisp |
1853 @item | 1853 @item |
1854 @code{hscroll-step-percent} controls how far to jump once we decide to do so. | 1854 @code{hscroll-step-percent} controls how far to jump once we decide to do so. |
1855 @end itemize | 1855 @end itemize |
1856 | 1856 |
1857 @node Overwrite mode, Turning off beeping, Horizontal scrolling, Common requests | 1857 @node Overwrite mode, Turning off beeping, Horizontal scrolling, Common requests |
1858 @section How do I make Emacs "typeover" or "overwrite" instead of inserting? | 1858 @section How do I make Emacs ``typeover'' or ``overwrite'' instead of inserting? |
1859 @cindex @key{Insert} | 1859 @cindex @key{Insert} |
1860 @cindex @code{overwrite-mode} | 1860 @cindex @code{overwrite-mode} |
1861 @cindex Overwriting existing text | 1861 @cindex Overwriting existing text |
1862 @cindex Toggling @code{overwrite-mode} | 1862 @cindex Toggling @code{overwrite-mode} |
1863 | 1863 |
1945 new lines, and @kbd{M-q} (@code{fill-paragraph}) will maintain any fill | 1945 new lines, and @kbd{M-q} (@code{fill-paragraph}) will maintain any fill |
1946 prefix when refilling the paragraph. | 1946 prefix when refilling the paragraph. |
1947 | 1947 |
1948 If you have paragraphs with different levels of indentation, you will | 1948 If you have paragraphs with different levels of indentation, you will |
1949 have to set the fill prefix to the correct value each time you move to a | 1949 have to set the fill prefix to the correct value each time you move to a |
1950 new paragraph. To avoid this hassle, try one of the many packages | 1950 new paragraph. There are many packages available to deal with this |
1951 available from the Emacs Lisp Archive (@pxref{Packages that do not come | 1951 (@pxref{Packages that do not come with Emacs}). Look for ``fill'' and |
1952 with Emacs}.) Look up ``fill'' and ``indent'' in the Lisp Code | 1952 ``indent'' keywords for guidance. |
1953 Directory for guidance. | |
1954 | 1953 |
1955 @node Matching parentheses, Hiding #ifdef lines, Automatic indentation, Common requests | 1954 @node Matching parentheses, Hiding #ifdef lines, Automatic indentation, Common requests |
1956 @section How do I show which parenthesis matches the one I'm looking at? | 1955 @section How do I show which parenthesis matches the one I'm looking at? |
1957 @cindex Parentheses, matching | 1956 @cindex Parentheses, matching |
1958 @cindex @file{paren.el} | 1957 @cindex @file{paren.el} |
1959 @cindex Highlighting matching parentheses | 1958 @cindex Highlighting matching parentheses |
1960 @cindex Pairs of parentheses, highlighting | 1959 @cindex Pairs of parentheses, highlighting |
1961 @cindex Matching parentheses | 1960 @cindex Matching parentheses |
1962 | 1961 |
1963 As of version 19, Emacs comes with @file{paren.el}, which (when loaded) | 1962 Call @code{show-paren-mode} in your @file{.emacs} file: |
1964 will automatically highlight matching parentheses whenever point (i.e., | |
1965 the cursor) is located over one. To load @file{paren.el} automatically, | |
1966 include the line | |
1967 | |
1968 @lisp | |
1969 (require 'paren) | |
1970 @end lisp | |
1971 | |
1972 in your @file{.emacs} file. @email{shutkoa@@ugsolutions.com, Alan Shutko} | |
1973 reports that as of version 20.1, you must also call @code{show-paren-mode} in | |
1974 your @file{.emacs} file: | |
1975 | 1963 |
1976 @lisp | 1964 @lisp |
1977 (show-paren-mode 1) | 1965 (show-paren-mode 1) |
1978 @end lisp | 1966 @end lisp |
1979 | 1967 |
1980 Customize will let you turn on @code{show-paren-mode}. Use @kbd{M-x | 1968 You can also enable this mode by selecting the @samp{Paren Match |
1981 customize-group @key{RET} paren-showing @key{RET}}. From within | 1969 Highlighting} option from the @samp{Options} menu of the Emacs menu bar |
1982 Customize, you can also go directly to the ``paren-showing'' group. | 1970 at the top of any Emacs frame. |
1983 | 1971 |
1984 Alternatives to paren include: | 1972 Alternatives to this mode include: |
1985 | 1973 |
1986 @itemize @bullet | 1974 @itemize @bullet |
1987 | 1975 |
1988 @item | 1976 @item |
1989 If you're looking at a right parenthesis (or brace or bracket) you can | 1977 If you're looking at a right parenthesis (or brace or bracket) you can |
2023 @cindex @code{hide-ifdef-mode} | 2011 @cindex @code{hide-ifdef-mode} |
2024 @cindex Hiding @code{#ifdef} text | 2012 @cindex Hiding @code{#ifdef} text |
2025 @cindex Selectively displaying @code{#ifdef} code | 2013 @cindex Selectively displaying @code{#ifdef} code |
2026 | 2014 |
2027 @kbd{M-x hide-ifdef-mode}. (This is a minor mode.) You might also want | 2015 @kbd{M-x hide-ifdef-mode}. (This is a minor mode.) You might also want |
2028 to try @file{cpp.el}, available at the Emacs Lisp Archive | 2016 to investigate @file{cpp.el}, which is distributed with Emacs. |
2029 (@pxref{Packages that do not come with Emacs}). | |
2030 | 2017 |
2031 @node Repeating commands, Valid X resources, Hiding #ifdef lines, Common requests | 2018 @node Repeating commands, Valid X resources, Hiding #ifdef lines, Common requests |
2032 @section Is there an equivalent to the @code{.} (dot) command of vi? | 2019 @section Is there an equivalent to the @code{.} (dot) command of vi? |
2033 @cindex Repeating commands as with @code{vi} | 2020 @cindex Repeating commands as with @code{vi} |
2034 @cindex Command, repeat last | 2021 @cindex Command, repeat last |
2059 @section What are the valid X resource settings (i.e., stuff in .Xdefaults)? | 2046 @section What are the valid X resource settings (i.e., stuff in .Xdefaults)? |
2060 @cindex Resources, X | 2047 @cindex Resources, X |
2061 @cindex X resources | 2048 @cindex X resources |
2062 @cindex Setting X resources | 2049 @cindex Setting X resources |
2063 | 2050 |
2064 @inforef{Resources X, Resources X, emacs}. | 2051 @inforef{X Resources, X Resources, emacs}. |
2065 | 2052 |
2066 You can also use a resource editor, such as editres (for X11R5 and | 2053 You can also use a resource editor, such as editres (for X11R5 and |
2067 onwards), to look at the resource names for the menu bar, assuming Emacs | 2054 onwards), to look at the resource names for the menu bar, assuming Emacs |
2068 was compiled with the X toolkit. | 2055 was compiled with the X toolkit. |
2069 | 2056 |
2070 @node Evaluating Emacs Lisp code, Changing the length of a Tab, Valid X resources, Common requests | 2057 @node Evaluating Emacs Lisp code, Changing the length of a Tab, Valid X resources, Common requests |
2071 @section How do I execute ("evaluate") a piece of Emacs Lisp code? | 2058 @section How do I execute (``evaluate'') a piece of Emacs Lisp code? |
2072 @cindex Evaluating Lisp code | 2059 @cindex Evaluating Lisp code |
2073 @cindex Lisp forms, evaluating | 2060 @cindex Lisp forms, evaluating |
2074 | 2061 |
2075 There are a number of ways to execute (@dfn{evaluate}, in Lisp lingo) an | 2062 There are a number of ways to execute (@dfn{evaluate}, in Lisp lingo) an |
2076 Emacs Lisp @dfn{form}: | 2063 Emacs Lisp @dfn{form}: |
2153 citation for yanked mail and news messages; it is included in Emacs | 2140 citation for yanked mail and news messages; it is included in Emacs |
2154 since version 19.20. @xref{Changing the included text prefix}, for | 2141 since version 19.20. @xref{Changing the included text prefix}, for |
2155 additional information. | 2142 additional information. |
2156 | 2143 |
2157 @node Underlining paragraphs, Repeating a command as many times as possible, Inserting > at the beginning of each line, Common requests | 2144 @node Underlining paragraphs, Repeating a command as many times as possible, Inserting > at the beginning of each line, Common requests |
2158 @section How do I insert "_^H" before each character in a region to get an underlined paragraph? | 2145 @section How do I insert @samp{_^H} before each character in a region to get an underlined paragraph? |
2159 @cindex Underlining a region of text | 2146 @cindex Underlining a region of text |
2160 @cindex @code{underline-region} | 2147 @cindex @code{underline-region} |
2161 | 2148 |
2162 Mark the region and then type @kbd{M-x underline-region @key{RET}}. | 2149 Mark the region and then type @kbd{M-x underline-region @key{RET}}. |
2163 | 2150 |
2170 the command and then type @kbd{M-0 C-x e}. | 2157 the command and then type @kbd{M-0 C-x e}. |
2171 | 2158 |
2172 Any messages your command prints in the echo area will be suppressed. | 2159 Any messages your command prints in the echo area will be suppressed. |
2173 | 2160 |
2174 If you need to repeat a command a small number of times, you can use | 2161 If you need to repeat a command a small number of times, you can use |
2175 @kbd{C-x z}, see @ref{Repeating commands}. | 2162 @kbd{C-x z} (@pxref{Repeating commands}) or @kbd{C-x e}. |
2176 | 2163 |
2177 @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 | 2164 @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 |
2178 @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? | 2165 @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? |
2179 @cindex @code{picture-mode} | 2166 @cindex @code{picture-mode} |
2180 @cindex Remaining in the same column, regardless of contents | 2167 @cindex Remaining in the same column, regardless of contents |
2187 @cindex Iconification under the X Window System | 2174 @cindex Iconification under the X Window System |
2188 @cindex X Window System and iconification | 2175 @cindex X Window System and iconification |
2189 @cindex Suspending Emacs | 2176 @cindex Suspending Emacs |
2190 | 2177 |
2191 @kbd{C-z} iconifies Emacs when running under X and suspends Emacs | 2178 @kbd{C-z} iconifies Emacs when running under X and suspends Emacs |
2192 otherwise. @inforef{Misc X, Misc X, emacs}. | 2179 otherwise. @inforef{Frame Commands, Frame Commands, emacs}. |
2193 | 2180 |
2194 @node Using regular expressions, Replacing text across multiple files, Forcing Emacs to iconify itself, Common requests | 2181 @node Using regular expressions, Replacing text across multiple files, Forcing Emacs to iconify itself, Common requests |
2195 @section How do I use regexps (regular expressions) in Emacs? | 2182 @section How do I use regexps (regular expressions) in Emacs? |
2196 @cindex Regexps | 2183 @cindex Regexps |
2197 @cindex Regular expressions | 2184 @cindex Regular expressions |
2198 @cindex Differences between Unix and Emacs regexps | 2185 @cindex Differences between Unix and Emacs regexps |
2199 @cindex Unix regeps, differences from Emacs | 2186 @cindex Unix regeps, differences from Emacs |
2200 @cindex Text strings, putting regexps in | 2187 @cindex Text strings, putting regexps in |
2201 | 2188 |
2202 @inforef{Regexps, Regexps, emacs}. | 2189 @inforef{Regexp Backslash, Regexp Backslash, emacs}. |
2203 | 2190 |
2204 The @code{or} operator is @samp{\|}, not @samp{|}, and the grouping operators | 2191 The @code{or} operator is @samp{\|}, not @samp{|}, and the grouping operators |
2205 are @samp{\(} and @samp{\)}. Also, the string syntax for a backslash is | 2192 are @samp{\(} and @samp{\)}. Also, the string syntax for a backslash is |
2206 @samp{\\}. To specify a regular expression like @samp{xxx\(foo\|bar\)} | 2193 @samp{\\}. To specify a regular expression like @samp{xxx\(foo\|bar\)} |
2207 in a Lisp string, use @samp{xxx\\(foo\\|bar\\)}. | 2194 in a Lisp string, use @samp{xxx\\(foo\\|bar\\)}. |
2255 @cindex Disabling backups | 2242 @cindex Disabling backups |
2256 | 2243 |
2257 You probably don't want to do this, since backups are useful, especially | 2244 You probably don't want to do this, since backups are useful, especially |
2258 when something goes wrong. | 2245 when something goes wrong. |
2259 | 2246 |
2260 To avoid seeing backup files (and other "uninteresting" files) in Dired, | 2247 To avoid seeing backup files (and other ``uninteresting'' files) in Dired, |
2261 load @code{dired-x} by adding the following to your @file{.emacs} file: | 2248 load @code{dired-x} by adding the following to your @file{.emacs} file: |
2262 | 2249 |
2263 @lisp | 2250 @lisp |
2264 (add-hook 'dired-load-hook | 2251 (add-hook 'dired-load-hook |
2265 (lambda () | 2252 (lambda () |
2304 @code{auto-save-interval}, which specifies how many keystrokes Emacs | 2291 @code{auto-save-interval}, which specifies how many keystrokes Emacs |
2305 waits before auto-saving. Increasing this value forces Emacs to wait | 2292 waits before auto-saving. Increasing this value forces Emacs to wait |
2306 longer between auto-saves, which might annoy you less. | 2293 longer between auto-saves, which might annoy you less. |
2307 | 2294 |
2308 You might also want to look into Sebastian Kremer's @code{auto-save} | 2295 You might also want to look into Sebastian Kremer's @code{auto-save} |
2309 package, available from the Lisp Code Archive (@pxref{Packages that do not come | 2296 package (@pxref{Packages that do not come with Emacs}). This |
2310 with Emacs}). This | |
2311 package also allows you to place all auto-save files in one directory, | 2297 package also allows you to place all auto-save files in one directory, |
2312 such as @file{/tmp}. | 2298 such as @file{/tmp}. |
2313 | 2299 |
2314 To disable or change how @code{auto-save-mode} works, @inforef{Auto | 2300 To disable or change how @code{auto-save-mode} works, @inforef{Auto |
2315 Save, , emacs}. | 2301 Save, , emacs}. |
2326 @kbd{M-x compile} and @kbd{M-x recompile} commands is a much more | 2312 @kbd{M-x compile} and @kbd{M-x recompile} commands is a much more |
2327 effective way of doing that. Emacs automatically intercepts the compile | 2313 effective way of doing that. Emacs automatically intercepts the compile |
2328 error messages, inserts them into a special buffer called | 2314 error messages, inserts them into a special buffer called |
2329 @code{*compilation*}, and lets you visit the locus of each message in | 2315 @code{*compilation*}, and lets you visit the locus of each message in |
2330 the source. Type @kbd{C-x `} to step through the offending lines one by | 2316 the source. Type @kbd{C-x `} to step through the offending lines one by |
2331 one. Click @kbd{Mouse-2} or press @key{RET} on a message text in the | 2317 one (starting with Emacs 22, you can also use @kbd{M-g M-p} and |
2318 @kbd{M-g M-n} to go to the previous and next matches directly). Click | |
2319 @kbd{Mouse-2} or press @key{RET} on a message text in the | |
2332 @code{*compilation*} buffer to go to the line whose number is mentioned | 2320 @code{*compilation*} buffer to go to the line whose number is mentioned |
2333 in that message. | 2321 in that message. |
2334 | 2322 |
2335 But if you indeed need to go to a certain text line, type @kbd{M-x | 2323 But if you indeed need to go to a certain text line, type @kbd{M-g M-g} |
2336 goto-line @key{RET}}. Emacs will prompt you for the number of the line | 2324 (which is the default binding of the @code{goto-line} function starting |
2337 and go to that line. | 2325 with Emacs 22). Emacs will prompt you for the number of the line and go |
2326 to that line. | |
2338 | 2327 |
2339 You can do this faster by invoking @code{goto-line} with a numeric | 2328 You can do this faster by invoking @code{goto-line} with a numeric |
2340 argument that is the line's number. For example, @kbd{C-u 286 M-x | 2329 argument that is the line's number. For example, @kbd{C-u 286 M-g M-g} |
2341 goto-line @key{RET}} will jump to line number 286 in the current | 2330 will jump to line number 286 in the current buffer. |
2342 buffer. | |
2343 | |
2344 If you need to use this command frequently, you might consider binding | |
2345 it to a key. The following snippet, if added to your @file{~/.emacs} | |
2346 file, will bind the sequence @kbd{C-x g} to @code{goto-line}: | |
2347 | |
2348 @lisp | |
2349 (global-set-key "\C-xg" 'goto-line) | |
2350 @end lisp | |
2351 | |
2352 | 2331 |
2353 @node Modifying pull-down menus, Deleting menus and menu options, Going to a line by number, Common requests | 2332 @node Modifying pull-down menus, Deleting menus and menu options, Going to a line by number, Common requests |
2354 @section How can I create or modify new pull-down menu options? | 2333 @section How can I create or modify new pull-down menu options? |
2355 @cindex Pull-down menus, creating or modifying | 2334 @cindex Pull-down menus, creating or modifying |
2356 @cindex Menus, creating or modifying | 2335 @cindex Menus, creating or modifying |
2359 @cindex Menus and keymaps | 2338 @cindex Menus and keymaps |
2360 @cindex Keymaps and menus | 2339 @cindex Keymaps and menus |
2361 | 2340 |
2362 Each menu title (e.g., @samp{File}, @samp{Edit}, @samp{Buffers}) | 2341 Each menu title (e.g., @samp{File}, @samp{Edit}, @samp{Buffers}) |
2363 represents a local or global keymap. Selecting a menu title with the | 2342 represents a local or global keymap. Selecting a menu title with the |
2364 mouse displays that keymap's non-nil contents in the form of a menu. | 2343 mouse displays that keymap's non-@code{nil} contents in the form of a menu. |
2365 | 2344 |
2366 So to add a menu option to an existing menu, all you have to do is add a | 2345 So to add a menu option to an existing menu, all you have to do is add a |
2367 new definition to the appropriate keymap. Adding a @samp{Forward Word} | 2346 new definition to the appropriate keymap. Adding a @samp{Forward Word} |
2368 item to the @samp{Edit} menu thus requires the following Lisp code: | 2347 item to the @samp{Edit} menu thus requires the following Lisp code: |
2369 | 2348 |
2468 @cindex Highlighting based on syntax | 2447 @cindex Highlighting based on syntax |
2469 @cindex Colorizing text | 2448 @cindex Colorizing text |
2470 @cindex FAQ, @code{font-lock-mode} | 2449 @cindex FAQ, @code{font-lock-mode} |
2471 | 2450 |
2472 @code{font-lock-mode} is the standard way to have Emacs perform syntax | 2451 @code{font-lock-mode} is the standard way to have Emacs perform syntax |
2473 highlighting in the current buffer. With @code{font-lock-mode} turned | 2452 highlighting in the current buffer. It is enabled by default in Emacs |
2474 on, different types of text will appear in different colors. For | 2453 22.1 and later. |
2475 instance, if you turn on @code{font-lock-mode} in a programming mode, | 2454 |
2455 With @code{font-lock-mode} turned on, different types of text will | |
2456 appear in different colors. For instance, in a programming mode, | |
2476 variables will appear in one face, keywords in a second, and comments in | 2457 variables will appear in one face, keywords in a second, and comments in |
2477 a third. | 2458 a third. |
2478 | 2459 |
2479 @cindex hilit19 is deprecated | 2460 @cindex hilit19 is deprecated |
2480 Earlier versions of Emacs supported hilit19, a similar package. Use of | 2461 Earlier versions of Emacs supported hilit19, a similar package. Use of |
2481 hilit19 is now considered non-standard, although @file{hilit19.el} comes | 2462 hilit19 is now considered non-standard, although @file{hilit19.el} comes |
2482 with the stock Emacs distribution. It is no longer maintained. | 2463 with the stock Emacs distribution. It is no longer maintained. |
2483 | 2464 |
2484 To turn @code{font-lock-mode} on within an existing buffer, use @kbd{M-x | 2465 To turn @code{font-lock-mode} off within an existing buffer, use |
2485 font-lock-mode @key{RET}}. | 2466 @kbd{M-x font-lock-mode @key{RET}}. |
2486 | 2467 |
2487 To automatically invoke @code{font-lock-mode} when a particular major | 2468 In Emacs 21 and earlier versions, you could use the following code in |
2488 mode is invoked, set the major mode's hook. For example, to fontify all | 2469 your @file{.emacs} file to turn on @code{font-lock-mode} globally: |
2489 @code{c-mode} buffers, add the following to your @file{.emacs} file: | |
2490 | |
2491 @lisp | |
2492 (add-hook 'c-mode-hook 'turn-on-font-lock) | |
2493 @end lisp | |
2494 | |
2495 To automatically invoke @code{font-lock-mode} for all major modes, you | |
2496 can turn on @code{global-font-lock-mode} by including the following line | |
2497 in your @file{.emacs} file: | |
2498 | 2470 |
2499 @lisp | 2471 @lisp |
2500 (global-font-lock-mode 1) | 2472 (global-font-lock-mode 1) |
2501 @end lisp | 2473 @end lisp |
2502 | |
2503 @noindent | |
2504 This instructs Emacs to turn on font-lock mode in those buffers for | |
2505 which a font-lock mode definition has been provided (in the variable | |
2506 @code{font-lock-global-modes}). If you edit a file in | |
2507 @code{pie-ala-mode}, and no font-lock definitions have been provided for | |
2508 @code{pie-ala} files, then the above setting will have no effect on that | |
2509 particular buffer. | |
2510 | 2474 |
2511 Highlighting a buffer with @code{font-lock-mode} can take quite a while, | 2475 Highlighting a buffer with @code{font-lock-mode} can take quite a while, |
2512 and cause an annoying delay in display, so several features exist to | 2476 and cause an annoying delay in display, so several features exist to |
2513 work around this. | 2477 work around this. |
2514 | 2478 |
2541 different modes are highlighted in a different ways; for more | 2505 different modes are highlighted in a different ways; for more |
2542 information, see the documentation for | 2506 information, see the documentation for |
2543 @code{font-lock-maximum-decoration} with @kbd{C-h v} (or @kbd{M-x | 2507 @code{font-lock-maximum-decoration} with @kbd{C-h v} (or @kbd{M-x |
2544 describe-variable @key{RET}}). | 2508 describe-variable @key{RET}}). |
2545 | 2509 |
2546 @cindex Lazy font-lock | |
2547 You might also want to investigate @code{fast-lock-mode} and | |
2548 @code{lazy-lock-mode}, versions of @code{font-lock-mode} that speed up | |
2549 highlighting. These are the alternatives for @code{jit-lock-mode} in | |
2550 versions of Emacs before 21.1. The advantage of @code{lazy-lock-mode} | |
2551 is that it only fontifies buffers when certain conditions are met, such | |
2552 as after a certain amount of idle time, or after you have finished | |
2553 scrolling through text. See the documentation for @code{lazy-lock-mode} | |
2554 by typing @kbd{C-h f @code{lazy-lock-mode}} (@kbd{M-x describe-function | |
2555 @key{RET} lazy-lock-mode @key{RET}}). | |
2556 | |
2557 Also see the documentation for the function @code{font-lock-mode}, | 2510 Also see the documentation for the function @code{font-lock-mode}, |
2558 available by typing @kbd{C-h f font-lock-mode} (@kbd{M-x | 2511 available by typing @kbd{C-h f font-lock-mode} (@kbd{M-x |
2559 describe-function @key{RET} font-lock-mode @key{RET}}). | 2512 describe-function @key{RET} font-lock-mode @key{RET}}). |
2560 | |
2561 For more information on font-lock mode, take a look at the | |
2562 @code{font-lock-mode} FAQ, maintained by | |
2563 @email{jari.aalto@@ntc.nokia.com, Jari Aalto} at | |
2564 | |
2565 @uref{ftp://cs.uta.fi/pub/ssjaaa/ema-font.gui} | |
2566 | 2513 |
2567 To print buffers with the faces (i.e., colors and fonts) intact, use | 2514 To print buffers with the faces (i.e., colors and fonts) intact, use |
2568 @kbd{M-x ps-print-buffer-with-faces} or @kbd{M-x | 2515 @kbd{M-x ps-print-buffer-with-faces} or @kbd{M-x |
2569 ps-print-region-with-faces}. You will need a way to send text to a | 2516 ps-print-region-with-faces}. You will need a way to send text to a |
2570 PostScript printer, or a PostScript interpreter such as Ghostscript; | 2517 PostScript printer, or a PostScript interpreter such as Ghostscript; |
2574 @node Scrolling only one line, Replacing highlighted text, Turning on syntax highlighting, Common requests | 2521 @node Scrolling only one line, Replacing highlighted text, Turning on syntax highlighting, Common requests |
2575 @section How can I force Emacs to scroll only one line when I move past the bottom of the screen? | 2522 @section How can I force Emacs to scroll only one line when I move past the bottom of the screen? |
2576 @cindex Scrolling only one line | 2523 @cindex Scrolling only one line |
2577 @cindex Reducing the increment when scrolling | 2524 @cindex Reducing the increment when scrolling |
2578 | 2525 |
2579 Place the following Lisp form in your @file{.emacs} file: | 2526 Customize the @code{scroll-conservatively} variable with @kbd{M-x |
2580 | 2527 customize-variable @key{RET} scroll-conservatively @key{RET}} and set it |
2581 @lisp | 2528 to a large value like, say, 10000. For an explanation of what this |
2582 (setq scroll-step 1) | 2529 means, @inforef{Scrolling, Scrolling, emacs}. |
2583 @end lisp | 2530 |
2584 | 2531 Alternatively, use the following Lisp form in your @file{.emacs}: |
2585 @inforef{Scrolling, Scrolling, emacs}. | 2532 |
2533 @lisp | |
2534 (setq scroll-conservatively most-positive-fixnum) | |
2535 @end lisp | |
2586 | 2536 |
2587 @node Replacing highlighted text, Editing MS-DOS files, Scrolling only one line, Common requests | 2537 @node Replacing highlighted text, Editing MS-DOS files, Scrolling only one line, Common requests |
2588 @section How can I replace highlighted text with what I type? | 2538 @section How can I replace highlighted text with what I type? |
2589 @cindex @code{delete-selection-mode} | 2539 @cindex @code{delete-selection-mode} |
2590 @cindex Replacing highlighted text | 2540 @cindex Replacing highlighted text |
2592 | 2542 |
2593 Use @code{delete-selection-mode}, which you can start automatically by | 2543 Use @code{delete-selection-mode}, which you can start automatically by |
2594 placing the following Lisp form in your @file{.emacs} file: | 2544 placing the following Lisp form in your @file{.emacs} file: |
2595 | 2545 |
2596 @lisp | 2546 @lisp |
2597 (delete-selection-mode t) | 2547 (delete-selection-mode 1) |
2598 @end lisp | 2548 @end lisp |
2599 | 2549 |
2600 According to the documentation string for @code{delete-selection-mode} | 2550 According to the documentation string for @code{delete-selection-mode} |
2601 (which you can read using @kbd{M-x describe-function @key{RET} | 2551 (which you can read using @kbd{M-x describe-function @key{RET} |
2602 delete-selection-mode @key{RET}}): | 2552 delete-selection-mode @key{RET}}): |
2625 the string @samp{(DOS)} will appear near the left edge of the mode line; | 2575 the string @samp{(DOS)} will appear near the left edge of the mode line; |
2626 on DOS and Windows, where the DOS end-of-line (EOL) format is the | 2576 on DOS and Windows, where the DOS end-of-line (EOL) format is the |
2627 default, a backslash (@samp{\}) will appear in the mode line. | 2577 default, a backslash (@samp{\}) will appear in the mode line. |
2628 | 2578 |
2629 If you are running a version of Emacs before 20.1, get @code{crypt++} | 2579 If you are running a version of Emacs before 20.1, get @code{crypt++} |
2630 from the Emacs Lisp Archive (@pxref{Packages that do not come with | 2580 (@pxref{Packages that do not come with Emacs}). Among other things, |
2631 Emacs}). Among other things, @code{crypt++} transparently modifies | 2581 @code{crypt++} transparently modifies MS-DOS files as they are loaded |
2632 MS-DOS files as they are loaded and saved, allowing you to ignore the | 2582 and saved, allowing you to ignore the different conventions that Unix |
2633 different conventions that Unix and MS-DOS have for delineating the end | 2583 and MS-DOS have for delineating the end of a line. |
2634 of a line. | |
2635 | 2584 |
2636 @node Filling paragraphs with a single space, Escape sequences in shell output, Editing MS-DOS files, Common requests | 2585 @node Filling paragraphs with a single space, Escape sequences in shell output, Editing MS-DOS files, Common requests |
2637 @section How can I tell Emacs to fill paragraphs with a single space after each period? | 2586 @section How can I tell Emacs to fill paragraphs with a single space after each period? |
2638 @cindex One space following periods | 2587 @cindex One space following periods |
2639 @cindex Single space following periods | 2588 @cindex Single space following periods |
2640 @cindex Periods, one space following | 2589 @cindex Periods, one space following |
2641 | 2590 |
2642 @email{ulm@@vsnhd1.cern.ch, Ulrich Mueller} suggests adding the | 2591 Add the following line to your @file{.emacs} file: |
2643 following two lines to your @file{.emacs} file: | 2592 |
2644 | 2593 @lisp |
2645 @lisp | |
2646 (setq sentence-end "[.?!][]\"')@}]*\\($\\|[ \t]\\)[ \t\n]*") | |
2647 (setq sentence-end-double-space nil) | 2594 (setq sentence-end-double-space nil) |
2648 @end lisp | 2595 @end lisp |
2649 | 2596 |
2650 @node Escape sequences in shell output, , Filling paragraphs with a single space, Common requests | 2597 @node Escape sequences in shell output, , Filling paragraphs with a single space, Common requests |
2651 @section Why these strange escape sequences from @code{ls} from the Shell mode? | 2598 @section Why these strange escape sequences from @code{ls} from the Shell mode? |
2680 see @ref{Bugs, , Reporting Bugs, emacs, The GNU Emacs Manual}, for | 2627 see @ref{Bugs, , Reporting Bugs, emacs, The GNU Emacs Manual}, for |
2681 instructions how to do that. | 2628 instructions how to do that. |
2682 | 2629 |
2683 The file @file{etc/PROBLEMS} in the Emacs distribution lists various | 2630 The file @file{etc/PROBLEMS} in the Emacs distribution lists various |
2684 known problems with building and using Emacs on specific platforms; | 2631 known problems with building and using Emacs on specific platforms; |
2685 type @kbd{C-h P} to read it. | 2632 type @kbd{C-h C-e} to read it. |
2686 | 2633 |
2687 @menu | 2634 @menu |
2688 * Problems with very large files:: | 2635 * Problems with very large files:: |
2689 * ^M in the shell buffer:: | 2636 * ^M in the shell buffer:: |
2690 * Shell process exits abnormally:: | 2637 * Shell process exits abnormally:: |
2709 @cindex Opening very large files | 2656 @cindex Opening very large files |
2710 @cindex Maximum file size | 2657 @cindex Maximum file size |
2711 @cindex Files, maximum size | 2658 @cindex Files, maximum size |
2712 | 2659 |
2713 Old versions (i.e., anything before 19.29) of Emacs had problems editing | 2660 Old versions (i.e., anything before 19.29) of Emacs had problems editing |
2714 files larger than 8 megabytes. As of version 19.29, the maximum buffer | 2661 files larger than 8 megabytes. In versions 19.29 and later, the maximum |
2715 size is at least 2^27-1, or 134,217,727 bytes, or 132 MBytes. Emacs 20 | 2662 buffer size is at least 2^27-1, or 134,217,727 bytes, or 132 MBytes. |
2716 can be compiled on some 64-bit systems in a way that enlarges the buffer | 2663 And in Emacs 22, the maximum buffer size has been increased to |
2717 size up to 576,460,752,303,423,487 bytes, or 549,755,813 GBytes. | 2664 268,435,455 bytes (or 256 MBytes) on 32-bit machines. |
2718 | |
2719 If you are using a version of Emacs older than 19.29 and cannot upgrade, | |
2720 you will have to recompile. @email{lnz@@lucid.com, Leonard N. Zubkoff} | |
2721 suggests putting the following two lines in @file{src/config.h} before | |
2722 compiling Emacs to allow for 26-bit integers and pointers (and thus file | |
2723 sizes of up to 33,554,431 bytes): | |
2724 | |
2725 @example | |
2726 #define VALBITS 26 | |
2727 #define GCTYPEBITS 5 | |
2728 @end example | |
2729 | |
2730 @noindent | |
2731 This method may result in "ILLEGAL DATATYPE" and other random errors on | |
2732 some machines. | |
2733 | |
2734 @email{daveg@@csvax.cs.caltech.edu, David Gillespie} explains how this | |
2735 problems crops up; while his numbers are true only for pre-19.29 | |
2736 versions of Emacs, the theory remains the same with current versions. | |
2737 | |
2738 @quotation | |
2739 Emacs is largely written in a dialect of Lisp; Lisp is a freely-typed | |
2740 language in the sense that you can put any value of any type into any | |
2741 variable, or return it from a function, and so on. So each value | |
2742 must carry a @dfn{tag} along with it identifying what kind of thing it | |
2743 is, e.g., integer, pointer to a list, pointer to an editing buffer, and | |
2744 so on. Emacs uses standard 32-bit integers for data objects, taking the | |
2745 top 8 bits for the tag and the bottom 24 bits for the value. So | |
2746 integers (and pointers) are somewhat restricted compared to true C | |
2747 integers and pointers. | |
2748 @end quotation | |
2749 | 2665 |
2750 @node ^M in the shell buffer, Shell process exits abnormally, Problems with very large files, Bugs and problems | 2666 @node ^M in the shell buffer, Shell process exits abnormally, Problems with very large files, Bugs and problems |
2751 @section How do I get rid of @samp{^M} or echoed commands in my shell buffer? | 2667 @section How do I get rid of @samp{^M} or echoed commands in my shell buffer? |
2752 @cindex Shell buffer, echoed commands and @samp{^M} in | 2668 @cindex Shell buffer, echoed commands and @samp{^M} in |
2753 @cindex Echoed commands in @code{shell-mode} | 2669 @cindex Echoed commands in @code{shell-mode} |
2808 | 2724 |
2809 @smalllisp | 2725 @smalllisp |
2810 (add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m) | 2726 (add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m) |
2811 @end smalllisp | 2727 @end smalllisp |
2812 | 2728 |
2813 On a related note: If your shell is echoing your input line in the shell | 2729 On a related note: if your shell is echoing your input line in the shell |
2814 buffer, you might want to try the following command in your shell | 2730 buffer, you might want to customize the @code{comint-process-echoes} |
2815 start-up file: | 2731 variable in your shell buffers, or try the following command in your |
2732 shell start-up file: | |
2816 | 2733 |
2817 @example | 2734 @example |
2818 stty -icrnl -onlcr -echo susp ^Z | 2735 stty -icrnl -onlcr -echo susp ^Z |
2819 @end example | 2736 @end example |
2820 | 2737 |
2821 @node Shell process exits abnormally, Problems with Shell Mode on MS-Windows, ^M in the shell buffer, Bugs and problems | 2738 @node Shell process exits abnormally, Problems with Shell Mode on MS-Windows, ^M in the shell buffer, Bugs and problems |
2822 @section Why do I get "Process shell exited abnormally with code 1"? | 2739 @section Why do I get ``Process shell exited abnormally with code 1''? |
2823 @cindex Abnormal exits from @code{shell-mode} | 2740 @cindex Abnormal exits from @code{shell-mode} |
2824 @cindex @code{shell-mode} exits | 2741 @cindex @code{shell-mode} exits |
2825 @cindex Process shell exited | 2742 @cindex Process shell exited |
2826 | 2743 |
2827 The most likely reason for this message is that the @samp{env} program | 2744 The most likely reason for this message is that the @samp{env} program |
2874 Some people have trouble with Shell Mode because of intrusive | 2791 Some people have trouble with Shell Mode because of intrusive |
2875 antivirus software; disabling the resident antivirus program solves | 2792 antivirus software; disabling the resident antivirus program solves |
2876 the problems in those cases. | 2793 the problems in those cases. |
2877 | 2794 |
2878 @node Termcap/Terminfo entries for Emacs, Spontaneous entry into isearch-mode, Problems with Shell Mode on MS-Windows, Bugs and problems | 2795 @node Termcap/Terminfo entries for Emacs, Spontaneous entry into isearch-mode, Problems with Shell Mode on MS-Windows, Bugs and problems |
2879 @section Where is the termcap/terminfo entry for terminal type "emacs"? | 2796 @section Where is the termcap/terminfo entry for terminal type @samp{emacs}? |
2880 @cindex Termcap | 2797 @cindex Termcap |
2881 @cindex Terminfo | 2798 @cindex Terminfo |
2882 @cindex Emacs entries for termcap/terminfo | 2799 @cindex Emacs entries for termcap/terminfo |
2883 | 2800 |
2884 The termcap entry for terminal type @samp{emacs} is ordinarily put in | 2801 The termcap entry for terminal type @samp{emacs} is ordinarily put in |
2908 @example | 2825 @example |
2909 if ("$term" == emacs) set term=dumb | 2826 if ("$term" == emacs) set term=dumb |
2910 @end example | 2827 @end example |
2911 | 2828 |
2912 @node Spontaneous entry into isearch-mode, Problems talking to certain hosts, Termcap/Terminfo entries for Emacs, Bugs and problems | 2829 @node Spontaneous entry into isearch-mode, Problems talking to certain hosts, Termcap/Terminfo entries for Emacs, Bugs and problems |
2913 @section Why does Emacs spontaneously start displaying "I-search:" and beeping? | 2830 @section Why does Emacs spontaneously start displaying @samp{I-search:} and beeping? |
2914 @cindex Spontaneous entry into isearch-mode | 2831 @cindex Spontaneous entry into isearch-mode |
2915 @cindex isearch-mode, spontaneous entry into | 2832 @cindex isearch-mode, spontaneous entry into |
2916 @cindex Beeping without obvious reason | 2833 @cindex Beeping without obvious reason |
2917 | 2834 |
2918 Your terminal (or something between your terminal and the computer) is | 2835 Your terminal (or something between your terminal and the computer) is |
2965 properly told to do DNS lookups with the correct command line switch. | 2882 properly told to do DNS lookups with the correct command line switch. |
2966 | 2883 |
2967 @end itemize | 2884 @end itemize |
2968 | 2885 |
2969 @node Errors with init files, Emacs ignores X resources, Problems talking to certain hosts, Bugs and problems | 2886 @node Errors with init files, Emacs ignores X resources, Problems talking to certain hosts, Bugs and problems |
2970 @section Why does Emacs say "Error in init file"? | 2887 @section Why does Emacs say @samp{Error in init file}? |
2971 @cindex Error in @file{.emacs} | 2888 @cindex Error in @file{.emacs} |
2972 @cindex Error in init file | 2889 @cindex Error in init file |
2973 @cindex Init file, errors in | 2890 @cindex Init file, errors in |
2974 @cindex @file{.emacs} file, errors in | 2891 @cindex @file{.emacs} file, errors in |
2975 @cindex Debugging @file{.emacs} file | 2892 @cindex Debugging @file{.emacs} file |
3119 guess by recognizing @samp{cd} commands. If you type @kbd{cd} followed | 3036 guess by recognizing @samp{cd} commands. If you type @kbd{cd} followed |
3120 by a directory name with a variable reference (@kbd{cd $HOME/bin}) or | 3037 by a directory name with a variable reference (@kbd{cd $HOME/bin}) or |
3121 with a shell metacharacter (@kbd{cd ../lib*}), Emacs will fail to | 3038 with a shell metacharacter (@kbd{cd ../lib*}), Emacs will fail to |
3122 correctly guess the shell's new current directory. A huge variety of | 3039 correctly guess the shell's new current directory. A huge variety of |
3123 fixes and enhancements to shell mode for this problem have been written | 3040 fixes and enhancements to shell mode for this problem have been written |
3124 to handle this problem. Check the Lisp Code Directory (@pxref{Finding a | 3041 to handle this problem (@pxref{Finding a package with particular |
3125 package with particular functionality}). | 3042 functionality}). |
3126 | 3043 |
3127 You can tell Emacs the shell's current directory with the command | 3044 You can tell Emacs the shell's current directory with the command |
3128 @kbd{M-x dirs}. | 3045 @kbd{M-x dirs}. |
3129 | 3046 |
3130 @node Security risks with Emacs, Dired claims that no file is on this line, Shell mode loses the current directory, Bugs and problems | 3047 @node Security risks with Emacs, Dired claims that no file is on this line, Shell mode loses the current directory, Bugs and problems |
3166 arbitrary Emacs Lisp code evaluated when the file is visited. | 3083 arbitrary Emacs Lisp code evaluated when the file is visited. |
3167 Obviously, there is a potential for Trojan horses to exploit this | 3084 Obviously, there is a potential for Trojan horses to exploit this |
3168 feature. | 3085 feature. |
3169 | 3086 |
3170 Emacs 18 allowed this feature by default; users could disable it by | 3087 Emacs 18 allowed this feature by default; users could disable it by |
3171 setting the variable @code{inhibit-local-variables} to a non-nil value. | 3088 setting the variable @code{inhibit-local-variables} to a non-@code{nil} value. |
3172 | 3089 |
3173 As of Emacs 19, Emacs has a list of local variables that create a | 3090 As of Emacs 19, Emacs has a list of local variables that create a |
3174 security risk. If a file tries to set one of them, it asks the user to | 3091 security risk. If a file tries to set one of them, it asks the user to |
3175 confirm whether the variables should be set. You can also tell Emacs | 3092 confirm whether the variables should be set. You can also tell Emacs |
3176 whether to allow the evaluation of Emacs Lisp code found at the bottom | 3093 whether to allow the evaluation of Emacs Lisp code found at the bottom |
3231 @end example | 3148 @end example |
3232 | 3149 |
3233 @end itemize | 3150 @end itemize |
3234 | 3151 |
3235 @node Dired claims that no file is on this line, , Security risks with Emacs, Bugs and problems | 3152 @node Dired claims that no file is on this line, , Security risks with Emacs, Bugs and problems |
3236 @section Dired says, "no file on this line" when I try to do something. | 3153 @section Dired says, @samp{no file on this line} when I try to do something. |
3237 @cindex Dired does not see a file | 3154 @cindex Dired does not see a file |
3238 | 3155 |
3239 @c FIXME: I think this is fixed in Emacs 21, but I didn't have time to | 3156 @c FIXME: I think this is fixed in Emacs 21, but I didn't have time to |
3240 @c check. | 3157 @c check. |
3241 Chances are you're using a localized version of Unix that doesn't use US | 3158 Chances are you're using a localized version of Unix that doesn't use US |
3251 There are two approaches to solving this. The first one involves | 3168 There are two approaches to solving this. The first one involves |
3252 setting things up so that @samp{ls -l} outputs US date format. This can | 3169 setting things up so that @samp{ls -l} outputs US date format. This can |
3253 be done by setting the locale. See your OS manual for more information. | 3170 be done by setting the locale. See your OS manual for more information. |
3254 | 3171 |
3255 The second approach involves changing the regular expression used by | 3172 The second approach involves changing the regular expression used by |
3256 dired, @code{dired-move-to-filename-regexp}. | 3173 dired, @code{directory-listing-before-filename-regexp}. |
3257 | 3174 |
3258 @c ------------------------------------------------------------ | 3175 @c ------------------------------------------------------------ |
3259 @node Compiling and installing Emacs, Finding Emacs and related packages, Bugs and problems, Top | 3176 @node Compiling and installing Emacs, Finding Emacs and related packages, Bugs and problems, Top |
3260 @chapter Compiling and installing Emacs | 3177 @chapter Compiling and installing Emacs |
3261 @cindex Compiling and installing Emacs | 3178 @cindex Compiling and installing Emacs |
3293 distribution site, sources are available as | 3210 distribution site, sources are available as |
3294 | 3211 |
3295 @uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-@value{VER}.tar.gz} | 3212 @uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-@value{VER}.tar.gz} |
3296 | 3213 |
3297 The above will obviously change as new versions of Emacs come out. For | 3214 The above will obviously change as new versions of Emacs come out. For |
3298 instance, when Emacs 21.42 is released, it will most probably be | 3215 instance, when Emacs 22.42 is released, it will most probably be |
3299 available as | 3216 available as |
3300 | 3217 |
3301 @uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-21.42.tar.gz} | 3218 @uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-22.42.tar.gz} |
3302 | 3219 |
3303 Again, you should use one of the GNU mirror sites (see @ref{Current GNU | 3220 Again, you should use one of the GNU mirror sites (see @ref{Current GNU |
3304 distributions}, and adjust the URL accordingly) so as to reduce load on | 3221 distributions}, and adjust the URL accordingly) so as to reduce load on |
3305 @file{ftp.gnu.org}. | 3222 @file{ftp.gnu.org}. |
3306 | 3223 |
3434 | 3351 |
3435 Emacs needs to be linked with the static version of the X11 library, | 3352 Emacs needs to be linked with the static version of the X11 library, |
3436 @file{libX11.a}. This may be missing. | 3353 @file{libX11.a}. This may be missing. |
3437 | 3354 |
3438 On OpenWindows, you may need to use @code{add_services} to add the | 3355 On OpenWindows, you may need to use @code{add_services} to add the |
3439 "OpenWindows Programmers" optional software category from the CD-ROM. | 3356 ``OpenWindows Programmers'' optional software category from the CD-ROM. |
3440 | 3357 |
3441 On HP-UX 8.0, you may need to run @code{update} again to load the | 3358 On HP-UX 8.0, you may need to run @code{update} again to load the |
3442 X11-PRG ``fileset''. This may be missing even if you specified ``all | 3359 X11-PRG ``fileset''. This may be missing even if you specified ``all |
3443 filesets'' the first time. If @file{libcurses.a} is missing, you may | 3360 filesets'' the first time. If @file{libcurses.a} is missing, you may |
3444 need to load the ``Berkeley Development Option.'' | 3361 need to load the ``Berkeley Development Option.'' |
3468 | 3385 |
3469 @menu | 3386 @menu |
3470 * Finding Emacs on the Internet:: | 3387 * Finding Emacs on the Internet:: |
3471 * Finding a package with particular functionality:: | 3388 * Finding a package with particular functionality:: |
3472 * Packages that do not come with Emacs:: | 3389 * Packages that do not come with Emacs:: |
3473 * Submitting to the Emacs Lisp Archive:: | |
3474 * Current GNU distributions:: | 3390 * Current GNU distributions:: |
3475 * Difference between Emacs and XEmacs:: | 3391 * Difference between Emacs and XEmacs:: |
3476 * Emacs for MS-DOS:: | 3392 * Emacs for MS-DOS:: |
3477 * Emacs for Windows:: | 3393 * Emacs for Windows:: |
3478 * Emacs for OS/2:: | 3394 * Emacs for OS/2:: |
3480 * Emacs for the Amiga :: | 3396 * Emacs for the Amiga :: |
3481 * Emacs for NeXTSTEP:: | 3397 * Emacs for NeXTSTEP:: |
3482 * Emacs for Apple computers:: | 3398 * Emacs for Apple computers:: |
3483 * Emacs for VMS and DECwindows:: | 3399 * Emacs for VMS and DECwindows:: |
3484 * Modes for various languages:: | 3400 * Modes for various languages:: |
3485 * Translating names to IP addresses:: | |
3486 @end menu | 3401 @end menu |
3487 | 3402 |
3488 @node Finding Emacs on the Internet, Finding a package with particular functionality, Finding Emacs and related packages, Finding Emacs and related packages | 3403 @node Finding Emacs on the Internet, Finding a package with particular functionality, Finding Emacs and related packages, Finding Emacs and related packages |
3489 @section Where can I get Emacs on the net (or by snail mail)? | 3404 @section Where can I get Emacs on the net (or by snail mail)? |
3490 @cindex Finding Emacs on the Internet | 3405 @cindex Finding Emacs on the Internet |
3491 @cindex Snail mail, ordering Emacs via | 3406 @cindex Snail mail, ordering Emacs via |
3492 @cindex Postal service, ordering Emacs via | 3407 @cindex Postal service, ordering Emacs via |
3493 @cindex Distribution, retrieving Emacs | 3408 @cindex Distribution, retrieving Emacs |
3494 @cindex Internet, retrieving from | 3409 @cindex Internet, retrieving from |
3495 | 3410 |
3496 Look in the files @file{etc/DISTRIB} and @file{etc/FTP} for information | 3411 Look in the files @file{etc/DISTRIB} and @file{etc/FTP} for |
3497 on nearby archive sites and @file{etc/ORDERS} for mail orders. If you | 3412 information on nearby archive sites. If you don't already have Emacs, |
3498 don't already have Emacs, see @ref{Informational files for Emacs}, for how | 3413 see @ref{Informational files for Emacs}, for how to get these files. |
3499 to get these files. | |
3500 | 3414 |
3501 @xref{Installing Emacs}, for information on how to obtain and build the latest | 3415 @xref{Installing Emacs}, for information on how to obtain and build the latest |
3502 version of Emacs, and see @ref{Current GNU distributions}, for a list of | 3416 version of Emacs, and see @ref{Current GNU distributions}, for a list of |
3503 archive sites that make GNU software available. | 3417 archive sites that make GNU software available. |
3504 | 3418 |
3519 source to most packages contains a short description of how they | 3433 source to most packages contains a short description of how they |
3520 should be loaded, invoked, and configured---so before you use or | 3434 should be loaded, invoked, and configured---so before you use or |
3521 modify a Lisp package, see if the author has provided any hints in the | 3435 modify a Lisp package, see if the author has provided any hints in the |
3522 source code. | 3436 source code. |
3523 | 3437 |
3524 If a package does not come with Emacs, check the Lisp Code Directory. | 3438 The command @kbd{C-h p} (@code{finder-by-keyword}) allows you to browse |
3525 The LCD was originally maintained by @email{brennan@@hal.com, Dave | 3439 the constituent Emacs packages. |
3526 Brennan}, but was recently taken over by @email{toby@@world.std.com, | 3440 |
3527 toby knudsen}, who maintains @uref{http://www.emacs.org}. The LCD is | 3441 For advice on how to find extra packages that are not part of Emacs, |
3528 currently being reorganized and updated, but you can meanwhile find many | 3442 see @ref{Packages that do not come with Emacs}. |
3529 packages at @uref{ftp://ftp.emacs.org/pub}. | 3443 |
3530 | 3444 @node Packages that do not come with Emacs, Current GNU distributions, Finding a package with particular functionality, Finding Emacs and related packages |
3531 For now, you can search through the LCD with @file{lispdir.el}, which is | |
3532 in the process of being updated. Download it from the LCD, in the | |
3533 @file{emacs-lisp-attic/misc} directory, and then evaluate the following | |
3534 Lisp form (@pxref{Evaluating Emacs Lisp code}): | |
3535 | |
3536 @lisp | |
3537 (setq lisp-code-directory | |
3538 "/anonymous@@ftp.emacs.org:pub/emacs-lisp-attic/emacs-lisp/LCD-datafile.gz" | |
3539 elisp-archive-host "ftp.emacs.org" | |
3540 elisp-archive-directory "/pub/emacs-lisp-attic/emacs-lisp/") | |
3541 @end lisp | |
3542 | |
3543 Once you have installed @file{lispdir.el}, you can use @kbd{M-x | |
3544 lisp-dir-apropos} to search the listing. For example, @kbd{M-x | |
3545 lisp-dir-apropos @key{RET} ange-ftp @key{RET}} produces this output: | |
3546 | |
3547 @example | |
3548 GNU Emacs Lisp Code Directory Apropos --- "ange-ftp" | |
3549 "~/" refers to archive.cis.ohio-state.edu:pub/elisp-archive/ | |
3550 | |
3551 ange-ftp (4.18) 15-Jul-1992 | |
3552 Andy Norman, <ange@@hplb.hpl.hp.com> | |
3553 ~/packages/ange-ftp.tar.Z | |
3554 transparent FTP Support for GNU Emacs | |
3555 auto-save (1.19) 01-May-1992 | |
3556 Sebastian Kremer, <sk@@thp.uni-koeln.de> | |
3557 ~/misc/auto-save.el.Z | |
3558 Safer autosaving with support for ange-ftp and /tmp | |
3559 ftp-quik (1.0) 28-Jul-1993 | |
3560 Terrence Brannon, <tb06@@pl122f.eecs.lehigh.edu> | |
3561 ~/modes/ftp-quik.el.Z | |
3562 Quik access to dired'ing of ange-ftp and normal paths | |
3563 @end example | |
3564 | |
3565 @node Packages that do not come with Emacs, Submitting to the Emacs Lisp Archive, Finding a package with particular functionality, Finding Emacs and related packages | |
3566 @section Where can I get Emacs Lisp packages that don't come with Emacs? | 3445 @section Where can I get Emacs Lisp packages that don't come with Emacs? |
3567 @cindex Unbundled packages | 3446 @cindex Unbundled packages |
3568 @cindex Finding other packages | 3447 @cindex Finding other packages |
3569 @cindex Lisp packages that do not come with Emacs | 3448 @cindex Lisp packages that do not come with Emacs |
3570 @cindex Packages, those that do not come with Emacs | 3449 @cindex Packages, those that do not come with Emacs |
3571 @cindex Emacs Lisp Archive, description of | 3450 @cindex Emacs Lisp List |
3572 @cindex Archive, description of the Emacs Lisp | 3451 @cindex Emacs Lisp Archive |
3573 | 3452 |
3574 First, check the Lisp Code Directory to find the name of the package you | 3453 @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.html, The Emacs Lisp |
3575 are looking for (@pxref{Finding a package with particular | 3454 List (ELL)}, maintained by @email{stephen@@anc.ed.ac.uk, Stephen Eglen}, |
3576 functionality}). Next, check local archives and the Emacs Lisp Archive | 3455 aims to provide one compact list with links to all of the current Emacs |
3577 to find a copy of the relevant files. If you still haven't found it, | 3456 Lisp files on the internet. The ELL can be browsed over the web, or |
3578 you can send e-mail to the author asking for a copy. If you find Emacs | 3457 from Emacs with @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.el, |
3579 Lisp code that doesn't appear in the LCD, please submit a copy to the | 3458 the @file{ell} package}. |
3580 LCD (@pxref{Submitting to the Emacs Lisp Archive}). | 3459 |
3581 | 3460 Many authors post their packages to the @uref{news:gnu.emacs.sources, |
3582 You can access the Emacs Lisp Archive at | 3461 Emacs sources newsgroup}. You can search the archives of this |
3583 | 3462 group with @uref{http://groups.google.com, Google}, for example. |
3584 @uref{ftp://archive.cis.ohio-state.edu/pub/emacs-lisp/} | 3463 |
3585 | 3464 Several packages are stored in |
3586 @noindent | 3465 @uref{http://emacswiki.org/elisp/, the Lisp area of the Emacs Wiki}. |
3587 or at | 3466 |
3588 | 3467 For a long time, the Emacs Lisp Archive provided a central repository |
3589 @uref{http://www.cis.ohio-state.edu/emacs-lisp} | 3468 for Emacs packages. Sadly, it has not been active for some time, |
3590 | 3469 although you can still access the old files at |
3591 @noindent | 3470 |
3592 Retrieve and read the file @file{README} first. | 3471 @uref{ftp://ftp.cis.ohio-state.edu/pub/emacs-lisp/WWW/index.html} |
3593 | 3472 |
3594 @itemize @bullet | 3473 @node Current GNU distributions, Difference between Emacs and XEmacs, Packages that do not come with Emacs, Finding Emacs and related packages |
3595 | |
3596 @item | |
3597 The archive maintainers do not have time to answer individual | |
3598 requests for packages or the list of packages in the archive. If you | |
3599 cannot use FTP or UUCP to access the archive yourself, try to find a | |
3600 friend who can, but please don't ask the maintainers. | |
3601 | |
3602 @item | |
3603 Any files with names ending in @file{.Z}, @file{.z}, or @file{.gz} are | |
3604 compressed, so you should use "binary" mode in FTP to retrieve them. | |
3605 You should also use binary mode whenever you retrieve any files with | |
3606 names ending in @file{.elc}. | |
3607 | |
3608 @end itemize | |
3609 | |
3610 @node Submitting to the Emacs Lisp Archive, Current GNU distributions, Packages that do not come with Emacs, Finding Emacs and related packages | |
3611 @section How do I submit code to the Emacs Lisp Archive? | |
3612 @cindex Submitting code to the Emacs Lisp Archive | |
3613 @cindex Emacs Lisp Archive, submissions to | |
3614 @cindex Lisp Archive, submissions to | |
3615 @cindex Archive, submitting to the Emacs Lisp | |
3616 | |
3617 Guidelines and procedures for submission to the archive can be found in | |
3618 the file @file{GUIDELINES} in the archive directory (@pxref{Packages that | |
3619 do not come with Emacs}). It covers documentation, copyrights, | |
3620 packaging, submission, and the Lisp Code Directory Record. Anonymous | |
3621 FTP uploads are not permitted. Instead, all submissions are mailed to | |
3622 @email{elisp-archive@@cis.ohio-state.edu}. The @file{lispdir.el} | |
3623 package has a function named @code{submit-lcd-entry} which will help you | |
3624 with this. | |
3625 | |
3626 @node Current GNU distributions, Difference between Emacs and XEmacs, Submitting to the Emacs Lisp Archive, Finding Emacs and related packages | |
3627 @section Where can I get other up-to-date GNU stuff? | 3474 @section Where can I get other up-to-date GNU stuff? |
3628 @cindex Current GNU distributions | 3475 @cindex Current GNU distributions |
3629 @cindex Sources for current GNU distributions | 3476 @cindex Sources for current GNU distributions |
3630 @cindex Stuff, current GNU | 3477 @cindex Stuff, current GNU |
3631 @cindex Up-to-date GNU stuff | 3478 @cindex Up-to-date GNU stuff |
3642 A list of sites mirroring @samp{ftp.gnu.org} can be found at | 3489 A list of sites mirroring @samp{ftp.gnu.org} can be found at |
3643 | 3490 |
3644 @uref{http://www.gnu.org/order/ftp.html} | 3491 @uref{http://www.gnu.org/order/ftp.html} |
3645 | 3492 |
3646 @node Difference between Emacs and XEmacs, Emacs for MS-DOS, Current GNU distributions, Finding Emacs and related packages | 3493 @node Difference between Emacs and XEmacs, Emacs for MS-DOS, Current GNU distributions, Finding Emacs and related packages |
3647 @section What is the difference between Emacs and XEmacs (formerly "Lucid Emacs")? | 3494 @section What is the difference between Emacs and XEmacs (formerly Lucid Emacs)? |
3648 @cindex XEmacs | 3495 @cindex XEmacs |
3649 @cindex Difference Emacs and XEmacs | 3496 @cindex Difference Emacs and XEmacs |
3650 @cindex Lucid Emacs | 3497 @cindex Lucid Emacs |
3651 @cindex Epoch | 3498 @cindex Epoch |
3652 | 3499 |
3653 First of all, they're both GNU Emacs. XEmacs is just as much a later | 3500 XEmacs is a branch version of Emacs. It was first called Lucid Emacs, |
3654 version of GNU Emacs as the FSF-distributed version. This FAQ refers to | 3501 and was initially derived from a prerelease version of Emacs 19. In |
3655 the latest version to be distributed by the FSF as ``Emacs,'' partly | 3502 this FAQ, we use the name ``Emacs'' only for the official version. |
3656 because the XEmacs maintainers now refer to their product using the | 3503 |
3657 ``XEmacs'' name, and partly because there isn't any accurate way to | 3504 Emacs and XEmacs each come with Lisp packages that are lacking in the |
3658 differentiate between the two without getting mired in paragraphs of | 3505 other. The two versions have some significant differences at the Lisp |
3659 legalese and history. | 3506 programming level. Their current features are roughly comparable, |
3660 | 3507 though the support for some operating systems, character sets and |
3661 XEmacs, which began life as Lucid Emacs, is based on an early version of | 3508 specific packages might be quite different. |
3662 Emacs 19 and Epoch, an X-aware version of Emacs 18. | 3509 |
3663 | 3510 Some XEmacs code has been contributed to Emacs, and we would like to |
3664 Emacs (i.e., the version distributed by the FSF) has a larger installed | 3511 use other parts, but the earlier XEmacs maintainers did not always |
3665 base and now always contains the MULE multilingual facilities. | 3512 keep track of the authors of contributed code, which makes it |
3666 XEmacs can do some clever tricks with X and MS-Windows, such as | 3513 impossible for the FSF to get copyright papers signed for that code. |
3667 putting arbitrary graphics in a buffer. Similar facilities have been | 3514 (The FSF requires these papers for all the code included in the Emacs |
3668 implemented for Emacs as part of a new redisplay implementation for | 3515 release, aside from generic C support packages that retain their |
3669 Emacs 21, and are available in the latest Emacs releases. | 3516 separate identity and are not integrated into the code of Emacs |
3670 Emacs and XEmacs each come with | 3517 proper.) |
3671 Lisp packages that are lacking in the other; RMS says that the FSF would | 3518 |
3672 include more packages that come with XEmacs, but that the XEmacs | 3519 If you want to talk about these two versions and distinguish them, |
3673 maintainers don't always keep track of the authors of contributed code, | 3520 please call them ``Emacs'' and ``XEmacs.'' To contrast ``XEmacs'' |
3674 which makes it impossible for the FSF to have certain legal papers | 3521 with ``GNU Emacs'' would be misleading, since XEmacs too has its |
3675 signed. (Without these legal papers, the FSF will not distribute Lisp | 3522 origin in the work of the GNU Project. Terms such as ``Emacsen'' and |
3676 packages with Emacs.) The two versions have some | 3523 ``(X)Emacs'' are not wrong, but they are not very clear, so it |
3677 significant differences at the Lisp programming level. | 3524 is better to write ``Emacs and XEmacs.'' |
3678 | |
3679 Many XEmacs features have found their way into recent versions of Emacs, | |
3680 and more features can be expected in the future, but there are still many | |
3681 differences between the two. | |
3682 | |
3683 The latest stable branch of XEmacs as of this writing is 21.1; you can | |
3684 get it at | |
3685 | |
3686 @uref{ftp://ftp.xemacs.org/pub/xemacs/xemacs-21.1.14.tar.gz} | |
3687 | |
3688 More information about XEmacs, including a list of frequently asked | |
3689 questions (FAQ), is available at | |
3690 | |
3691 @uref{http://www.xemacs.org/} | |
3692 | 3525 |
3693 @node Emacs for MS-DOS, Emacs for Windows, Difference between Emacs and XEmacs, Finding Emacs and related packages | 3526 @node Emacs for MS-DOS, Emacs for Windows, Difference between Emacs and XEmacs, Finding Emacs and related packages |
3694 @section Where can I get Emacs for my PC running MS-DOS? | 3527 @section Where can I get Emacs for my PC running MS-DOS? |
3695 @cindex MS-DOS, Emacs for | 3528 @cindex MS-DOS, Emacs for |
3696 @cindex DOS, Emacs for | 3529 @cindex DOS, Emacs for |
3702 SimTel.NET archives. This version apparently works under MS-DOS and | 3535 SimTel.NET archives. This version apparently works under MS-DOS and |
3703 Windows (3.X, 9X, ME, NT, and 2000) and supports long file names under | 3536 Windows (3.X, 9X, ME, NT, and 2000) and supports long file names under |
3704 Windows 9X, Windows ME, and Windows 2000. More information is available | 3537 Windows 9X, Windows ME, and Windows 2000. More information is available |
3705 from | 3538 from |
3706 | 3539 |
3707 @uref{http://www.simtel.net/pub/djgpp/v2gnu/emacs.README} | 3540 @uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/emacs.README} |
3708 | 3541 |
3709 The binary itself is available in the files @file{em*.zip} in the | 3542 The binary itself is available in the files @file{em*.zip} in the |
3710 directory | 3543 directory |
3711 | 3544 |
3712 @uref{http://www.simtel.net/pub/djgpp/v2gnu/} | 3545 @uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/} |
3713 | 3546 |
3714 If you prefer to compile Emacs for yourself, you can do so with the | 3547 If you prefer to compile Emacs for yourself, you can do so with the |
3715 current distribution directly. You will need a 386 (or | 3548 current distribution directly. You will need a 386 (or |
3716 better) processor, and to be running MS-DOS 3.0 or later. According to | 3549 better) processor, and to be running MS-DOS 3.0 or later. According to |
3717 @email{eliz@@is.elta.co.il, Eli Zaretskii} and | 3550 @email{eliz@@gnu.org, Eli Zaretskii} and |
3718 @email{hankedr@@dms.auburn.edu, Darrel Hankerson}, you will need the | 3551 @email{hankedr@@dms.auburn.edu, Darrel Hankerson}, you will need the |
3719 following: | 3552 following: |
3720 | 3553 |
3721 @table @emph | 3554 @table @emph |
3722 | 3555 |
3726 long file names on Windows 9X/ME/2K. | 3559 long file names on Windows 9X/ME/2K. |
3727 | 3560 |
3728 You can get the latest release of DJGPP by retrieving all of | 3561 You can get the latest release of DJGPP by retrieving all of |
3729 the files in | 3562 the files in |
3730 | 3563 |
3731 @uref{http://www.simtel.net/pub/gnu/djgpp/v2*} | 3564 @uref{ftp://ftp.delorie.com/pub/djgpp/current/v2*} |
3732 | 3565 |
3733 @item Unpacking program | 3566 @item Unpacking program |
3734 The easiest way is to use @code{djtar} which comes with DJGPP v2.x, | 3567 The easiest way is to use @code{djtar} which comes with DJGPP v2.x, |
3735 because it can open gzip'ed tarfiles (i.e., those ending with | 3568 because it can open gzip'ed tarfiles (i.e., those ending with |
3736 @file{.tar.gz}) in one step. @code{Djtar} comes in | 3569 @file{.tar.gz}) in one step. @code{Djtar} comes in |
3745 actually prevent Emacs from building successfully! | 3578 actually prevent Emacs from building successfully! |
3746 | 3579 |
3747 @item make, mv, sed, and rm | 3580 @item make, mv, sed, and rm |
3748 All of these utilities are available at | 3581 All of these utilities are available at |
3749 | 3582 |
3750 @uref{http://www.simtel.net/pub/gnu/djgpp/v2gnu} | 3583 @uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu} |
3751 | 3584 |
3752 16-bit utilities can be found in GNUish, at | 3585 16-bit utilities can be found in GNUish, at |
3753 | 3586 |
3754 @uref{http://www.simtel.net/pub/gnuish/} | 3587 @uref{http://www.simtel.net/pub/gnuish/} |
3755 | 3588 |
3762 The files @file{INSTALL} (near its end) and @file{etc/PROBLEMS} in the | 3595 The files @file{INSTALL} (near its end) and @file{etc/PROBLEMS} in the |
3763 directory of the Emacs sources contains some additional information | 3596 directory of the Emacs sources contains some additional information |
3764 regarding Emacs under MS-DOS. | 3597 regarding Emacs under MS-DOS. |
3765 | 3598 |
3766 For a list of other MS-DOS implementations of Emacs (and Emacs | 3599 For a list of other MS-DOS implementations of Emacs (and Emacs |
3767 look-alikes), consult the list of "Emacs implementations and literature," | 3600 look-alikes), consult the list of ``Emacs implementations and literature,'' |
3768 available at | 3601 available at |
3769 | 3602 |
3770 @uref{ftp://rtfm.mit.edu/pub/usenet/comp.emacs/} | 3603 @uref{ftp://rtfm.mit.edu/pub/usenet/comp.emacs/} |
3771 | 3604 |
3772 Note that while many of these programs look similar to Emacs, they often | 3605 Note that while many of these programs look similar to Emacs, they often |
3773 lack certain features, such as the Emacs Lisp extension language. | 3606 lack certain features, such as the Emacs Lisp extension language. |
3774 | 3607 |
3775 @node Emacs for Windows, Emacs for OS/2, Emacs for MS-DOS, Finding Emacs and related packages | 3608 @node Emacs for Windows, Emacs for OS/2, Emacs for MS-DOS, Finding Emacs and related packages |
3776 @section Where can I get Emacs for Microsoft Windows | 3609 @section Where can I get Emacs for Microsoft Windows? |
3777 @cindex FAQ for NT Emacs | 3610 @cindex FAQ for NT Emacs |
3778 @cindex Emacs for MS-Windows | 3611 @cindex Emacs for MS-Windows |
3779 @cindex Microsoft Windows, Emacs for | 3612 @cindex Microsoft Windows, Emacs for |
3780 @cindex Windows 9X, ME, NT, 2K, and CE, Emacs for | 3613 @cindex Windows 9X, ME, NT, 2K, and CE, Emacs for |
3781 | 3614 |
3847 @node Emacs for Apple computers, Emacs for VMS and DECwindows, Emacs for NeXTSTEP, Finding Emacs and related packages | 3680 @node Emacs for Apple computers, Emacs for VMS and DECwindows, Emacs for NeXTSTEP, Finding Emacs and related packages |
3848 @section Where can I get Emacs for my Apple computer? | 3681 @section Where can I get Emacs for my Apple computer? |
3849 @cindex Apple computers, Emacs for | 3682 @cindex Apple computers, Emacs for |
3850 @cindex Macintosh, Emacs for | 3683 @cindex Macintosh, Emacs for |
3851 | 3684 |
3852 An unofficial port of GNU Emacs 18.59 to the Macintosh is available at a | |
3853 number of ftp sites, the home being | |
3854 @uref{ftp://ftp.cs.cornell.edu/pub/parmet/Emacs-1.17.sit.bin}. | |
3855 | |
3856 A port of Emacs 20.4 is available at | |
3857 @uref{http://www.cs.hku.hk/~choi/emacs/index.html}. | |
3858 | |
3859 Beginning with version 21.1, the Macintosh is supported in the official | 3685 Beginning with version 21.1, the Macintosh is supported in the official |
3860 Emacs distribution; see the files @file{mac/README} and | 3686 Emacs distribution; see the files @file{mac/README} and |
3861 @file{mac/INSTALL} in the Emacs distribution for build instructions. | 3687 @file{mac/INSTALL} in the Emacs distribution for build instructions. |
3862 | 3688 |
3863 Apple's forthcoming "OS X" is based largely on NeXTSTEP and OpenStep. | 3689 Beginning with version 22.1, Emacs supports Mac OS X natively. |
3864 @xref{Emacs for NeXTSTEP}, for more details about that version. | |
3865 | 3690 |
3866 @node Emacs for VMS and DECwindows, Modes for various languages, Emacs for Apple computers, Finding Emacs and related packages | 3691 @node Emacs for VMS and DECwindows, Modes for various languages, Emacs for Apple computers, Finding Emacs and related packages |
3867 @section Where do I get Emacs that runs on VMS under DECwindows? | 3692 @section Where do I get Emacs that runs on VMS under DECwindows? |
3868 @cindex DECwindows, Emacs for | 3693 @cindex DECwindows, Emacs for |
3869 @cindex VMS, Emacs for | 3694 @cindex VMS, Emacs for |
3870 | 3695 |
3871 Up-to-date information about GNU software (including Emacs) for VMS is | 3696 Up-to-date information about GNU software (including Emacs) for VMS is |
3872 available at @uref{http://vms.gnu.org/}. | 3697 available at @uref{http://vms.gnu.org/}. |
3873 | 3698 |
3874 @node Modes for various languages, Translating names to IP addresses, Emacs for VMS and DECwindows, Finding Emacs and related packages | 3699 @node Modes for various languages, , Emacs for VMS and DECwindows, Finding Emacs and related packages |
3875 @section Where can I get modes for Lex, Yacc/Bison, Bourne shell, csh, C@t{++}, Objective-C, Pascal, Java, and Awk? | 3700 @section Where can I get modes for Lex, Yacc/Bison, Bourne shell, csh, C@t{++}, Objective-C, Pascal, Java, and Awk? |
3876 @cindex Awk, mode for | 3701 @cindex Awk, mode for |
3877 @cindex @code{awk-mode} | 3702 @cindex @code{awk-mode} |
3878 @cindex Bison, mode for | 3703 @cindex Bison, mode for |
3879 @cindex Bourne Shell, mode for | 3704 @cindex Bourne Shell, mode for |
3887 @cindex @file{csh} mode | 3712 @cindex @file{csh} mode |
3888 @cindex @code{sh-mode} | 3713 @cindex @code{sh-mode} |
3889 @cindex @code{cc-mode} | 3714 @cindex @code{cc-mode} |
3890 | 3715 |
3891 Most of these modes are now available in standard Emacs distribution. | 3716 Most of these modes are now available in standard Emacs distribution. |
3892 To get additional modes, look in the Lisp Code Directory (@pxref{Finding | 3717 To get additional modes, see @ref{Finding a package with particular |
3893 a package with particular functionality}). For C@t{++}, if you use | 3718 functionality}. |
3894 @code{lisp-dir-apropos}, you must specify the pattern with something | |
3895 like @kbd{M-x lisp-dir-apropos @key{RET} c\+\+ @key{RET}}.@footnote{ | |
3896 The backslashes in @samp{\+\+} are required because @kbd{M-x | |
3897 lisp-dir-apropos} expects a regular expression as its argument | |
3898 (@pxref{Using regular expressions}), and @samp{+} has a special meaning | |
3899 in regular expressions.} | |
3900 | 3719 |
3901 Barry Warsaw's @code{cc-mode} now works for C, C@t{++}, Objective-C, and | 3720 Barry Warsaw's @code{cc-mode} now works for C, C@t{++}, Objective-C, and |
3902 Java code. You can get the latest version from the Emacs Lisp Archive; | 3721 Java code. It is distributed with Emacs, but has |
3903 @pxref{Packages that do not come with Emacs} for details. A FAQ for | 3722 @uref{http://cc-mode.sourceforge.net/, its own homepage}. |
3904 @code{cc-mode} is available at | |
3905 @uref{http://www.python.org/emacs/cc-mode/}. | |
3906 | |
3907 @node Translating names to IP addresses, , Modes for various languages, Finding Emacs and related packages | |
3908 @section What is the IP address of XXX.YYY.ZZZ? | |
3909 @cindex Translating names to IP addresses | |
3910 @cindex IP addresses from names | |
3911 @cindex Using BIND to translate addresses | |
3912 @cindex DNS and IP addresses | |
3913 | |
3914 If you are on a Unix machine, try using the @samp{nslookup} command, | |
3915 included in the Berkeley BIND package. For example, to find the IP | |
3916 address of @samp{ftp.gnu.org}, you would type @code{nslookup | |
3917 ftp.gnu.org}. | |
3918 | |
3919 Your computer should then provide the IP address of that machine. | |
3920 | |
3921 If your site's nameserver is deficient, you can use IP addresses to FTP | |
3922 files. You can get this information by e-mail: | |
3923 | |
3924 @example | |
3925 To: dns@@[134.214.84.25] (to grasp.insa-lyon.fr) | |
3926 Body: ip XXX.YYY.ZZZ (or "help" for more information | |
3927 and options - no quotes) | |
3928 @end example | |
3929 | |
3930 @noindent | |
3931 or: | |
3932 | |
3933 @example | |
3934 To: resolve@@[147.31.254.130] (to laverne.cs.widener.edu) | |
3935 Body: site XXX.YYY.ZZZ | |
3936 @end example | |
3937 | 3723 |
3938 @c ------------------------------------------------------------ | 3724 @c ------------------------------------------------------------ |
3939 @node Major packages and programs, Key bindings, Finding Emacs and related packages, Top | 3725 @node Major packages and programs, Key bindings, Finding Emacs and related packages, Top |
3940 @chapter Major packages and programs | 3726 @chapter Major packages and programs |
3941 @cindex Major packages and programs | 3727 @cindex Major packages and programs |
3943 @menu | 3729 @menu |
3944 * VM:: | 3730 * VM:: |
3945 * Supercite:: | 3731 * Supercite:: |
3946 * Calc:: | 3732 * Calc:: |
3947 * VIPER:: | 3733 * VIPER:: |
3948 * AUC-TeX:: | 3734 * AUCTeX:: |
3949 * BBDB:: | 3735 * BBDB:: |
3950 * Ispell:: | 3736 * Ispell:: |
3951 * w3-mode:: | 3737 * w3-mode:: |
3952 * EDB:: | 3738 * EDB:: |
3953 * Mailcrypt:: | 3739 * Mailcrypt:: |
3963 @cindex E-mail reader, VM | 3749 @cindex E-mail reader, VM |
3964 | 3750 |
3965 @table @b | 3751 @table @b |
3966 | 3752 |
3967 @item Author | 3753 @item Author |
3968 @email{kyle@@uunet.uu.net, Kyle Jones} | 3754 @email{kyle_jones@@wonderworks.com, Kyle Jones} |
3969 | 3755 |
3970 @item Latest version | 3756 @item Latest version |
3971 6.72 | 3757 7.15 |
3972 | 3758 |
3973 @item Distribution | 3759 @item Distribution |
3974 @uref{ftp://ftp.wonderworks.com/pub/vm/vm.tar.gz} | 3760 @uref{ftp://ftp.wonderworks.com/pub/vm/vm.tar.gz} |
3975 | 3761 |
3976 @item Informational newsgroup/mailing list | 3762 @item Informational newsgroup |
3977 @uref{news:gnu.emacs.vm.info}@* | 3763 @uref{news:gnu.emacs.vm.info}@* |
3978 Subscription requests to @email{info-vm-request@@uunet.uu.net}@* | 3764 |
3979 Submissions to @email{info-vm@@uunet.uu.net} | 3765 @item Bug reports newsgroup |
3980 | |
3981 @item Bug reports newsgroup/mailing list | |
3982 @uref{news:gnu.emacs.vm.bug}@* | 3766 @uref{news:gnu.emacs.vm.bug}@* |
3983 Subscription requests to @email{bug-vm-request@@uunet.uu.net}@* | 3767 Or send reports to @email{bug-vm@@wonderworks.com} |
3984 Submissions to @email{bug-vm@@uunet.uu.net} | |
3985 @end table | 3768 @end table |
3986 | 3769 |
3987 VM 6 works with Emacs 20.4, and may cause problems with Emacs 20.3 and | 3770 VM 7 works well with Emacs 21. Older versions of VM suitable for use |
3988 below. (But note that many people seem to use Emacs 20.3 with VM 6, | 3771 with older versions of Emacs are available from |
3989 without any problems.) Risk-averse users might wish to try VM 5.97, | 3772 @uref{ftp://ftp.wonderworks.com/pub/vm/, the same FTP site}. |
3990 available from @uref{ftp://ftp.wonderworks.com/pub/vm/, the same FTP | 3773 |
3991 site}. | |
3992 | 3774 |
3993 @node Supercite, Calc, VM, Major packages and programs | 3775 @node Supercite, Calc, VM, Major packages and programs |
3994 @section Supercite --- mail and news citation package within Emacs | 3776 @section Supercite --- mail and news citation package within Emacs |
3995 @cindex Supercite | 3777 @cindex Supercite |
3996 @cindex Superyank | 3778 @cindex Superyank |
3999 @cindex Citations in mail and news | 3781 @cindex Citations in mail and news |
4000 | 3782 |
4001 @table @b | 3783 @table @b |
4002 | 3784 |
4003 @item Author | 3785 @item Author |
4004 @email{bwarsaw@@cen.com, Barry Warsaw} | 3786 @email{barry@@python.org, Barry Warsaw} |
4005 | 3787 |
4006 @item Latest version | 3788 @item Latest version |
4007 3.54 (comes bundled with Emacs 20) | 3789 3.54 (comes bundled with Emacs since version 20) |
4008 | 3790 |
4009 @item Distribution | 3791 @item Distribution |
4010 @uref{http://www.python.org/emacs/supercite.tar.gz} | 3792 @uref{http://www.python.org/emacs/supercite.tar.gz} |
4011 | 3793 |
4012 @item Mailing list | 3794 @item Mailing list |
4027 | 3809 |
4028 @item Author | 3810 @item Author |
4029 @email{daveg@@csvax.cs.caltech.edu, Dave Gillespie} | 3811 @email{daveg@@csvax.cs.caltech.edu, Dave Gillespie} |
4030 | 3812 |
4031 @item Latest version | 3813 @item Latest version |
4032 2.02f | 3814 2.1 (part of Emacs since version 22.1) |
4033 | 3815 |
4034 @item Distribution | 3816 @item Distribution |
4035 @uref{ftp://ftp.gnu.org/pub/gnu/calc/calc-2.02f.tar.gz} | 3817 No separate distribution outside of Emacs. Older versions |
3818 are available at @uref{ftp://ftp.gnu.org/pub/gnu/calc/}. | |
4036 | 3819 |
4037 @end table | 3820 @end table |
4038 | 3821 |
4039 Note that Calc 2.02f needs patching to work with Emacs 21 and later. | 3822 Note that Calc 2.02f needs patching to work with Emacs 21 and later. |
4040 | 3823 |
4042 Emacs 21.1 and later comes with a package called @file{calculator.el}. | 3825 Emacs 21.1 and later comes with a package called @file{calculator.el}. |
4043 It doesn't support all the mathematical wizardry offered by Calc, such | 3826 It doesn't support all the mathematical wizardry offered by Calc, such |
4044 as matrices, special functions, and statistics, but is more than | 3827 as matrices, special functions, and statistics, but is more than |
4045 adequate as a replacement for @code{xcalc} and similar programs. | 3828 adequate as a replacement for @code{xcalc} and similar programs. |
4046 | 3829 |
4047 @node VIPER, AUC-TeX, Calc, Major packages and programs | 3830 @node VIPER, AUCTeX, Calc, Major packages and programs |
4048 @section VIPER --- @code{vi} emulation for Emacs | 3831 @section VIPER --- @code{vi} emulation for Emacs |
4049 @cindex @code{vi} emulation | 3832 @cindex @code{vi} emulation |
4050 @cindex VIPER | 3833 @cindex VIPER |
4051 @cindex Emulation of @code{vi} | 3834 @cindex Emulation of @code{vi} |
4052 | 3835 |
4069 @item Distribution | 3852 @item Distribution |
4070 @uref{ftp://archive.cis.ohio-state.edu/pub/emacs-lisp/old-archive/modes/vip-mode.tar.Z} | 3853 @uref{ftp://archive.cis.ohio-state.edu/pub/emacs-lisp/old-archive/modes/vip-mode.tar.Z} |
4071 | 3854 |
4072 @end table | 3855 @end table |
4073 | 3856 |
4074 @node AUC-TeX, BBDB, VIPER, Major packages and programs | 3857 @node AUCTeX, BBDB, VIPER, Major packages and programs |
4075 @section AUC TeX --- enhanced LaTeX mode with debugging facilities | 3858 @section AUC@TeX{} --- enhanced @TeX{} modes with debugging facilities |
4076 @cindex Mode for @TeX{} | 3859 @cindex Mode for @TeX{} |
4077 @cindex @TeX{} mode | 3860 @cindex @TeX{} mode |
4078 @cindex AUC-TeX mode for editing @TeX{} | 3861 @cindex AUC@TeX{} mode for editing @TeX{} |
4079 @cindex Writing and debugging @TeX{} | 3862 @cindex Writing and debugging @TeX{} |
4080 | 3863 |
3864 AUC@TeX{} is a set of sophisticated major modes for @TeX{}, LaTeX, | |
3865 ConTeXt, and Texinfo offering context-sensitive syntax highlighting, | |
3866 indentation, formatting and folding, macro completion, @TeX{} shell | |
3867 functionality, and debugging. Be also sure to check out | |
3868 @ref{Introduction, RefTeX, Introduction, reftex, Ref@TeX{} User Manual}. | |
3869 Current versions of AUC@TeX{} include the | |
3870 @uref{http://www.gnu.org/software/auctex/preview-latex,preview-latex} | |
3871 package for WYSIWYG previews of various LaTeX constructs in the Emacs | |
3872 source buffer. | |
3873 | |
4081 @table @b | 3874 @table @b |
4082 | 3875 |
4083 @item Authors | 3876 @item Authors |
4084 @email{krab@@iesd.auc.dk, Kresten Krab Thorup} and@* | 3877 @email{krab@@iesd.auc.dk, Kresten Krab Thorup}, @* |
4085 @email{abraham@@dina.kvl.dk, Per Abrahamsen} | 3878 @email{abraham@@dina.kvl.dk, Per Abrahamsen}, @* and others. |
3879 | |
3880 @item Maintainer | |
3881 @email{dak@@gnu.org, David Kastrup} | |
4086 | 3882 |
4087 @item Latest version | 3883 @item Latest version |
4088 9.9p | 3884 11.82 |
4089 | 3885 |
4090 @item Distribution | 3886 @item Distribution |
4091 @uref{ftp://sunsite.auc.dk/packages/auctex/auctex.tar.gz} | 3887 @uref{ftp://ftp.gnu.org/pub/gnu/auctex/} |
4092 | 3888 |
4093 @item Web site | 3889 @item Web site |
4094 @uref{http://sunsite.auc.dk/auctex/} | 3890 @uref{http://www.gnu.org/software/auctex/} |
4095 | 3891 |
4096 @item Mailing list: | 3892 @item Mailing list: |
4097 Subscription requests to @email{auc-tex-request@@iesd.auc.dk}@* | 3893 Subscription requests to @email{auctex-request@@gnu.org}@* |
4098 Submissions to @email{auc-tex@@iesd.auc.dk}@* | 3894 Submissions to @email{auctex@@gnu.org} |
4099 Development team is at @email{auc-tex_mgr@@iesd.auc.dk} | |
4100 | 3895 |
4101 @end table | 3896 @end table |
4102 | 3897 |
4103 @node BBDB, Ispell, AUC-TeX, Major packages and programs | 3898 @node BBDB, Ispell, AUCTeX, Major packages and programs |
4104 @section BBDB --- personal Info Rolodex integrated with mail/news readers | 3899 @section BBDB --- personal Info Rolodex integrated with mail/news readers |
4105 @cindex BBDB | 3900 @cindex BBDB |
4106 @cindex Rolodex-like functionality | 3901 @cindex Rolodex-like functionality |
4107 @cindex Integrated contact database | 3902 @cindex Integrated contact database |
4108 @cindex Contact database | 3903 @cindex Contact database |
4110 @cindex Address book | 3905 @cindex Address book |
4111 | 3906 |
4112 @table @b | 3907 @table @b |
4113 | 3908 |
4114 @item Maintainer | 3909 @item Maintainer |
4115 @email{simmonmt@@acm.org, Matt Simmons} | 3910 @email{waider@@waider.ie, Ronan Waide} |
4116 | 3911 |
4117 @item Latest version | 3912 @item Latest version |
4118 2.00 | 3913 2.34 |
4119 | 3914 |
4120 @item Distribution | 3915 @item Distribution |
4121 @uref{http://bbdb.sf.net/} | 3916 @uref{http://bbdb.sourceforge.net/} |
4122 | 3917 |
4123 @item Mailing lists | 3918 @item Mailing lists |
4124 Subscription requests to @email{info-bbdb-request@@xemacs.org}@* | 3919 Subscription requests to @email{bbdb-info-request@@lists.sourceforge.net}@* |
4125 Submissions to @email{info-bbdb@@xemacs.org}@* | 3920 Submissions to @email{bbdb-info@@lists.sourceforge.net}@* |
4126 Release announcements: @email{bbdb-announce-request@@xemacs.org} | 3921 Release announcements: @email{bbdb-announce-request@@lists.sourceforge.net} |
4127 | 3922 |
4128 @end table | 3923 @end table |
4129 | 3924 |
4130 @node Ispell, w3-mode, BBDB, Major packages and programs | 3925 @node Ispell, w3-mode, BBDB, Major packages and programs |
4131 @section Ispell --- spell checker in C with interface for Emacs | 3926 @section Ispell --- spell checker in C with interface for Emacs |
4218 @item Authors | 4013 @item Authors |
4219 @email{patl@@lcs.mit.edu, Patrick J. LoPresti} and | 4014 @email{patl@@lcs.mit.edu, Patrick J. LoPresti} and |
4220 @email{jin@@atype.com, Jin S. Choi} | 4015 @email{jin@@atype.com, Jin S. Choi} |
4221 | 4016 |
4222 @item Maintainer | 4017 @item Maintainer |
4223 @email{lbudney@@pobox.com, Len Budney} | 4018 @email{warner-mailcrypt@@lothar.com, Brian Warner} |
4224 | 4019 |
4225 @item Latest version | 4020 @item Latest version |
4226 3.5.3 | 4021 3.5.8 |
4227 | 4022 |
4228 @item Distribution | 4023 @item Distribution |
4229 @uref{http://www.nb.net/~lbudney/linux/software/mailcrypt/mailcrypt-3.5.3.tar.gz} | 4024 @uref{http://dl.sourceforge.net/sourceforge/mailcrypt/mailcrypt-3.5.8.tar.gz} |
4230 | 4025 |
4231 @item Web site | 4026 @item Web site |
4232 @uref{http://www.nb.net/~lbudney/linux/software/mailcrypt.html} | 4027 @uref{http://mailcrypt.sourceforge.net/} |
4233 | 4028 |
4234 @end table | 4029 @end table |
4235 | 4030 |
4236 @node JDE, Patch, Mailcrypt, Major packages and programs | 4031 @node JDE, Patch, Mailcrypt, Major packages and programs |
4237 @section JDE --- Integrated development environment for Java | 4032 @section JDE --- Integrated development environment for Java |
4254 @uref{http://sunsite.auc.dk/jde/} | 4049 @uref{http://sunsite.auc.dk/jde/} |
4255 | 4050 |
4256 @end table | 4051 @end table |
4257 | 4052 |
4258 @node Patch, , JDE, Major packages and programs | 4053 @node Patch, , JDE, Major packages and programs |
4259 @section Patch --- program to apply "diffs" for updating files | 4054 @section Patch --- program to apply ``diffs'' for updating files |
4260 @cindex Updating files with diffs | 4055 @cindex Updating files with diffs |
4261 @cindex Patching source files with diffs | 4056 @cindex Patching source files with diffs |
4262 @cindex Diffs and patching | 4057 @cindex Diffs and patching |
4263 @cindex @file{patch} | 4058 @cindex @file{patch} |
4264 | 4059 |
4297 * No Escape key:: | 4092 * No Escape key:: |
4298 * Compose Character:: | 4093 * Compose Character:: |
4299 * Binding combinations of modifiers and function keys:: | 4094 * Binding combinations of modifiers and function keys:: |
4300 * Meta key does not work in xterm:: | 4095 * Meta key does not work in xterm:: |
4301 * ExtendChar key does not work as Meta:: | 4096 * ExtendChar key does not work as Meta:: |
4097 * SPC no longer completes file names:: | |
4302 @end menu | 4098 @end menu |
4303 | 4099 |
4304 @node Binding keys to commands, Invalid prefix characters, Key bindings, Key bindings | 4100 @node Binding keys to commands, Invalid prefix characters, Key bindings, Key bindings |
4305 @section How do I bind keys (including function keys) to commands? | 4101 @section How do I bind keys (including function keys) to commands? |
4306 @cindex Binding keys to commands | 4102 @cindex Binding keys to commands |
4314 To bind a key just in the current major mode, type @kbd{M-x | 4110 To bind a key just in the current major mode, type @kbd{M-x |
4315 local-set-key @key{RET} @var{key} @var{cmd} @key{RET}}. | 4111 local-set-key @key{RET} @var{key} @var{cmd} @key{RET}}. |
4316 | 4112 |
4317 @inforef{Key Bindings, Key Bindings, emacs}, for further details. | 4113 @inforef{Key Bindings, Key Bindings, emacs}, for further details. |
4318 | 4114 |
4319 To make the process of binding keys interactively eaiser, use the | 4115 To make the process of binding keys interactively easier, use the |
4320 following ``trick'': First bind the key interactively, then immediately | 4116 following ``trick'': First bind the key interactively, then immediately |
4321 type @kbd{C-x @key{ESC} @key{ESC} C-a C-k C-g}. Now, the command needed | 4117 type @kbd{C-x @key{ESC} @key{ESC} C-a C-k C-g}. Now, the command needed |
4322 to bind the key is in the kill ring, and can be yanked into your | 4118 to bind the key is in the kill ring, and can be yanked into your |
4323 @file{.emacs} file. If the key binding is global, no changes to the | 4119 @file{.emacs} file. If the key binding is global, no changes to the |
4324 command are required. For example, | 4120 command are required. For example, |
4327 (global-set-key (quote [f1]) (quote help-for-help)) | 4123 (global-set-key (quote [f1]) (quote help-for-help)) |
4328 @end lisp | 4124 @end lisp |
4329 | 4125 |
4330 @noindent | 4126 @noindent |
4331 can be placed directly into the @file{.emacs} file. If the key binding is | 4127 can be placed directly into the @file{.emacs} file. If the key binding is |
4332 local, the command is used in conjunction with the "add-hook" command. | 4128 local, the command is used in conjunction with the @samp{add-hook} function. |
4333 For example, in tex-mode, a local binding might be | 4129 For example, in TeX mode, a local binding might be |
4334 | 4130 |
4335 @lisp | 4131 @lisp |
4336 (add-hook 'tex-mode-hook | 4132 (add-hook 'tex-mode-hook |
4337 (lambda () | 4133 (lambda () |
4338 (local-set-key (quote [f1]) (quote help-for-help)))) | 4134 (local-set-key (quote [f1]) (quote help-for-help)))) |
4367 @end lisp | 4163 @end lisp |
4368 | 4164 |
4369 @end itemize | 4165 @end itemize |
4370 | 4166 |
4371 @node Invalid prefix characters, Terminal setup code works after Emacs has begun, Binding keys to commands, Key bindings | 4167 @node Invalid prefix characters, Terminal setup code works after Emacs has begun, Binding keys to commands, Key bindings |
4372 @section Why does Emacs say "Key sequence XXX uses invalid prefix characters"? | 4168 @section Why does Emacs say @samp{Key sequence XXX uses invalid prefix characters}? |
4373 @cindex Prefix characters, invalid | 4169 @cindex Prefix characters, invalid |
4374 @cindex Invalid prefix characters | 4170 @cindex Invalid prefix characters |
4375 @cindex Misspecified key sequences | 4171 @cindex Misspecified key sequences |
4376 | 4172 |
4377 Usually, one of two things has happened. In one case, the control | 4173 Usually, one of two things has happened. In one case, the control |
4612 @section Why does the @key{Backspace} key invoke help? | 4408 @section Why does the @key{Backspace} key invoke help? |
4613 @cindex Backspace key invokes help | 4409 @cindex Backspace key invokes help |
4614 @cindex Help invoked by Backspace | 4410 @cindex Help invoked by Backspace |
4615 @cindex DEL key does not delete | 4411 @cindex DEL key does not delete |
4616 | 4412 |
4617 The @key{Backspace} key (on most keyboards) generates ASCII code 8. | 4413 The @key{Backspace} key (on most keyboards) generates @acronym{ASCII} code 8. |
4618 @kbd{C-h} sends the same code. In Emacs by default @kbd{C-h} invokes | 4414 @kbd{C-h} sends the same code. In Emacs by default @kbd{C-h} invokes |
4619 help-command. This is intended to be easy to remember since the first | 4415 help-command. This is intended to be easy to remember since the first |
4620 letter of @samp{help} is @samp{h}. The easiest solution to this problem | 4416 letter of @samp{help} is @samp{h}. The easiest solution to this problem |
4621 is to use @kbd{C-h} (and @key{Backspace}) for help and @key{DEL} (the | 4417 is to use @kbd{C-h} (and @key{Backspace}) for help and @key{DEL} (the |
4622 @key{Delete} key) for deleting the previous character. | 4418 @key{Delete} key) for deleting the previous character. |
4732 @section How do I swap two keys? | 4528 @section How do I swap two keys? |
4733 @cindex Swapping keys | 4529 @cindex Swapping keys |
4734 @cindex Keys, swapping | 4530 @cindex Keys, swapping |
4735 @cindex @code{keyboard-translate} | 4531 @cindex @code{keyboard-translate} |
4736 | 4532 |
4737 In Emacs 19, you can swap two keys (or key sequences) by using the | 4533 You can swap two keys (or key sequences) by using the |
4738 @code{keyboard-translate} function. For example, to turn @kbd{C-h} into | 4534 @code{keyboard-translate} function. For example, to turn @kbd{C-h} |
4739 @key{DEL} and @key{DEL} to @kbd{C-h}, use | 4535 into @key{DEL} and @key{DEL} to @kbd{C-h}, use |
4740 | 4536 |
4741 @lisp | 4537 @lisp |
4742 (keyboard-translate ?\C-h ?\C-?) ; translate `C-h' to DEL | 4538 (keyboard-translate ?\C-h ?\C-?) ; translate `C-h' to DEL |
4743 (keyboard-translate ?\C-? ?\C-h) ; translate DEL to `C-h'. | 4539 (keyboard-translate ?\C-? ?\C-h) ; translate DEL to `C-h'. |
4744 @end lisp | 4540 @end lisp |
4745 | 4541 |
4746 @noindent | 4542 @noindent |
4747 The first key sequence of the pair after the function identifies what is | 4543 The first key sequence of the pair after the function identifies what is |
4748 produced by the keyboard; the second, what is matched for in the | 4544 produced by the keyboard; the second, what is matched for in the |
4749 keymaps. | 4545 keymaps. |
4546 | |
4547 However, in the specific case of @kbd{C-h} and @key{DEL}, you should | |
4548 toggle @code{normal-erase-is-backspace-mode} instead of calling | |
4549 @code{keyboard-translate}. @inforef{DEL Does Not Delete, DEL Does Not Delete, | |
4550 emacs}. | |
4750 | 4551 |
4751 Keyboard translations are not the same as key bindings in keymaps. | 4552 Keyboard translations are not the same as key bindings in keymaps. |
4752 Emacs contains numerous keymaps that apply in different situations, but | 4553 Emacs contains numerous keymaps that apply in different situations, but |
4753 there is only one set of keyboard translations, and it applies to every | 4554 there is only one set of keyboard translations, and it applies to every |
4754 character that Emacs reads from the terminal. Keyboard translations | 4555 character that Emacs reads from the terminal. Keyboard translations |
4755 take place at the lowest level of input processing; the keys that are | 4556 take place at the lowest level of input processing; the keys that are |
4756 looked up in keymaps contain the characters that result from keyboard | 4557 looked up in keymaps contain the characters that result from keyboard |
4757 translation. | 4558 translation. |
4758 | 4559 |
4759 @inforef{Keyboard Translations, Keyboard Translations, emacs}. | |
4760 | |
4761 @node Producing C-XXX with the keyboard, No Meta key, Swapping keys, Key bindings | 4560 @node Producing C-XXX with the keyboard, No Meta key, Swapping keys, Key bindings |
4762 @section How do I produce C-XXX with my keyboard? | 4561 @section How do I produce C-XXX with my keyboard? |
4763 @cindex Producing control characters | 4562 @cindex Producing control characters |
4764 @cindex Generating control characters | 4563 @cindex Generating control characters |
4765 @cindex Control characters, generating | 4564 @cindex Control characters, generating |
4766 | 4565 |
4767 On terminals (but not under X), some common "aliases" are: | 4566 On terminals (but not under X), some common ``aliases'' are: |
4768 | 4567 |
4769 @table @asis | 4568 @table @asis |
4770 | 4569 |
4771 @item @kbd{C-2} or @kbd{C-@key{SPC}} | 4570 @item @kbd{C-2} or @kbd{C-@key{SPC}} |
4772 @kbd{C-@@} | 4571 @kbd{C-@@} |
4810 @section What if I don't have an @key{Escape} key? | 4609 @section What if I don't have an @key{Escape} key? |
4811 @cindex No Escape key | 4610 @cindex No Escape key |
4812 @cindex Lacking an Escape key | 4611 @cindex Lacking an Escape key |
4813 @cindex Escape key, lacking | 4612 @cindex Escape key, lacking |
4814 | 4613 |
4815 Type @kbd{C-[} instead. This should send ASCII code 27 just like an | 4614 Type @kbd{C-[} instead. This should send @acronym{ASCII} code 27 just like an |
4816 Escape key would. @kbd{C-3} may also work on some terminal (but not | 4615 Escape key would. @kbd{C-3} may also work on some terminal (but not |
4817 under X). For many terminals (notably DEC terminals) @key{F11} | 4616 under X). For many terminals (notably DEC terminals) @key{F11} |
4818 generates @key{ESC}. If not, the following form can be used to bind it: | 4617 generates @key{ESC}. If not, the following form can be used to bind it: |
4819 | 4618 |
4820 @lisp | 4619 @lisp |
4862 @itemize @bullet | 4661 @itemize @bullet |
4863 | 4662 |
4864 @item | 4663 @item |
4865 Not all modifiers are permitted in all situations. @key{Hyper}, | 4664 Not all modifiers are permitted in all situations. @key{Hyper}, |
4866 @key{Super}, and @key{Alt} are not available on Unix character | 4665 @key{Super}, and @key{Alt} are not available on Unix character |
4867 terminals. Non-ASCII keys and mouse events (e.g. @kbd{C-=} and | 4666 terminals. Non-@acronym{ASCII} keys and mouse events (e.g. @kbd{C-=} and |
4868 @kbd{Mouse-1}) also fall under this category. | 4667 @kbd{Mouse-1}) also fall under this category. |
4869 | 4668 |
4870 @end itemize | 4669 @end itemize |
4871 | 4670 |
4872 @xref{Binding keys to commands}, for general key binding instructions. | 4671 @xref{Binding keys to commands}, for general key binding instructions. |
4892 @item | 4691 @item |
4893 For X11: Make sure it really is a @key{Meta} key. Use @code{xev} to | 4692 For X11: Make sure it really is a @key{Meta} key. Use @code{xev} to |
4894 find out what keysym your @key{Meta} key generates. It should be either | 4693 find out what keysym your @key{Meta} key generates. It should be either |
4895 @code{Meta_L} or @code{Meta_R}. If it isn't, use @file{xmodmap} to fix | 4694 @code{Meta_L} or @code{Meta_R}. If it isn't, use @file{xmodmap} to fix |
4896 the situation. If @key{Meta} does generate @code{Meta_L} or | 4695 the situation. If @key{Meta} does generate @code{Meta_L} or |
4897 @code{Meta_R}, but @kbd{M-x} produces a non-ASCII character, put this in | 4696 @code{Meta_R}, but @kbd{M-x} produces a non-@acronym{ASCII} character, put this in |
4898 your @file{~/.Xdefaults} file: | 4697 your @file{~/.Xdefaults} file: |
4899 | 4698 |
4900 @example | 4699 @example |
4901 XTerm*eightBitInput: false | 4700 XTerm*eightBitInput: false |
4902 XTerm*eightBitOutput: true | 4701 XTerm*eightBitOutput: true |
4940 @noindent | 4739 @noindent |
4941 You might have to replace @samp{Meta} with @samp{Alt}. | 4740 You might have to replace @samp{Meta} with @samp{Alt}. |
4942 | 4741 |
4943 @end itemize | 4742 @end itemize |
4944 | 4743 |
4945 @node ExtendChar key does not work as Meta, , Meta key does not work in xterm, Key bindings | 4744 @node ExtendChar key does not work as Meta, SPC no longer completes file names, Meta key does not work in xterm, Key bindings |
4946 @section Why doesn't my @key{ExtendChar} key work as a @key{Meta} key under HP-UX 8.0 and 9.x? | 4745 @section Why doesn't my @key{ExtendChar} key work as a @key{Meta} key under HP-UX 8.0 and 9.x? |
4947 @cindex @key{ExtendChar} key as @key{Meta} | 4746 @cindex @key{ExtendChar} key as @key{Meta} |
4948 @cindex @key{Meta}, using @key{ExtendChar} for | 4747 @cindex @key{Meta}, using @key{ExtendChar} for |
4949 @cindex HP-UX, the @key{ExtendChar} key | 4748 @cindex HP-UX, the @key{ExtendChar} key |
4950 | 4749 |
4963 @c solved? | 4762 @c solved? |
4964 | 4763 |
4965 This will disable the use of the extra keysyms systemwide, which may be | 4764 This will disable the use of the extra keysyms systemwide, which may be |
4966 undesirable if you actually intend to use them. | 4765 undesirable if you actually intend to use them. |
4967 | 4766 |
4767 @node SPC no longer completes file names, , ExtendChar key does not work as Meta, Key bindings | |
4768 @section Why doesn't SPC complete file names anymore? | |
4769 @cindex @kbd{SPC} file name completion | |
4770 | |
4771 Starting with Emacs 22.1, @kbd{SPC} no longer completes file names in | |
4772 the minibuffer, so that file names with embedded spaces could be typed | |
4773 without the need to quote the spaces. | |
4774 | |
4775 You can get the old behavior by binding @kbd{SPC} to | |
4776 @code{minibuffer-complete-word} in the minibuffer, as follows: | |
4777 | |
4778 @lisp | |
4779 (define-key minibuffer-local-filename-completion-map (kbd "SPC") | |
4780 'minibuffer-complete-word) | |
4781 | |
4782 (define-key minibuffer-local-must-match-filename-map (kbd "SPC") | |
4783 'minibuffer-complete-word) | |
4784 @end lisp | |
4785 | |
4968 @c ------------------------------------------------------------ | 4786 @c ------------------------------------------------------------ |
4969 @node Alternate character sets, Mail and news, Key bindings, Top | 4787 @node Alternate character sets, Mail and news, Key bindings, Top |
4970 @chapter Alternate character sets | 4788 @chapter Alternate character sets |
4971 @cindex Alternate character sets | 4789 @cindex Alternate character sets |
4972 | 4790 |
4985 @inforef{Single-Byte Character Support, Single-byte Character Set | 4803 @inforef{Single-Byte Character Support, Single-byte Character Set |
4986 Support, emacs}. On a Unix, when Emacs runs on a text-only terminal | 4804 Support, emacs}. On a Unix, when Emacs runs on a text-only terminal |
4987 display or is invoked with @samp{emacs -nw}, you typically need to use | 4805 display or is invoked with @samp{emacs -nw}, you typically need to use |
4988 @code{set-terminal-coding-system} to tell Emacs what the terminal can | 4806 @code{set-terminal-coding-system} to tell Emacs what the terminal can |
4989 display, even after setting the language environment; otherwise | 4807 display, even after setting the language environment; otherwise |
4990 non-ASCII characters will display as @samp{?}. On other operating | 4808 non-@acronym{ASCII} characters will display as @samp{?}. On other operating |
4991 systems, such as MS-DOS and MS-Windows, Emacs queries the OS about the | 4809 systems, such as MS-DOS and MS-Windows, Emacs queries the OS about the |
4992 character set supported by the display, and sets up the required | 4810 character set supported by the display, and sets up the required |
4993 terminal coding system automatically. | 4811 terminal coding system automatically. |
4994 | 4812 |
4995 @node Inputting eight-bit characters, Kanji and Chinese characters, Emacs does not display 8-bit characters, Alternate character sets | 4813 @node Inputting eight-bit characters, Kanji and Chinese characters, Emacs does not display 8-bit characters, Alternate character sets |
5265 @section How can I get my favorite Emacs mail package to support MIME? | 5083 @section How can I get my favorite Emacs mail package to support MIME? |
5266 @cindex MIME and Emacs mail packages | 5084 @cindex MIME and Emacs mail packages |
5267 @cindex Mail packages and MIME | 5085 @cindex Mail packages and MIME |
5268 @cindex FAQ for MIME and Emacs | 5086 @cindex FAQ for MIME and Emacs |
5269 | 5087 |
5270 Read the Emacs MIME FAQ, maintained by @email{trey@@cs.berkeley.edu, | |
5271 MacDonald Hall Jackson} at | |
5272 | |
5273 @uref{http://bmrc.berkeley.edu/~trey/emacs/mime.html} | |
5274 | |
5275 Version 6.x of VM supports MIME. @xref{VM}. Gnus supports MIME in mail | 5088 Version 6.x of VM supports MIME. @xref{VM}. Gnus supports MIME in mail |
5276 and news messages as of version 5.8.1 (Pterodactyl). Rmail has limited | 5089 and news messages as of version 5.8.1 (Pterodactyl). Rmail has limited |
5277 support for single-part MIME messages beginning with Emacs 20.3. | 5090 support for single-part MIME messages beginning with Emacs 20.3. |
5278 | 5091 |
5279 @node Automatically starting a mail or news reader, Reading news with Emacs, MIME with Emacs mail packages, Mail and news | 5092 @node Automatically starting a mail or news reader, Reading news with Emacs, MIME with Emacs mail packages, Mail and news |
5501 | 5314 |
5502 @node Learning more about Gnus, , Gnus hangs for a long time, Mail and news | 5315 @node Learning more about Gnus, , Gnus hangs for a long time, Mail and news |
5503 @section Where can I find out more about Gnus? | 5316 @section Where can I find out more about Gnus? |
5504 @cindex FAQ for Gnus | 5317 @cindex FAQ for Gnus |
5505 @cindex Gnus FAQ | 5318 @cindex Gnus FAQ |
5506 @cindex Learning more about GNU | 5319 @cindex Learning more about Gnus |
5507 | 5320 |
5508 Look for the Gnus FAQ, available at | 5321 For more information on Gnus, consult the Gnus manual and FAQ, which are |
5509 | 5322 part of the Gnus distribution. |
5510 @uref{http://www.ccs.neu.edu/software/contrib/gnus/} | |
5511 | 5323 |
5512 @node Concept index, , Mail and news, Top | 5324 @node Concept index, , Mail and news, Top |
5513 @unnumbered Concept Index | 5325 @unnumbered Concept Index |
5514 @printindex cp | 5326 @printindex cp |
5515 | 5327 |
5516 @contents | 5328 @contents |
5517 @bye | 5329 @bye |
5330 | |
5331 @ignore | |
5332 arch-tag: fee0d62d-06cf-43d8-ac21-123408eaf10f | |
5333 @end ignore |