Mercurial > emacs
annotate etc/refcard.tex @ 70176:92dfa83b08e5 mh-e-doc-7_94
Release MH-E manual version 7.94.
* mh-e.texi (VERSION, EDITION, UPDATED, UPDATE-MONTH): Update for
release 7.94.
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Fri, 21 Apr 2006 22:36:37 +0000 |
parents | e8a3fb527b77 |
children | 46cec5e362d6 c5406394f567 |
rev | line source |
---|---|
64127
88b841a92534
Update `versionnumber' and `year'. Update Emacs's version to 22.
Lute Kamstra <lute@gnu.org>
parents:
64091
diff
changeset
|
1 % Reference Card for GNU Emacs version 22 on Unix systems |
25853 | 2 %**start of header |
3 \newcount\columnsperpage | |
57562
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
4 \newcount\letterpaper |
25853 | 5 |
6 % This file can be printed with 1, 2, or 3 columns per page (see below). | |
57562
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
7 % Specify how many you want here. |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
8 |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
9 \columnsperpage=3 |
25853 | 10 |
57562
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
11 % Set letterpapaer to 0 for A4 paper, 1 for letter (US) paper. Useful |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
12 % only when columnsperpage is 2 or 3. |
25853 | 13 |
57562
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
14 \letterpaper=1 |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
15 |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
16 % Nothing else needs to be changed below this line. |
65088
f05a048483cc
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64242
diff
changeset
|
17 % Copyright (C) 1987, 1993, 1996, 1997, 2002, 2003, 2004, |
68640
e8a3fb527b77
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
65088
diff
changeset
|
18 % 2005, 2006 Free Software Foundation, Inc. |
25853 | 19 |
20 % This file is part of GNU Emacs. | |
21 | |
22 % GNU Emacs is free software; you can redistribute it and/or modify | |
23 % it under the terms of the GNU General Public License as published by | |
24 % the Free Software Foundation; either version 2, or (at your option) | |
25 % any later version. | |
26 | |
27 % GNU Emacs is distributed in the hope that it will be useful, | |
28 % but WITHOUT ANY WARRANTY; without even the implied warranty of | |
29 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
30 % GNU General Public License for more details. | |
31 | |
32 % You should have received a copy of the GNU General Public License | |
33 % along with GNU Emacs; see the file COPYING. If not, write to | |
64091 | 34 % the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
35 % Boston, MA 02110-1301, USA. | |
25853 | 36 |
37 % This file is intended to be processed by plain TeX (TeX82). | |
38 % | |
39 % The final reference card has six columns, three on each side. | |
40 % This file can be used to produce it in any of three ways: | |
41 % 1 column per page | |
42 % produces six separate pages, each of which needs to be reduced to 80%. | |
43 % This gives the best resolution. | |
44 % 2 columns per page | |
45 % produces three already-reduced pages. | |
46 % You will still need to cut and paste. | |
47 % 3 columns per page | |
48 % produces two pages which must be printed sideways to make a | |
49 % ready-to-use 8.5 x 11 inch reference card. | |
50 % For this you need a dvi device driver that can print sideways. | |
51 % Which mode to use is controlled by setting \columnsperpage above. | |
52 % | |
57562
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
53 % To compile and print this document: |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
54 % tex refcard.tex |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
55 % dvips -t landscape refcard.dvi |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
56 % |
25853 | 57 % Author: |
58 % Stephen Gildea | |
39400
e69aa66ec7cc
Update Stephen Gildea's mail address.
Eli Zaretskii <eliz@gnu.org>
parents:
25853
diff
changeset
|
59 % Internet: gildea@stop.mail-abuse.org |
25853 | 60 % |
61 % Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik | |
62 % for their many good ideas. | |
63 | |
64 % If there were room, it would be nice to see a section on Dired. | |
65 | |
64127
88b841a92534
Update `versionnumber' and `year'. Update Emacs's version to 22.
Lute Kamstra <lute@gnu.org>
parents:
64091
diff
changeset
|
66 \def\versionnumber{2.3} |
68640
e8a3fb527b77
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
65088
diff
changeset
|
67 \def\year{2006} |
25853 | 68 |
69 \def\shortcopyrightnotice{\vskip 1ex plus 2 fill | |
70 \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. | |
71 Permissions on back. v\versionnumber}} | |
72 | |
73 \def\copyrightnotice{ | |
74 \vskip 1ex plus 2 fill\begingroup\small | |
75 \centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.} | |
64127
88b841a92534
Update `versionnumber' and `year'. Update Emacs's version to 22.
Lute Kamstra <lute@gnu.org>
parents:
64091
diff
changeset
|
76 \centerline{v\versionnumber{} for GNU Emacs version 22, \year} |
25853 | 77 \centerline{designed by Stephen Gildea} |
78 | |
79 Permission is granted to make and distribute copies of | |
80 this card provided the copyright notice and this permission notice | |
81 are preserved on all copies. | |
82 | |
83 For copies of the GNU Emacs manual, write to the Free Software | |
64083 | 84 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
25853 | 85 |
86 \endgroup} | |
87 | |
88 % make \bye not \outer so that the \def\bye in the \else clause below | |
89 % can be scanned without complaint. | |
90 \def\bye{\par\vfill\supereject\end} | |
91 | |
92 \newdimen\intercolumnskip %horizontal space between columns | |
93 \newbox\columna %boxes to hold columns already built | |
94 \newbox\columnb | |
95 | |
96 \def\ncolumns{\the\columnsperpage} | |
97 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
43258
diff
changeset
|
98 \message{[\ncolumns\space |
25853 | 99 column\if 1\ncolumns\else s\fi\space per page]} |
100 | |
101 \def\scaledmag#1{ scaled \magstep #1} | |
102 | |
103 % This multi-way format was designed by Stephen Gildea October 1986. | |
104 % Note that the 1-column format is fontfamily-independent. | |
105 \if 1\ncolumns %one-column format uses normal size | |
106 \hsize 4in | |
107 \vsize 10in | |
108 \voffset -.7in | |
109 \font\titlefont=\fontname\tenbf \scaledmag3 | |
110 \font\headingfont=\fontname\tenbf \scaledmag2 | |
111 \font\smallfont=\fontname\sevenrm | |
112 \font\smallsy=\fontname\sevensy | |
113 | |
114 \footline{\hss\folio} | |
115 \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}} | |
116 \else %2 or 3 columns uses prereduced size | |
117 \hsize 3.2in | |
57562
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
118 \if 1\the\letterpaper |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
119 \vsize 7.95in |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
120 \else |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
121 \vsize 7.65in |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
122 \fi |
25853 | 123 \hoffset -.75in |
124 \voffset -.745in | |
125 \font\titlefont=cmbx10 \scaledmag2 | |
126 \font\headingfont=cmbx10 \scaledmag1 | |
127 \font\smallfont=cmr6 | |
128 \font\smallsy=cmsy6 | |
129 \font\eightrm=cmr8 | |
130 \font\eightbf=cmbx8 | |
131 \font\eightit=cmti8 | |
132 \font\eighttt=cmtt8 | |
133 \font\eightmi=cmmi8 | |
134 \font\eightsy=cmsy8 | |
135 \textfont0=\eightrm | |
136 \textfont1=\eightmi | |
137 \textfont2=\eightsy | |
138 \def\rm{\eightrm} | |
139 \def\bf{\eightbf} | |
140 \def\it{\eightit} | |
141 \def\tt{\eighttt} | |
57562
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
142 \if 1\the\letterpaper |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
143 \normalbaselineskip=.8\normalbaselineskip |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
144 \else |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
145 \normalbaselineskip=.7\normalbaselineskip |
83e3c4a83bdf
Added new counter \letterpaper to control whether refcard should be
Stephen Eglen <stephen@gnu.org>
parents:
52401
diff
changeset
|
146 \fi |
25853 | 147 \normallineskip=.8\normallineskip |
148 \normallineskiplimit=.8\normallineskiplimit | |
149 \normalbaselines\rm %make definitions take effect | |
150 | |
151 \if 2\ncolumns | |
152 \let\maxcolumn=b | |
153 \footline{\hss\rm\folio\hss} | |
154 \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}} | |
155 \else \if 3\ncolumns | |
156 \let\maxcolumn=c | |
157 \nopagenumbers | |
158 \else | |
159 \errhelp{You must set \columnsperpage equal to 1, 2, or 3.} | |
160 \errmessage{Illegal number of columns per page} | |
161 \fi\fi | |
162 | |
163 \intercolumnskip=.46in | |
164 \def\abc{a} | |
165 \output={% %see The TeXbook page 257 | |
166 % This next line is useful when designing the layout. | |
167 %\immediate\write16{Column \folio\abc\space starts with \firstmark} | |
168 \if \maxcolumn\abc \multicolumnformat \global\def\abc{a} | |
169 \else\if a\abc | |
170 \global\setbox\columna\columnbox \global\def\abc{b} | |
171 %% in case we never use \columnb (two-column mode) | |
172 \global\setbox\columnb\hbox to -\intercolumnskip{} | |
173 \else | |
174 \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi} | |
175 \def\multicolumnformat{\shipout\vbox{\makeheadline | |
176 \hbox{\box\columna\hskip\intercolumnskip | |
177 \box\columnb\hskip\intercolumnskip\columnbox} | |
178 \makefootline}\advancepageno} | |
179 \def\columnbox{\leftline{\pagebody}} | |
180 | |
181 \def\bye{\par\vfill\supereject | |
182 \if a\abc \else\null\vfill\eject\fi | |
183 \if a\abc \else\null\vfill\eject\fi | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
43258
diff
changeset
|
184 \end} |
25853 | 185 \fi |
186 | |
187 % we won't be using math mode much, so redefine some of the characters | |
188 % we might want to talk about | |
189 \catcode`\^=12 | |
190 \catcode`\_=12 | |
191 | |
192 \chardef\\=`\\ | |
193 \chardef\{=`\{ | |
194 \chardef\}=`\} | |
195 | |
196 \hyphenation{mini-buf-fer} | |
197 | |
198 \parindent 0pt | |
199 \parskip 1ex plus .5ex minus .5ex | |
200 | |
201 \def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip} | |
202 | |
203 % newcolumn - force a new column. Use sparingly, probably only for | |
204 % the first column of a page, which should have a title anyway. | |
205 \outer\def\newcolumn{\vfill\eject} | |
206 | |
207 % title - page title. Argument is title text. | |
208 \outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex} | |
209 | |
210 % section - new major section. Argument is section name. | |
211 \outer\def\section#1{\par\filbreak | |
212 \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}% | |
213 \vskip 2ex plus 1ex minus 1.5ex} | |
214 | |
215 \newdimen\keyindent | |
216 | |
217 % beginindentedkeys...endindentedkeys - key definitions will be | |
218 % indented, but running text, typically used as headings to group | |
219 % definitions, will not. | |
220 \def\beginindentedkeys{\keyindent=1em} | |
221 \def\endindentedkeys{\keyindent=0em} | |
222 \endindentedkeys | |
223 | |
224 % paralign - begin paragraph containing an alignment. | |
225 % If an \halign is entered while in vertical mode, a parskip is never | |
226 % inserted. Using \paralign instead of \halign solves this problem. | |
227 \def\paralign{\vskip\parskip\halign} | |
228 | |
229 % \<...> - surrounds a variable name in a code example | |
230 \def\<#1>{{\it #1\/}} | |
231 | |
232 % kbd - argument is characters typed literally. Like the Texinfo command. | |
233 \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows | |
234 | |
235 % beginexample...endexample - surrounds literal text, such a code example. | |
236 % typeset in a typewriter font with line breaks preserved | |
237 \def\beginexample{\par\leavevmode\begingroup | |
238 \obeylines\obeyspaces\parskip0pt\tt} | |
239 {\obeyspaces\global\let =\ } | |
240 \def\endexample{\endgroup} | |
241 | |
242 % key - definition of a key. | |
243 % \key{description of key}{key-name} | |
244 % prints the description left-justified, and the key-name in a \kbd | |
245 % form near the right margin. | |
246 \def\key#1#2{\leavevmode\hbox to \hsize{\vtop | |
247 {\hsize=.75\hsize\rightskip=1em | |
248 \hskip\keyindent\relax#1}\kbd{#2}\hfil}} | |
249 | |
250 \newbox\metaxbox | |
251 \setbox\metaxbox\hbox{\kbd{M-x }} | |
252 \newdimen\metaxwidth | |
253 \metaxwidth=\wd\metaxbox | |
254 | |
255 % metax - definition of a M-x command. | |
256 % \metax{description of command}{M-x command-name} | |
257 % Tries to justify the beginning of the command name at the same place | |
258 % as \key starts the key name. (The "M-x " sticks out to the left.) | |
259 \def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize | |
260 {\hskip\keyindent\relax#1\hfil}% | |
261 \hskip -\metaxwidth minus 1fil | |
262 \kbd{#2}\hfil}} | |
263 | |
264 % threecol - like "key" but with two key names. | |
265 % for example, one for doing the action backward, and one for forward. | |
266 \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\hfil\quad | |
267 &\kbd{#3}\hfil\quad\cr} | |
268 | |
269 %**end of header | |
270 | |
271 | |
272 \title{GNU Emacs Reference Card} | |
273 | |
64127
88b841a92534
Update `versionnumber' and `year'. Update Emacs's version to 22.
Lute Kamstra <lute@gnu.org>
parents:
64091
diff
changeset
|
274 \centerline{(for version 22)} |
25853 | 275 |
276 \section{Starting Emacs} | |
277 | |
64127
88b841a92534
Update `versionnumber' and `year'. Update Emacs's version to 22.
Lute Kamstra <lute@gnu.org>
parents:
64091
diff
changeset
|
278 To enter GNU Emacs 22, just type its name: \kbd{emacs} |
25853 | 279 |
280 \section{Leaving Emacs} | |
281 | |
282 \key{suspend Emacs (or iconify it under X)}{C-z} | |
283 \key{exit Emacs permanently}{C-x C-c} | |
284 | |
285 \section{Files} | |
286 | |
287 \key{{\bf read} a file into Emacs}{C-x C-f} | |
288 \key{{\bf save} a file back to disk}{C-x C-s} | |
289 \key{save {\bf all} files}{C-x s} | |
290 \key{{\bf insert} contents of another file into this buffer}{C-x i} | |
291 \key{replace this file with the file you really want}{C-x C-v} | |
292 \key{write buffer to a specified file}{C-x C-w} | |
64242
0ee94ce27f45
(Files): Change description of `C-x C-q' from
Juri Linkov <juri@jurta.org>
parents:
64127
diff
changeset
|
293 \key{toggle read-only status of buffer}{C-x C-q} |
25853 | 294 |
295 \section{Getting Help} | |
296 | |
297 The help system is simple. Type \kbd{C-h} (or \kbd{F1}) and follow | |
298 the directions. If you are a first-time user, type \kbd{C-h t} for a | |
299 {\bf tutorial}. | |
300 | |
301 \key{remove help window}{C-x 1} | |
302 \key{scroll help window}{C-M-v} | |
303 | |
304 \key{apropos: show commands matching a string}{C-h a} | |
64242
0ee94ce27f45
(Files): Change description of `C-x C-q' from
Juri Linkov <juri@jurta.org>
parents:
64127
diff
changeset
|
305 \key{describe the function a key runs}{C-h k} |
25853 | 306 \key{describe a function}{C-h f} |
307 \key{get mode-specific information}{C-h m} | |
308 | |
309 \section{Error Recovery} | |
310 | |
311 \key{{\bf abort} partially typed or executing command}{C-g} | |
64242
0ee94ce27f45
(Files): Change description of `C-x C-q' from
Juri Linkov <juri@jurta.org>
parents:
64127
diff
changeset
|
312 \metax{{\bf recover} files lost by a system crash}{M-x recover-session} |
58347 | 313 \metax{{\bf undo} an unwanted change}{C-x u, C-_ {\rm or} C-/} |
25853 | 314 \metax{restore a buffer to its original contents}{M-x revert-buffer} |
315 \key{redraw garbaged screen}{C-l} | |
316 | |
317 \section{Incremental Search} | |
318 | |
319 \key{search forward}{C-s} | |
320 \key{search backward}{C-r} | |
321 \key{regular expression search}{C-M-s} | |
322 \key{reverse regular expression search}{C-M-r} | |
323 | |
324 \key{select previous search string}{M-p} | |
325 \key{select next later search string}{M-n} | |
326 \key{exit incremental search}{RET} | |
327 \key{undo effect of last character}{DEL} | |
328 \key{abort current search}{C-g} | |
329 | |
330 Use \kbd{C-s} or \kbd{C-r} again to repeat the search in either direction. | |
331 If Emacs is still searching, \kbd{C-g} cancels only the part not done. | |
332 | |
333 \shortcopyrightnotice | |
334 | |
335 \section{Motion} | |
336 | |
337 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr | |
338 \threecol{{\bf entity to move over}}{{\bf backward}}{{\bf forward}} | |
339 \threecol{character}{C-b}{C-f} | |
340 \threecol{word}{M-b}{M-f} | |
341 \threecol{line}{C-p}{C-n} | |
342 \threecol{go to line beginning (or end)}{C-a}{C-e} | |
343 \threecol{sentence}{M-a}{M-e} | |
344 \threecol{paragraph}{M-\{}{M-\}} | |
345 \threecol{page}{C-x [}{C-x ]} | |
346 \threecol{sexp}{C-M-b}{C-M-f} | |
347 \threecol{function}{C-M-a}{C-M-e} | |
348 \threecol{go to buffer beginning (or end)}{M-<}{M->} | |
349 } | |
350 | |
351 \key{scroll to next screen}{C-v} | |
352 \key{scroll to previous screen}{M-v} | |
353 \key{scroll left}{C-x <} | |
354 \key{scroll right}{C-x >} | |
355 \key{scroll current line to center of screen}{C-u C-l} | |
356 | |
357 \section{Killing and Deleting} | |
358 | |
359 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr | |
360 \threecol{{\bf entity to kill}}{{\bf backward}}{{\bf forward}} | |
361 \threecol{character (delete, not kill)}{DEL}{C-d} | |
362 \threecol{word}{M-DEL}{M-d} | |
363 \threecol{line (to end of)}{M-0 C-k}{C-k} | |
364 \threecol{sentence}{C-x DEL}{M-k} | |
365 \threecol{sexp}{M-- C-M-k}{C-M-k} | |
366 } | |
367 | |
368 \key{kill {\bf region}}{C-w} | |
369 \key{copy region to kill ring}{M-w} | |
370 \key{kill through next occurrence of {\it char}}{M-z {\it char}} | |
371 | |
372 \key{yank back last thing killed}{C-y} | |
373 \key{replace last yank with previous kill}{M-y} | |
374 | |
375 \section{Marking} | |
376 | |
377 \key{set mark here}{C-@ {\rm or} C-SPC} | |
378 \key{exchange point and mark}{C-x C-x} | |
379 | |
380 \key{set mark {\it arg\/} {\bf words} away}{M-@} | |
381 \key{mark {\bf paragraph}}{M-h} | |
382 \key{mark {\bf page}}{C-x C-p} | |
383 \key{mark {\bf sexp}}{C-M-@} | |
384 \key{mark {\bf function}}{C-M-h} | |
385 \key{mark entire {\bf buffer}}{C-x h} | |
386 | |
387 \section{Query Replace} | |
388 | |
389 \key{interactively replace a text string}{M-\%} | |
64127
88b841a92534
Update `versionnumber' and `year'. Update Emacs's version to 22.
Lute Kamstra <lute@gnu.org>
parents:
64091
diff
changeset
|
390 % query-replace-regexp is bound to C-M-% but that can't be typed on |
88b841a92534
Update `versionnumber' and `year'. Update Emacs's version to 22.
Lute Kamstra <lute@gnu.org>
parents:
64091
diff
changeset
|
391 % consoles. |
25853 | 392 \metax{using regular expressions}{M-x query-replace-regexp} |
393 | |
394 Valid responses in query-replace mode are | |
395 | |
396 \key{{\bf replace} this one, go on to next}{SPC} | |
397 \key{replace this one, don't move}{,} | |
398 \key{{\bf skip} to next without replacing}{DEL} | |
399 \key{replace all remaining matches}{!} | |
400 \key{{\bf back up} to the previous match}{^} | |
401 \key{{\bf exit} query-replace}{RET} | |
402 \key{enter recursive edit (\kbd{C-M-c} to exit)}{C-r} | |
403 | |
404 \section{Multiple Windows} | |
405 | |
64127
88b841a92534
Update `versionnumber' and `year'. Update Emacs's version to 22.
Lute Kamstra <lute@gnu.org>
parents:
64091
diff
changeset
|
406 When two commands are shown, the second is a similar command for a |
88b841a92534
Update `versionnumber' and `year'. Update Emacs's version to 22.
Lute Kamstra <lute@gnu.org>
parents:
64091
diff
changeset
|
407 frame instead of a window. |
25853 | 408 |
409 {\setbox0=\hbox{\kbd{0}}\advance\hsize by 0\wd0 | |
410 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr | |
64127
88b841a92534
Update `versionnumber' and `year'. Update Emacs's version to 22.
Lute Kamstra <lute@gnu.org>
parents:
64091
diff
changeset
|
411 \threecol{delete all other windows}{C-x 1\ \ \ \ }{C-x 5 1} |
25853 | 412 \threecol{split window, above and below}{C-x 2\ \ \ \ }{C-x 5 2} |
413 \threecol{delete this window}{C-x 0\ \ \ \ }{C-x 5 0} | |
414 }} | |
415 \key{split window, side by side}{C-x 3} | |
416 | |
417 \key{scroll other window}{C-M-v} | |
418 | |
419 {\setbox0=\hbox{\kbd{0}}\advance\hsize by 2\wd0 | |
420 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr | |
421 \threecol{switch cursor to another window}{C-x o}{C-x 5 o} | |
422 | |
423 \threecol{select buffer in other window}{C-x 4 b}{C-x 5 b} | |
424 \threecol{display buffer in other window}{C-x 4 C-o}{C-x 5 C-o} | |
425 \threecol{find file in other window}{C-x 4 f}{C-x 5 f} | |
426 \threecol{find file read-only in other window}{C-x 4 r}{C-x 5 r} | |
427 \threecol{run Dired in other window}{C-x 4 d}{C-x 5 d} | |
428 \threecol{find tag in other window}{C-x 4 .}{C-x 5 .} | |
429 }} | |
430 | |
431 \key{grow window taller}{C-x ^} | |
432 \key{shrink window narrower}{C-x \{} | |
433 \key{grow window wider}{C-x \}} | |
434 | |
435 \section{Formatting} | |
436 | |
437 \key{indent current {\bf line} (mode-dependent)}{TAB} | |
438 \key{indent {\bf region} (mode-dependent)}{C-M-\\} | |
439 \key{indent {\bf sexp} (mode-dependent)}{C-M-q} | |
440 \key{indent region rigidly {\it arg\/} columns}{C-x TAB} | |
441 | |
442 \key{insert newline after point}{C-o} | |
443 \key{move rest of line vertically down}{C-M-o} | |
444 \key{delete blank lines around point}{C-x C-o} | |
445 \key{join line with previous (with arg, next)}{M-^} | |
446 \key{delete all white space around point}{M-\\} | |
447 \key{put exactly one space at point}{M-SPC} | |
448 | |
449 \key{fill paragraph}{M-q} | |
450 \key{set fill column}{C-x f} | |
451 \key{set prefix each line starts with}{C-x .} | |
452 | |
64127
88b841a92534
Update `versionnumber' and `year'. Update Emacs's version to 22.
Lute Kamstra <lute@gnu.org>
parents:
64091
diff
changeset
|
453 \key{set face}{M-o} |
25853 | 454 |
455 \section{Case Change} | |
456 | |
457 \key{uppercase word}{M-u} | |
458 \key{lowercase word}{M-l} | |
459 \key{capitalize word}{M-c} | |
460 | |
461 \key{uppercase region}{C-x C-u} | |
462 \key{lowercase region}{C-x C-l} | |
463 | |
464 \section{The Minibuffer} | |
465 | |
466 The following keys are defined in the minibuffer. | |
467 | |
468 \key{complete as much as possible}{TAB} | |
469 \key{complete up to one word}{SPC} | |
470 \key{complete and execute}{RET} | |
471 \key{show possible completions}{?} | |
472 \key{fetch previous minibuffer input}{M-p} | |
473 \key{fetch later minibuffer input or default}{M-n} | |
474 \key{regexp search backward through history}{M-r} | |
475 \key{regexp search forward through history}{M-s} | |
476 \key{abort command}{C-g} | |
477 | |
478 Type \kbd{C-x ESC ESC} to edit and repeat the last command that used the | |
479 minibuffer. Type \kbd{F10} to activate the menu bar using the minibuffer. | |
480 | |
481 \newcolumn | |
482 \title{GNU Emacs Reference Card} | |
483 | |
484 \section{Buffers} | |
485 | |
486 \key{select another buffer}{C-x b} | |
487 \key{list all buffers}{C-x C-b} | |
488 \key{kill a buffer}{C-x k} | |
489 | |
490 \section{Transposing} | |
491 | |
492 \key{transpose {\bf characters}}{C-t} | |
493 \key{transpose {\bf words}}{M-t} | |
494 \key{transpose {\bf lines}}{C-x C-t} | |
495 \key{transpose {\bf sexps}}{C-M-t} | |
496 | |
497 \section{Spelling Check} | |
498 | |
499 \key{check spelling of current word}{M-\$} | |
500 \metax{check spelling of all words in region}{M-x ispell-region} | |
501 \metax{check spelling of entire buffer}{M-x ispell-buffer} | |
502 | |
503 \section{Tags} | |
504 | |
505 \key{find a tag (a definition)}{M-.} | |
506 \key{find next occurrence of tag}{C-u M-.} | |
507 \metax{specify a new tags file}{M-x visit-tags-table} | |
508 | |
509 \metax{regexp search on all files in tags table}{M-x tags-search} | |
510 \metax{run query-replace on all the files}{M-x tags-query-replace} | |
511 \key{continue last tags search or query-replace}{M-,} | |
512 | |
513 \section{Shells} | |
514 | |
515 \key{execute a shell command}{M-!} | |
516 \key{run a shell command on the region}{M-|} | |
517 \key{filter region through a shell command}{C-u M-|} | |
518 \key{start a shell in window \kbd{*shell*}}{M-x shell} | |
519 | |
520 \section{Rectangles} | |
521 | |
522 \key{copy rectangle to register}{C-x r r} | |
523 \key{kill rectangle}{C-x r k} | |
524 \key{yank rectangle}{C-x r y} | |
525 \key{open rectangle, shifting text right}{C-x r o} | |
526 \key{blank out rectangle}{C-x r c} | |
527 \key{prefix each line with a string}{C-x r t} | |
528 | |
529 \section{Abbrevs} | |
530 | |
531 \key{add global abbrev}{C-x a g} | |
532 \key{add mode-local abbrev}{C-x a l} | |
533 \key{add global expansion for this abbrev}{C-x a i g} | |
534 \key{add mode-local expansion for this abbrev}{C-x a i l} | |
535 \key{explicitly expand abbrev}{C-x a e} | |
536 | |
537 \key{expand previous word dynamically}{M-/} | |
538 | |
539 \section{Regular Expressions} | |
540 | |
541 \key{any single character except a newline}{. {\rm(dot)}} | |
542 \key{zero or more repeats}{*} | |
543 \key{one or more repeats}{+} | |
544 \key{zero or one repeat}{?} | |
545 \key{quote regular expression special character {\it c\/}}{\\{\it c}} | |
546 \key{alternative (``or'')}{\\|} | |
547 \key{grouping}{\\( {\rm$\ldots$} \\)} | |
548 \key{same text as {\it n\/}th group}{\\{\it n}} | |
549 \key{at word break}{\\b} | |
550 \key{not at word break}{\\B} | |
551 | |
552 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr | |
553 \threecol{{\bf entity}}{{\bf match start}}{{\bf match end}} | |
554 \threecol{line}{^}{\$} | |
555 \threecol{word}{\\<}{\\>} | |
556 \threecol{buffer}{\\`}{\\'} | |
557 | |
558 \threecol{{\bf class of characters}}{{\bf match these}}{{\bf match others}} | |
559 \threecol{explicit set}{[ {\rm$\ldots$} ]}{[^ {\rm$\ldots$} ]} | |
560 \threecol{word-syntax character}{\\w}{\\W} | |
561 \threecol{character with syntax {\it c}}{\\s{\it c}}{\\S{\it c}} | |
562 } | |
563 | |
564 \section{International Character Sets} | |
565 | |
64127
88b841a92534
Update `versionnumber' and `year'. Update Emacs's version to 22.
Lute Kamstra <lute@gnu.org>
parents:
64091
diff
changeset
|
566 \key{specify principal language}{C-x RET l} |
25853 | 567 \metax{show all input methods}{M-x list-input-methods} |
568 \key{enable or disable input method}{C-\\} | |
569 \key{set coding system for next command}{C-x RET c} | |
570 \metax{show all coding systems}{M-x list-coding-systems} | |
571 \metax{choose preferred coding system}{M-x prefer-coding-system} | |
572 | |
573 \section{Info} | |
574 | |
575 \key{enter the Info documentation reader}{C-h i} | |
64242
0ee94ce27f45
(Files): Change description of `C-x C-q' from
Juri Linkov <juri@jurta.org>
parents:
64127
diff
changeset
|
576 \key{find specified function or variable in Info}{C-h S} |
25853 | 577 \beginindentedkeys |
578 | |
579 Moving within a node: | |
580 | |
581 \key{scroll forward}{SPC} | |
582 \key{scroll reverse}{DEL} | |
583 \key{beginning of node}{. {\rm (dot)}} | |
584 | |
585 Moving between nodes: | |
586 | |
587 \key{{\bf next} node}{n} | |
588 \key{{\bf previous} node}{p} | |
589 \key{move {\bf up}}{u} | |
590 \key{select menu item by name}{m} | |
591 \key{select {\it n\/}th menu item by number (1--9)}{{\it n}} | |
592 \key{follow cross reference (return with \kbd{l})}{f} | |
593 \key{return to last node you saw}{l} | |
594 \key{return to directory node}{d} | |
64242
0ee94ce27f45
(Files): Change description of `C-x C-q' from
Juri Linkov <juri@jurta.org>
parents:
64127
diff
changeset
|
595 \key{go to top node of Info file}{t} |
25853 | 596 \key{go to any node by name}{g} |
597 | |
598 Other: | |
599 | |
600 \key{run Info {\bf tutorial}}{h} | |
601 \key{{\bf quit} Info}{q} | |
602 \key{search nodes for regexp}{M-s} | |
603 | |
604 \endindentedkeys | |
605 | |
606 \section{Registers} | |
607 | |
608 \key{save region in register}{C-x r s} | |
609 \key{insert register contents into buffer}{C-x r i} | |
610 | |
611 \key{save value of point in register}{C-x r SPC} | |
612 \key{jump to point saved in register}{C-x r j} | |
613 | |
614 \section{Keyboard Macros} | |
615 | |
616 \key{{\bf start} defining a keyboard macro}{C-x (} | |
617 \key{{\bf end} keyboard macro definition}{C-x )} | |
618 \key{{\bf execute} last-defined keyboard macro}{C-x e} | |
619 \key{append to last keyboard macro}{C-u C-x (} | |
620 \metax{name last keyboard macro}{M-x name-last-kbd-macro} | |
621 \metax{insert Lisp definition in buffer}{M-x insert-kbd-macro} | |
622 | |
623 \section{Commands Dealing with Emacs Lisp} | |
624 | |
625 \key{eval {\bf sexp} before point}{C-x C-e} | |
626 \key{eval current {\bf defun}}{C-M-x} | |
627 \metax{eval {\bf region}}{M-x eval-region} | |
628 \key{read and eval minibuffer}{M-:} | |
629 \metax{load from standard system directory}{M-x load-library} | |
630 | |
631 \section{Simple Customization} | |
632 | |
633 \metax{customize variables and faces}{M-x customize} | |
634 | |
635 % The intended audience here is the person who wants to make simple | |
636 % customizations and knows Lisp syntax. | |
637 | |
638 Making global key bindings in Emacs Lisp (examples): | |
639 | |
640 \beginexample% | |
641 (global-set-key "\\C-cg" 'goto-line) | |
642 (global-set-key "\\M-\#" 'query-replace-regexp) | |
643 \endexample | |
644 | |
645 \section{Writing Commands} | |
646 | |
647 \beginexample% | |
648 (defun \<command-name> (\<args>) | |
649 "\<documentation>" (interactive "\<template>") | |
650 \<body>) | |
651 \endexample | |
652 | |
653 An example: | |
654 | |
655 \beginexample% | |
656 (defun this-line-to-top-of-window (line) | |
657 "Reposition line point is on to top of window. | |
658 With ARG, put point on line ARG." | |
659 (interactive "P") | |
660 (recenter (if (null line) | |
661 0 | |
662 (prefix-numeric-value line)))) | |
663 \endexample | |
664 | |
665 The \kbd{interactive} spec says how to read arguments interactively. | |
666 Type \kbd{C-h f interactive} for more details. | |
667 | |
668 \copyrightnotice | |
669 | |
670 \bye | |
671 | |
672 % Local variables: | |
673 % compile-command: "tex refcard" | |
674 % End: | |
52401 | 675 |
676 % arch-tag: d67bdf5d-b77c-44eb-a22e-f4f7d25174d2 |