comparison etc/TUTORIAL @ 207:e45d5e7c476e r20-4b2

Import from CVS: tag r20-4b2
author cvs
date Mon, 13 Aug 2007 10:03:52 +0200
parents 28f395d8dc7a
children 41ff10fd062f
comparison
equal deleted inserted replaced
206:d3e9274cbc4e 207:e45d5e7c476e
311 numeric argument to this command, it means "redraw the 311 numeric argument to this command, it means "redraw the
312 screen and put the current line that many lines from the 312 screen and put the current line that many lines from the
313 top of the screen." So C-u 0 C-l means "redraw the 313 top of the screen." So C-u 0 C-l means "redraw the
314 screen, putting the current line at the top.") 314 screen, putting the current line at the top.")
315 315
316 >> Type Control-h k Control-f. 316 >> Type Control-x 2
317 See how this window shrinks, while a new one appears 317 See how this window shrinks, while a new one appears
318 to display documentation on the Control-f command. 318 to display contents of this buffer.
319 319
320 >> Type C-x 1 and see the documentation listing window disappear. 320 >> Type C-x 1 and see the new window disappear.
321 321
322 322
323 * INSERTING AND DELETING 323 * INSERTING AND DELETING
324 ------------------------ 324 ------------------------
325 325
760 If Emacs sees that you are typing commands slowly it shows them to you 760 If Emacs sees that you are typing commands slowly it shows them to you
761 at the bottom of the screen in an area called the "echo area." The echo 761 at the bottom of the screen in an area called the "echo area." The echo
762 area contains the bottom line of the screen. 762 area contains the bottom line of the screen.
763 763
764 764
765 * MODE LINE 765 * MODELINE
766 ----------- 766 -----------
767 767
768 The line immediately above the echo area it is called the "mode line". 768 The line immediately above the echo area it is called the "modeline".
769 The mode line says something like this: 769 The mode line says something like this:
770 770
771 --**-XEmacs: TUTORIAL (Fundamental)--L670--58%---------------- 771 --**-XEmacs: TUTORIAL (Fundamental)--L670--58%----------------
772 772
773 This line gives useful information about the status of Emacs and 773 This line gives useful information about the status of Emacs and
818 818
819 To view documentation on your current major mode, type C-h m. 819 To view documentation on your current major mode, type C-h m.
820 820
821 >> Use C-u C-v once or more to bring this line near the top of screen. 821 >> Use C-u C-v once or more to bring this line near the top of screen.
822 >> Type C-h m, to see how Text mode differs from Fundamental mode. 822 >> Type C-h m, to see how Text mode differs from Fundamental mode.
823 >> Type C-x 1 to remove the documentation from the screen. 823 >> Type q to remove the documentation from the screen.
824 824
825 Major modes are called major because there are also minor modes. 825 Major modes are called major because there are also minor modes.
826 Minor modes are alternatives not to the major modes, just minor 826 Minor modes are alternatives not to the major modes, just minor
827 modifications of them. Each minor mode can be turned on or off by 827 modifications of them. Each minor mode can be turned on or off by
828 itself, independent of all other minor modes, and independent of your 828 itself, independent of all other minor modes, and independent of your
877 for reverse search. BUT WAIT! Don't try them now. 877 for reverse search. BUT WAIT! Don't try them now.
878 878
879 When you type C-s you'll notice that the string "I-search" appears as 879 When you type C-s you'll notice that the string "I-search" appears as
880 a prompt in the echo area. This tells you that Emacs is in what is 880 a prompt in the echo area. This tells you that Emacs is in what is
881 called an incremental search waiting for you to type the thing that 881 called an incremental search waiting for you to type the thing that
882 you want to search for. <RET> terminates a search. 882 you want to search for. <Return> terminates a search.
883 883
884 >> Now type C-s to start a search. SLOWLY, one letter at a time, 884 >> Now type C-s to start a search. SLOWLY, one letter at a time,
885 type the word 'cursor', pausing after you type each 885 type the word 'cursor', pausing after you type each
886 character to notice what happens to the cursor. 886 character to notice what happens to the cursor.
887 Now you have searched for "cursor", once. 887 Now you have searched for "cursor", once.
888 >> Type C-s again, to search for the next occurrence of "cursor". 888 >> Type C-s again, to search for the next occurrence of "cursor".
889 >> Now type <Delete> four times and see how the cursor moves. 889 >> Now type <Delete> four times and see how the cursor moves.
890 >> Type <RET> to terminate the search. 890 >> Type <RET> to terminate the search.
891 891
892 Did you see what happened? Emacs, in an incremental search, tries to 892 Did you see what happened? Emacs, in an incremental search, tries to
893 go to the occurrence of the string that you've typed out so far. To 893 go to the occurrence of the string that you've typed out so far,
894 go to the next occurrence of 'cursor' just type C-s again. If no such 894 highlighting it for your convenience. To go to the next occurrence of
895 occurrence exists Emacs beeps and tells you the search is currently 895 'cursor' just type C-s again. If no such occurrence exists Emacs
896 "failing", C-g would also terminate the search. 896 beeps and tells you the search is currently "failing", C-g would also
897 terminate the search.
897 898
898 NOTE: On some systems, typing C-s will freeze the screen and you will 899 NOTE: On some systems, typing C-s will freeze the screen and you will
899 see no further output from Emacs. This indicates that an operating 900 see no further output from Emacs. This indicates that an operating
900 system "feature" called "flow control" is intercepting the C-s and not 901 system "feature" called "flow control" is intercepting the C-s and not
901 letting it get through to Emacs. To unfreeze the screen, type C-q. 902 letting it get through to Emacs. To unfreeze the screen, type C-q.
1047 1048
1048 >> Type C-h k Control-p. 1049 >> Type C-h k Control-p.
1049 1050
1050 This displays the documentation of the function, as well as its 1051 This displays the documentation of the function, as well as its
1051 name, in an Emacs window. When you are finished reading the 1052 name, in an Emacs window. When you are finished reading the
1052 output, type C-x 1 to get rid of the help text. You do not have 1053 output, type q to get rid of the help text.
1053 to do this right away. You can do some editing while referring
1054 to the help text, and then type C-x 1.
1055 1054
1056 Here are some other useful C-h options: 1055 Here are some other useful C-h options:
1057 1056
1058 C-h f Describe a function. You type in the name of the 1057 C-h f Describe a function. You type in the name of the
1059 function. 1058 function.
1060 1059
1061 >> Try typing C-h f previous-line<Return>. 1060 >> Try typing C-h f previous-line<Return>.
1062 This prints all the information Emacs has about the 1061 This prints all the information Emacs has about the
1063 function which implements the C-p command. 1062 function which implements the C-p command.
1064 1063
1065 C-h a Command Apropos. Type in a keyword and Emacs will list 1064 C-h a Hyper Apropos. Type in a keyword and Emacs will list
1066 all the commands whose names contain that keyword. 1065 all the functions and variables whose names contain
1067 These commands can all be invoked with Meta-x. 1066 that keyword. The commands that can be invoked with
1068 For some commands, Command Apropos will also list a one 1067 Meta-x, an asterisk will be displayed to the left.
1069 or two character sequence which runs the same command. 1068
1070 1069 >> Type C-h a newline<Return>.
1071 >> Type C-h a file<Return>. 1070
1072 1071 This displays a list of all functions and variables with "newline" in
1073 This displays in another window a list of all M-x commands with "file" 1072 their names. Press <Return> or click the middle mouse button to find
1074 in their names. You will see character-commands like C-x C-f listed 1073 out more about a function or variable. Type `q' to exit hyper-apropos.
1075 beside the corresponding command names such as find-file.
1076
1077 >> Type C-M-v to scroll the help window. Do this a few times.
1078
1079 >> Type C-x 1 to delete the help window.
1080 1074
1081 1075
1082 * CONCLUSION 1076 * CONCLUSION
1083 ------------ 1077 ------------
1084 1078
1093 COPYING 1087 COPYING
1094 ------- 1088 -------
1095 1089
1096 This tutorial descends from a long line of Emacs tutorials 1090 This tutorial descends from a long line of Emacs tutorials
1097 starting with the one written by Stuart Cracraft for the original Emacs. 1091 starting with the one written by Stuart Cracraft for the original Emacs.
1098 Ben Wing updated the tutorial for X Windows. 1092 Ben Wing updated the tutorial for X Windows. Martin Buchholz and
1093 Hrvoje Niksic added more corrections for XEmacs.
1099 1094
1100 This version of the tutorial, like GNU Emacs, is copyrighted, and 1095 This version of the tutorial, like GNU Emacs, is copyrighted, and
1101 comes with permission to distribute copies on certain conditions: 1096 comes with permission to distribute copies on certain conditions:
1102 1097
1103 Copyright (c) 1985, 1996 Free Software Foundation 1098 Copyright (c) 1985, 1996 Free Software Foundation