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