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