Mercurial > emacs
annotate etc/survival.tex @ 72143:c72f78a4a1c1
*** empty log message ***
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Thu, 27 Jul 2006 12:17:38 +0000 |
parents | e8a3fb527b77 |
children | b0994ad32966 c5406394f567 |
rev | line source |
---|---|
31151 | 1 %&tex |
2 % | |
3 % Title: GNU Emacs Survival Card | |
4 % Author: Wlodek Bzyl <matwb@univ.gda.pl> | |
5 % | |
6 % $Revision: 1.8 $ | |
7 % $Date: 2000/05/05 22:00:48 $ | |
8 % | |
9 %**start of header | |
10 | |
11 % User interface is `plain.tex' and macros described below | |
12 % | |
13 % \title{CARD TITLE}{for version 21} | |
14 % \section{NAME} | |
15 % optional paragraphs separated with \askip amount of vertical space | |
16 % \key{KEY-NAME} description of key or | |
17 % \mkey{M-x LONG-LISP-NAME} description of Elisp function | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
18 % |
31151 | 19 % \kbd{ARG} -- argument is typed literally |
20 | |
21 \def\plainfmtname{plain} | |
22 \ifx\fmtname\plainfmtname | |
23 \else | |
24 \errmessage{This file requires `plain' format to be typeset correctly} | |
25 \endinput | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
26 \fi |
31151 | 27 |
68640
e8a3fb527b77
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
65088
diff
changeset
|
28 % Copyright (C) 2000, 2002, 2003, 2004, 2005, |
e8a3fb527b77
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
65088
diff
changeset
|
29 % 2006 Free Software Foundation, Inc. |
31151 | 30 |
31 % This file is part of GNU Emacs. | |
32 | |
33 % GNU Emacs is free software; you can redistribute it and/or modify | |
34 % it under the terms of the GNU General Public License as published by | |
35 % the Free Software Foundation; either version 2, or (at your option) | |
36 % any later version. | |
37 | |
38 % GNU Emacs is distributed in the hope that it will be useful, | |
39 % but WITHOUT ANY WARRANTY; without even the implied warranty of | |
40 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
41 % GNU General Public License for more details. | |
42 | |
43 % You should have received a copy of the GNU General Public License | |
44 % along with GNU Emacs; see the file COPYING. If not, write to | |
64083 | 45 % the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
46 % Boston, MA 02110-1301, USA. | |
31151 | 47 |
48 \def\versionnumber{1.0} | |
68640
e8a3fb527b77
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
65088
diff
changeset
|
49 \def\year{2006} |
31151 | 50 |
51 \def\copyrightnotice{\penalty-1\vfill | |
52 \vbox{\smallfont\baselineskip=0.8\baselineskip\raggedcenter | |
53 Copyright \year\ Free Software Foundation, Inc.\break | |
54 Version \versionnumber{} for GNU Emacs 21, April 2000\break | |
55 Project W{\l}odek Bzyl (matwb@univ.gda.pl) | |
56 | |
57 Permission is granted to make and distribute copies of | |
58 this card provided the copyright notice and this permission notice | |
59 are preserved on all copies.\par}} | |
60 | |
61 \hsize 3.2in | |
62 \vsize 7.95in | |
63 \font\titlefont=cmss10 scaled 1200 | |
64 \font\headingfont=cmss10 | |
65 \font\smallfont=cmr6 | |
66 \font\smallsy=cmsy6 | |
67 \font\eightrm=cmr8 | |
68 \font\eightbf=cmbx8 | |
69 \font\eightit=cmti8 | |
70 \font\eighttt=cmtt8 | |
71 \font\eightmi=cmmi8 | |
72 \font\eightsy=cmsy8 | |
73 \font\eightss=cmss8 | |
74 \textfont0=\eightrm | |
75 \textfont1=\eightmi | |
76 \textfont2=\eightsy | |
77 \def\rm{\eightrm} \rm | |
78 \def\bf{\eightbf} | |
79 \def\it{\eightit} | |
80 \def\tt{\eighttt} | |
81 \def\ss{\eightss} | |
82 \baselineskip=0.8\baselineskip | |
83 | |
84 \newdimen\intercolumnskip % horizontal space between columns | |
85 \intercolumnskip=0.5in | |
86 | |
87 % The TeXbook, p. 257 | |
88 \let\lr=L \newbox\leftcolumn | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
89 \output={\if L\lr |
31151 | 90 \global\setbox\leftcolumn\columnbox \global\let\lr=R |
91 \else | |
92 \doubleformat \global\let\lr=L\fi} | |
93 \def\doubleformat{\shipout\vbox{\makeheadline | |
94 \leftline{\box\leftcolumn\hskip\intercolumnskip\columnbox} | |
95 \makefootline} | |
96 \advancepageno} | |
97 \def\columnbox{\leftline{\pagebody}} | |
98 | |
99 \def\newcolumn{\vfil\eject} | |
100 | |
101 \def\bye{\par\vfil\supereject | |
102 \if R\lr \null\vfil\eject\fi | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
103 \end} |
31151 | 104 |
105 \outer\def\title#1#2{{\titlefont\centerline{#1}}\vskip 1ex plus 0.5ex | |
106 \centerline{\ss#2} | |
107 \vskip2\baselineskip} | |
108 | |
109 \outer\def\section#1{\filbreak | |
110 \bskip | |
111 \leftline{\headingfont #1} | |
112 \askip} | |
113 \def\bskip{\vskip 2.5ex plus 0.25ex } | |
114 \def\askip{\vskip 0.75ex plus 0.25ex} | |
115 | |
116 \newdimen\defwidth \defwidth=0.25\hsize | |
117 \def\hang{\hangindent\defwidth} | |
118 | |
119 \def\textindent#1{\noindent\llap{\hbox to \defwidth{\tt#1\hfil}}\ignorespaces} | |
120 \def\key{\par\hangafter=0\hang\textindent} | |
121 | |
122 \def\mtextindent#1{\noindent\hbox{\tt#1\quad}\ignorespaces} | |
123 \def\mkey{\par\hangafter=1\hang\mtextindent} | |
124 | |
125 \def\kbd#{\bgroup\tt \let\next= } | |
126 | |
127 \newdimen\raggedstretch | |
128 \newskip\raggedparfill \raggedparfill=0pt plus 1fil | |
129 \def\nohyphens | |
130 {\hyphenpenalty10000\exhyphenpenalty10000\pretolerance10000} | |
131 \def\raggedspaces | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
132 {\spaceskip=0.3333em\relax |
31151 | 133 \xspaceskip=0.5em\relax} |
134 \def\raggedright | |
135 {\raggedstretch=6em | |
136 \nohyphens | |
137 \rightskip=0pt plus \raggedstretch | |
138 \raggedspaces | |
139 \parfillskip=\raggedparfill | |
140 \relax} | |
141 \def\raggedcenter | |
142 {\raggedstretch=6em | |
143 \nohyphens | |
144 \rightskip=0pt plus \raggedstretch | |
145 \leftskip=\rightskip | |
146 \raggedspaces | |
147 \parfillskip=0pt | |
148 \relax} | |
149 | |
150 \chardef\\=`\\ | |
151 | |
152 \raggedright | |
153 \nopagenumbers | |
154 \parindent 0pt | |
155 \interlinepenalty=10000 | |
156 \hoffset -0.2in | |
157 %\voffset 0.2in | |
158 | |
159 %**end of header | |
160 | |
161 | |
162 \title{GNU\ \ Emacs\ \ Survival\ \ Card}{for version 21} | |
163 | |
164 In the following, \kbd{C-z} means hit the `\kbd{z}' key while | |
165 holding down the {\it Ctrl}\ \ key. \kbd{M-z} means hit the | |
166 `\kbd{z}' key while hitting the {\it Meta\/} (labeled {\it Alt\/} | |
167 on some keyboards) or after hitting {\it Esc\/} key. | |
168 | |
169 \section{Running Emacs} | |
170 | |
171 To enter GNU Emacs, just type its name: \kbd{emacs}. | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
172 Emacs divides the frame into several areas: |
31151 | 173 menu line, |
174 buffer area with the edited text, | |
175 mode line describing the buffer in the window above it, | |
176 and a minibuffer/echo area in the last line. | |
177 \askip | |
178 \key{C-x C-c} quit Emacs | |
179 \key{C-x C-f} edit file; this command uses the minibuffer to read | |
180 the file name; use this to create new files by entering the name | |
181 of the new file | |
182 \key{C-x C-s} save the file | |
183 \key{C-x k} kill a buffer | |
184 \key{C-g} in most context: cancel, stop, abort partially typed or | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
185 executing command |
31151 | 186 \key{C-x u} undo |
187 | |
188 \section{Moving About} | |
189 | |
190 \key{C-l} scroll current line to center of window | |
191 \key{C-x b} switch to another buffer | |
192 \key{M-<} move to beginning of buffer | |
193 \key{M->} move to end of buffer | |
194 \key{M-x goto-line} go to a given line number | |
195 | |
196 \section{Multiple Windows} | |
197 | |
198 \key{C-x 0} remove the current window from the display | |
199 \key{C-x 1} make active window the only window | |
200 \key{C-x 2} split window horizontally | |
201 \key{C-x 3} split window vertically | |
202 \key{C-x o} move to other window | |
203 | |
204 \section{Regions} | |
205 | |
206 Emacs defines a `region' as the space between the {\it mark\/} and | |
207 the {\it point}. A mark is set with \kbd{C-{\it space}}. | |
208 The point is at the cursor position. | |
209 \askip | |
210 \key{M-h} mark entire paragraph | |
211 \key{C-x h} mark entire buffer | |
212 | |
213 \section{Killing and Copying} | |
214 | |
215 \key{C-w} kill region | |
216 \key{M-w} copy region to kill-ring | |
217 \key{C-k} kill from the cursor all the way to the end of the line | |
218 \key{M-DEL} kill word | |
219 \key{C-y} yank back the last kill (\kbd{C-w C-y} combination could be | |
220 used to move text around) | |
221 \key{M-y} replace last yank with previous kill | |
222 | |
223 \section{Searching} | |
224 | |
225 \key{C-s} search for a string | |
226 \key{C-r} search for a string backwards | |
227 \key{RET} quit searching | |
228 \key{M-C-s} regular expression search | |
229 \key{M-C-r} reverse regular expression search | |
230 \askip | |
231 Use \kbd{C-s} or \kbd{C-r} again to repeat the search in either direction. | |
232 | |
233 \section{Tags} | |
234 | |
235 Tags tables files record locations of function and | |
236 procedure definitions, global variables, data types and anything | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
237 else convenient. To create a tags table file, type |
31151 | 238 `{\tt etags} {\it input\_files}' as a shell command. |
239 \askip | |
240 \key{M-.} find a definition | |
241 \key{C-u M-.} find next occurrence of definition | |
242 \key{M-*} pop back to where \kbd{M-.} was last invoked | |
243 \mkey{M-x tags-query-replace} run query-replace on all files | |
244 recorded in tags table | |
245 \key{M-,} continue last tags search or query-replace | |
246 | |
247 \section{Compiling} | |
248 | |
249 \key{M-x compile} compile code in active window | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
250 \key{C-c C-c} go to the next compiler error, when in |
31151 | 251 the compile window or |
252 \key{C-x `} when in the window with source code | |
253 | |
254 \section{Dired, the Directory Editor} | |
255 | |
256 \key{C-x d} invoke Dired | |
257 \key{d} flag this file for deletion | |
258 \key{\~{}} flag all backup files for deletion | |
259 \key{u} remove deletion flag | |
260 \key{x} delete the files flagged for deletion | |
261 \key{C} copy file | |
262 \key{g} update the Dired buffer | |
263 \key{f} visit the file described on the current line | |
264 \key{s} switch between alphabetical date/time order | |
265 | |
266 \section{Reading and Sending Mail} | |
267 | |
268 \key{M-x rmail} start reading mail | |
269 \key{q} quit reading mail | |
270 \key{h} show headers | |
271 \key{d} mark the current message for deletion | |
272 \key{x} remove all messages marked for deletion | |
273 | |
274 \key{C-x m} begin composing a message | |
275 \key{C-c C-c} send the message and switch to another buffer | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
276 \key{C-c C-f C-c} move to the `CC' header field, creating one |
31151 | 277 if there is none |
278 | |
279 \section{Miscellaneous} | |
280 | |
281 \key{M-q} fill paragraph | |
282 \key{M-/} expand previous word dynamically | |
283 \key{C-z} iconify (suspend) Emacs when running it under X or | |
284 shell, respectively | |
285 \mkey{M-x revert-buffer} replace the text being edited with the | |
286 text of the file on disk | |
287 | |
288 \section{Query Replace} | |
289 | |
290 \key{M-\%} interactively search and replace | |
291 \key{M-C-\%} using regular expressions | |
292 \askip | |
293 Valid responses in query-replace mode are | |
294 \askip | |
295 \key{SPC} replace this one, go on to next | |
296 \key{,} replace this one, don't move | |
297 \key{DEL} skip to next without replacing | |
298 \key{!} replace all remaining matches | |
299 \key{\^{}} back up to the previous match | |
300 \key{RET} exit query-replace | |
301 \key{C-r} enter recursive edit (\kbd{M-C-c} to exit) | |
302 | |
303 \section{Regular Expressions} | |
304 | |
305 \key{. {\rm(dot)}} any single character except a newline | |
306 \key{*} zero or more repeats | |
307 \key{+} one or more repeats | |
308 \key{?} zero or one repeat | |
309 \key{[$\ldots$]} denotes a class of character to match | |
310 \key{[\^{}$\ldots$]} negates the class | |
311 | |
312 \key{\\{\it c}} quote characters otherwise having a special | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
313 meaning in regular expressions |
31151 | 314 |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
315 \key{$\ldots$\\|$\ldots$\\|$\ldots$} matches one of |
31151 | 316 the alternatives (``or'') |
317 \key{\\( $\ldots$ \\)} groups a series of pattern elements to | |
318 a single element | |
319 \key{\\{\it n}} same text as {\it n\/}th group | |
320 | |
321 \key{\^{}} matches at line beginning | |
322 \key{\$} matches at line end | |
323 | |
324 \key{\\w} matches word-syntax character | |
325 \key{\\W} matches non-word-syntax character | |
326 \key{\\<} matches at word beginning | |
327 \key{\\>} matches at word end | |
328 \key{\\b} matches at word break | |
329 \key{\\B} matches at non-word break | |
330 | |
331 \section{Registers} | |
332 | |
333 \key{C-x r s} save region in register | |
334 \key{C-x r i} insert register contents into buffer | |
335 | |
336 \key{C-x r SPC} save value of point in register | |
337 \key{C-x r j} jump to point saved in register | |
338 | |
339 \section{Rectangles} | |
340 | |
341 \key{C-x r r} copy rectangle to register | |
342 \key{C-x r k} kill rectangle | |
343 \key{C-x r y} yank rectangle | |
344 \key{C-x r t} prefix each line with a string | |
345 | |
346 \key{C-x r o} open rectangle, shifting text right | |
347 \key{C-x r c} blank out rectangle | |
348 | |
349 \section{Shells} | |
350 | |
351 \key{M-x shell} start a shell within Emacs | |
352 \key{M-!} execute a shell command | |
353 \key{M-|} run a shell command on the region | |
354 \key{C-u M-|} filter region through a shell command | |
355 | |
356 \section{Spelling Check} | |
357 | |
358 \key{M-\$} check spelling of word at the cursor | |
359 \mkey{M-x ispell-region} check spelling of all words in region | |
360 \mkey{M-x ispell-buffer} check spelling of entire buffer | |
361 | |
362 \section{International Character Sets} | |
363 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
364 \key{C-x RET C-\\} select and activate input method for |
31151 | 365 the current buffer |
366 \key{C-\\} enable or disable input method | |
367 \mkey{M-x list-input-methods} show all input methods | |
368 \mkey{M-x set-language-environment} specify principal language | |
369 | |
370 \key{C-x RET c} set coding system for next command | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
371 \mkey{M-x find-file-literally} visit file with no conversion |
31151 | 372 of any kind |
373 | |
374 \mkey{M-x list-coding-systems} show all coding systems | |
375 \mkey{M-x prefer-coding-system} choose preferred coding system | |
376 | |
377 \section{Keyboard Macros} | |
378 | |
379 \key{C-x (} start defining a keyboard macro | |
380 \key{C-x )} end keyboard macro definition | |
381 \key{C-x e} execute last-defined keyboard macro | |
382 \key{C-u C-x (} append to last keyboard macro | |
383 \mkey{M-x name-last-kbd-macro} name last keyboard macro | |
384 | |
385 \section{Simple Customization} | |
386 | |
387 \key{M-x customize} customize variables and faces | |
388 | |
389 \section{Getting Help} | |
390 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
31151
diff
changeset
|
391 Emacs does command completion for you. Typing \kbd{M-x} |
31151 | 392 {\it tab\/} or {\it space\/} gives a list of Emacs commands. |
393 \askip | |
394 \key{C-h} Emacs help | |
395 \key{C-h t} run the Emacs tutorial | |
396 \key{C-h i} enter Info, the documentation browser | |
397 \key{C-h a} show commands matching a string (apropos) | |
398 \key{C-h k} display documentation of the function invoked by | |
399 keystroke | |
400 \askip | |
401 Emacs gets into different {\it modes}, each of which customizes | |
402 Emacs for editing text of a particular sort. The mode line | |
403 contains names of the current modes, in parentheses. | |
404 \askip | |
405 \key{C-h m} get mode-specific information | |
406 | |
407 \copyrightnotice | |
408 | |
409 \bye | |
410 | |
411 % Local variables: | |
412 % compile-command: "tex survival" | |
413 % End: | |
52401 | 414 |
415 % arch-tag: 4f9a0562-617b-4843-aee1-450c41d6b22c |