Mercurial > emacs
annotate etc/dired-ref.tex @ 64323:ad0c51726dbd
(term-mode): Disable cua-mode for term buffers.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Thu, 14 Jul 2005 17:39:46 +0000 |
parents | e055d02d8b97 |
children | f05a048483cc f9a65d7ebd29 |
rev | line source |
---|---|
30871 | 1 % Reference Card for Dired |
36867 | 2 % Copyright (C) 2000. 2001 Free Software Foundation, Inc. |
30871 | 3 |
4 % This file is part of GNU Emacs. | |
5 | |
6 % GNU Emacs is free software; you can redistribute it and/or modify | |
7 % it under the terms of the GNU General Public License as published by | |
8 % the Free Software Foundation; either version 2, or (at your option) | |
9 % any later version. | |
10 | |
11 % GNU Emacs is distributed in the hope that it will be useful, | |
12 % but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 % GNU General Public License for more details. | |
15 | |
16 % You should have received a copy of the GNU General Public License | |
17 % along with GNU Emacs; see the file COPYING. If not, write to | |
64083 | 18 % the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 % Boston, MA 02110-1301, USA. | |
30871 | 20 |
21 % This file can be printed with 1, 2, or 3 columns per page (see below). | |
22 % Specify how many you want here. Nothing else needs to be changed. | |
23 %**start of header | |
24 | |
25 \newcount\columnsperpage | |
26 | |
27 \columnsperpage=2 | |
28 | |
29 % This file is intended to be processed by plain TeX (TeX82). | |
30 % The reference card looks OK with 2 columns per page, portrait mode. | |
31 % I haven't tried it with 3 columns per page. | |
32 | |
33 % This is a bit of a dirty hack on the GNU Emacs reference card | |
34 % to produce a Dired reference card instead. | |
35 | |
35680 | 36 % I (Evgeny Roubinchtein, eroubinc@u.washington.edu) put this together |
37 % because I wanted a Dired reference card, | |
30871 | 38 % but couldn't find anything on the 'net. |
39 % Based mostly off Dired's describe-mode. | |
40 | |
41 | |
42 \def\versionnumber{0.1} | |
43 \def\year{2000} | |
44 \def\version{May \year\ v\versionnumber} | |
45 | |
46 \def\shortcopyrightnotice{\vskip 1ex plus 2 fill | |
47 \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. | |
48 Permissions on back. v\versionnumber}} | |
49 | |
50 \def\copyrightnotice{ | |
51 \vskip 1ex plus 2 fill\begingroup\small | |
52 \centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.} | |
53 \centerline{designed by Stephen Gildea, \version} | |
54 \centerline{for GNU Emacs version 19 on Unix systems} | |
36868 | 55 \centerline{Updated for Dired in May 2000 by Evgeny Roubinchtein} |
30871 | 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. | |
60 | |
61 For copies of the GNU Emacs manual, write to the Free Software | |
64092 | 62 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
63 MA 02110-1301, USA. | |
30871 | 64 |
65 \endgroup} | |
66 | |
67 % make \bye not \outer so that the \def\bye in the \else clause below | |
68 % can be scanned without complaint. | |
69 \def\bye{\par\vfill\supereject\end} | |
70 | |
71 \newdimen\intercolumnskip %horizontal space between columns | |
72 \newbox\columna %boxes to hold columns already built | |
73 \newbox\columnb | |
74 | |
75 \def\ncolumns{\the\columnsperpage} | |
76 | |
35680 | 77 \message{[\ncolumns\space |
30871 | 78 column\if 1\ncolumns\else s\fi\space per page]} |
79 | |
80 \def\scaledmag#1{ scaled \magstep #1} | |
81 | |
82 % This multi-way format was designed by Stephen Gildea October 1986. | |
83 % Note that the 1-column format is fontfamily-independent. | |
84 \if 1\ncolumns %one-column format uses normal size | |
85 \hsize 4in | |
86 \vsize 10in | |
87 \voffset -.7in | |
88 \font\titlefont=\fontname\tenbf \scaledmag3 | |
89 \font\headingfont=\fontname\tenbf \scaledmag2 | |
90 \font\smallfont=\fontname\sevenrm | |
91 \font\smallsy=\fontname\sevensy | |
92 | |
93 \footline{\hss\folio} | |
94 \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}} | |
95 \else %2 or 3 columns uses prereduced size | |
96 \hsize 3.4in | |
97 \vsize 7.95in | |
98 \hoffset -.75in | |
99 \voffset -.745in | |
100 \font\titlefont=cmbx10 \scaledmag2 | |
101 \font\headingfont=cmbx10 \scaledmag1 | |
102 \font\smallfont=cmr6 | |
103 \font\smallsy=cmsy6 | |
104 \font\eightrm=cmr8 | |
105 \font\eightbf=cmbx8 | |
106 \font\eightit=cmti8 | |
107 \font\eighttt=cmtt8 | |
108 \font\eightmi=cmmi8 | |
109 \font\eightsy=cmsy8 | |
110 \textfont0=\eightrm | |
111 \textfont1=\eightmi | |
112 \textfont2=\eightsy | |
113 \def\rm{\eightrm} | |
114 \def\bf{\eightbf} | |
115 \def\it{\eightit} | |
116 \def\tt{\eighttt} | |
117 \normalbaselineskip=.8\normalbaselineskip | |
118 \normallineskip=.8\normallineskip | |
119 \normallineskiplimit=.8\normallineskiplimit | |
120 \normalbaselines\rm %make definitions take effect | |
121 | |
122 \if 2\ncolumns | |
123 \let\maxcolumn=b | |
124 \footline{\hss\rm\folio\hss} | |
125 \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}} | |
126 \else \if 3\ncolumns | |
127 \let\maxcolumn=c | |
128 \nopagenumbers | |
129 \else | |
130 \errhelp{You must set \columnsperpage equal to 1, 2, or 3.} | |
131 \errmessage{Illegal number of columns per page} | |
132 \fi\fi | |
133 | |
134 \intercolumnskip=.46in | |
135 \def\abc{a} | |
136 \output={% %see The TeXbook page 257 | |
137 % This next line is useful when designing the layout. | |
138 %\immediate\write16{Column \folio\abc\space starts with \firstmark} | |
139 \if \maxcolumn\abc \multicolumnformat \global\def\abc{a} | |
140 \else\if a\abc | |
141 \global\setbox\columna\columnbox \global\def\abc{b} | |
142 %% in case we never use \columnb (two-column mode) | |
143 \global\setbox\columnb\hbox to -\intercolumnskip{} | |
144 \else | |
145 \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi} | |
146 \def\multicolumnformat{\shipout\vbox{\makeheadline | |
147 \hbox{\box\columna\hskip\intercolumnskip | |
148 \box\columnb\hskip\intercolumnskip\columnbox} | |
149 \makefootline}\advancepageno} | |
150 \def\columnbox{\leftline{\pagebody}} | |
151 | |
152 \def\bye{\par\vfill\supereject | |
153 \if a\abc \else\null\vfill\eject\fi | |
154 \if a\abc \else\null\vfill\eject\fi | |
35680 | 155 \end} |
30871 | 156 \fi |
157 | |
158 % we won't be using math mode much, so redefine some of the characters | |
159 % we might want to talk about | |
160 \catcode`\^=12 | |
161 \catcode`\_=12 | |
162 | |
163 \chardef\\=`\\ | |
164 \chardef\{=`\{ | |
165 \chardef\}=`\} | |
166 | |
167 \hyphenation{mini-buf-fer} | |
168 \hyphenation{de-le-tion} | |
169 | |
170 \parindent 0pt | |
171 \parskip 1ex plus .5ex minus .5ex | |
172 | |
173 \def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip} | |
174 | |
175 % newcolumn - force a new column. Use sparingly, probably only for | |
176 % the first column of a page, which should have a title anyway. | |
177 \outer\def\newcolumn{\vfill\eject} | |
178 | |
179 % title - page title. Argument is title text. | |
180 \outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex} | |
181 | |
182 % section - new major section. Argument is section name. | |
183 \outer\def\section#1{\par\filbreak | |
184 \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}% | |
185 \vskip 2ex plus 1ex minus 1.5ex} | |
186 | |
187 \newdimen\keyindent | |
188 | |
189 % beginindentedkeys...endindentedkeys - key definitions will be | |
190 % indented, but running text, typically used as headings to group | |
191 % definitions, will not. | |
192 \def\beginindentedkeys{\keyindent=1em} | |
193 \def\endindentedkeys{\keyindent=0em} | |
194 \endindentedkeys | |
195 | |
196 % paralign - begin paragraph containing an alignment. | |
197 % If an \halign is entered while in vertical mode, a parskip is never | |
198 % inserted. Using \paralign instead of \halign solves this problem. | |
199 \def\paralign{\vskip\parskip\halign} | |
200 | |
201 % \<...> - surrounds a variable name in a code example | |
202 \def\<#1>{{\it #1\/}} | |
203 | |
204 % kbd - argument is characters typed literally. Like the Texinfo command. | |
205 \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows | |
206 | |
207 % beginexample...endexample - surrounds literal text, such a code example. | |
208 % typeset in a typewriter font with line breaks preserved | |
209 \def\beginexample{\par\leavevmode\begingroup | |
210 \obeylines\obeyspaces\parskip0pt\tt} | |
211 {\obeyspaces\global\let =\ } | |
212 \def\endexample{\endgroup} | |
213 | |
214 % key - definition of a key. | |
215 % \key{description of key}{key-name} | |
216 % prints the description left-justified, and the key-name in a \kbd | |
217 % form near the right margin. | |
218 \def\key#1#2{\leavevmode\hbox to \hsize{\vtop | |
219 {\hsize=.75\hsize\rightskip=1em | |
220 \hskip\keyindent\relax#1}\kbd{#2}\hfil}} | |
221 | |
222 \newbox\metaxbox | |
223 \setbox\metaxbox\hbox{\kbd{M-x }} | |
224 \newdimen\metaxwidth | |
225 \metaxwidth=\wd\metaxbox | |
226 | |
227 % metax - definition of a M-x command. | |
228 % \metax{description of command}{M-x command-name} | |
229 % Tries to justify the beginning of the command name at the same place | |
230 % as \key starts the key name. (The "M-x " sticks out to the left.) | |
231 \def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize | |
232 {\hskip\keyindent\relax#1\hfil}% | |
233 \hskip -\metaxwidth minus 1fil | |
234 \kbd{#2}\hfil}} | |
235 | |
236 % threecol - like "key" but with two key names. | |
237 % for example, one for doing the action backward, and one for forward. | |
238 \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\hfil\quad | |
239 &\kbd{#3}\hfil\quad\cr} | |
240 | |
241 % I cannot figure out how to make all dired-x | |
242 % commands fit on a page in two-column format | |
35680 | 243 \def\dx{{\bf (DX)}} |
30871 | 244 |
245 %**end of header | |
246 | |
247 | |
248 \title{Dired Reference Card} | |
249 | |
43258
f3408a98d0f3
Update Emacs version 20.x -> 21.x.
Eli Zaretskii <eliz@gnu.org>
parents:
36868
diff
changeset
|
250 \centerline{(based on Dired in GNU Emacs 21.x)} |
30871 | 251 \centerline{Commands marked with \dx{} require dired-x} |
252 | |
253 % trim this down to fit everything on one page | |
254 % \section{General} | |
255 % In dired, you can edit a list of the files in a directory (and optionally | |
256 % its subdirectories in the `ls -lR' format). | |
257 | |
258 % Editing a directory means that you can visit, rename, copy, compress, | |
259 % load, byte-compile files. You can change files' attributes, run shell | |
260 % commands on files, or insert subdirectories into the edit buffer. You can | |
261 % "flag" files for deletion or "mark" files for later commands, either one | |
262 % file at a time or by all files matching certain criteria (e.g., files that | |
263 % match a certain regexp). | |
35680 | 264 |
30871 | 265 % You move throughout the buffer using the usual cursor motion commands. |
266 % Letters no longer insert themselves, but execute commands instead. The | |
267 % digits (0-9) are prefix arguments. | |
35680 | 268 |
30871 | 269 % Most commands operate either on all marked files or on the current file if |
270 % no files are marked. Use a numeric prefix argument to operate on the next | |
271 % ARG files (or previous ARG if ARG $<$ 0). Use the prefix argument `1' to | |
272 % operate on the current file only. Prefix arguments override marks. Commands | |
273 % which run a sub-process on a group of files will display a list of files | |
274 % for which the sub-process failed. Typing y will try to tell | |
275 % you what went wrong. | |
35680 | 276 |
30871 | 277 % When editing several directories in one buffer, each directory acts as a |
278 % page, so C-x [ and C-x ] can be used to move between directories. | |
279 | |
280 \section{Entering and Exiting Dired} | |
281 | |
282 \key{run dired}{C-x d} | |
35680 | 283 \key{dired the directory of the file you are editing}{C-x C-j \dx} |
30871 | 284 \key{quit dired}{q} |
285 | |
286 \section{Motion Commands} | |
287 | |
288 \key{move up to previous line}{p} | |
289 \key{move down to next line}{n} | |
290 \key{move up to previous directory line}{<} | |
291 \key{move down to next directory line}{>} | |
292 \key{move to next marked file}{M-\}} | |
293 \key{move to previous marked file}{M-\{} | |
294 \key{move up to previous subdirectory}{M-C-p} | |
295 \key{move down to next subdirectory}{M-C-n} | |
296 \key{move to parent directory}{^} | |
297 \key{move to first child subdirectory}{M-C-d} | |
298 | |
299 \section{Mouse Commands} | |
300 \metax{visit file}{Mouse_Button_2} | |
35680 | 301 \metax{popup menu}{Control-Mouse_Button_3} |
30871 | 302 |
303 \section{Immediate Actions on Files} | |
304 | |
305 \key{visit current file}{f} | |
306 \key{view current file}{v} | |
307 \key{visit current file in other window}{o} | |
308 \key{visit current file in other frame}{w} | |
309 \key{display current file}{C-u o} | |
310 \key{create a new subdirectory}{+} | |
311 \key{compare file at point with the one at mark}{=} | |
312 | |
313 \section{Marking and Unmarking Files} | |
314 | |
315 \key{mark a file or subdirectory for later commands}{m} | |
316 \key{unmark a file or all files of a subdirectory}{u} | |
317 \key{unmark all marked files in a buffer}{M-delete} | |
318 \key{mark files with a given extension}{* .} | |
319 \key{mark all directories}{* /} | |
320 \key{mark all symlinks}{* @} | |
321 \key{mark all executables}{* *} | |
322 \key{invert marking}{* t} | |
323 \key{mark all files in the current subdir}{* s} | |
324 \key{mark file names matching a regular expression}{* \%} | |
325 \key{change the marks to a different character}{* c} | |
35680 | 326 \key{mark files for which Elisp expression returns t}{* ( \dx} |
30871 | 327 |
328 \section{Getting Help} | |
329 | |
330 \key{dired help}{h} | |
35680 | 331 \key{dired summary (short help) and error log}{?} |
30871 | 332 |
333 \section{Commands on Files Marked or Specified by the Prefix} | |
334 | |
335 \key{copy file(s)}{C} | |
336 \key{rename a file or move files to another directory}{R} | |
337 \key{change ownership of file(s)}{O} | |
338 \key{change the group of the file(s)}{G} | |
339 \key{change mode of file(s)}{M} | |
340 \key{print file(s)}{P} | |
341 \key{convert filename(s) to lower case}{\% l} | |
342 \key{convert filename(s) to upper case}{\% u} | |
343 \key{delete marked (as opposed to flagged) files}{X} | |
344 \key{uuencode or uudecode file(s)}{U} | |
345 \key{compress or uncompress file(s)}{Z} | |
35680 | 346 \key{run info on file}{I \dx} |
30871 | 347 \key{make symbolic link(s)}{S} |
348 \key{make relative symbolic links}{Y} | |
36868 | 349 \key{make hard link(s)}{H} |
30871 | 350 \key{search files for a regular expression}{A} |
351 \key{query replace regular expression}{Q} | |
352 \key{byte-compile files}{B} | |
353 \key{load files}{L} | |
354 \key{shell command on file(s)}{!} | |
355 | |
356 \section{Flagging Files for Deletion} | |
357 \leftline{\bf Unmark commands remove delete flags} | |
358 \key{flag file for deletion}{d} | |
359 \key{backup and remove deletion flag}{delete} | |
360 \key{flag all backup files (file names ending in \~{})}{\~{}} | |
361 \key{flag all auto-save files}{\#} | |
362 \key{flag various intermediate files}{\&} | |
363 \key{flag numeric backups (ending in .\~{}1\~{}, .\~{}2\~{}, etc.)}{.} | |
364 \key{execute the deletions requested (flagged files)}{x} | |
36867 | 365 \key{flag files matching a regular expression}{\% d} |
30871 | 366 |
367 \section{Modifying the Dired Buffer} | |
368 | |
369 \key{insert a subdirectory into this buffer}{i} | |
370 \key{remove marked files from the listing}{k} | |
371 \key{remove a subdir listing}{C-u k} | |
372 \key{re-read all directories (retains all marks)}{g} | |
373 \key{toggle sorting of current subdir by name/date}{s} | |
36867 | 374 \key{edit ls switches}{C-u s} |
30871 | 375 \key{recover marks, hidden lines, and such}{C-_} |
376 \key{hide all subdirectories}{M-\$} | |
377 \key{hide or unhide subdirectory}{\$} | |
378 | |
379 \section{Regular Expression Commands} | |
380 | |
381 \key{mark filenames matching a regular expression}{\% m} | |
382 \key{copy marked files by regexp}{\% C} | |
383 \key{rename marked files by regexp}{\% R} | |
384 \key{hardlink}{\% H} | |
385 \key{symlink}{\% S} | |
386 \key{symlink, with relative paths}{\% Y} | |
387 \key{mark for deletion}{\% d} | |
388 | |
389 \section{Dired and Find} | |
36868 | 390 \metax{dired file(s) whose name matches a pattern}{M-x find-name-dired} |
30871 | 391 \metax{dired file(s) that contain pattern}{M-x find-grep-dired} |
392 \metax{dired file(s) based on \kbd{find} output}{M-x find-dired} | |
393 | |
394 %\copyrightnotice | |
395 | |
396 \bye | |
397 | |
52401 | 398 % arch-tag: 483e7bb4-4576-4733-9fca-0eae1c861484 |