comparison man/dired-ref.tex @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:376386a54a3c
1 % Document Type: TeX
2 % Master File: dired-ref.tex
3 % TREE DIRED Reference Card for GNU Emacs version 18 on Unix systems
4 %**start of header
5 \newcount\columnsperpage
6
7 % This file can be printed with 1, 2, or 3 columns per page (see below).
8 % Specify how many you want here. Nothing else needs to be changed.
9
10 \columnsperpage=1
11
12 % Copyright (c) 1991 Free Software Foundation, Inc.
13
14 % This file is part of GNU Emacs.
15
16 % This file is distributed in the hope that it will be useful,
17 % but WITHOUT ANY WARRANTY. No author or distributor
18 % accepts responsibility to anyone for the consequences of using it
19 % or for whether it serves any particular purpose or describes
20 % any piece of software unless they say so in writing. Refer to the
21 % GNU Emacs General Public License for full details.
22 %
23 % Permission is granted to copy, modify and redistribute this source
24 % file provided the copyright notice and permission notices are
25 % preserved on all copies.
26 %
27 % Permission is granted to process this file through TeX and print the
28 % results, provided the printed document carries copyright and
29 % permission notices identical to the ones below.
30
31 % This file is intended to be processed by plain TeX (TeX82).
32 %
33 % The final reference card has six columns, three on each side.
34 % This file can be used to produce it in any of three ways:
35 % 1 column per page
36 % produces six separate pages, each of which needs to be reduced to 80%.
37 % This gives the best resolution.
38 % 2 columns per page
39 % produces three already-reduced pages.
40 % You will still need to cut and paste.
41 % 3 columns per page
42 % produces two pages which must be printed sideways to make a
43 % ready-to-use 8.5 x 11 inch reference card.
44 % For this you need a dvi device driver that can print sideways.
45 % Which mode to use is controlled by setting \columnsperpage above.
46 %
47 % TeX Layout commands taken from the GNU Emacs Refcard (thanks to
48 % Stephen Gildea <gildea@erl.mit.edu> for this work)
49
50 \def\diredx{$^\dagger$} % marks extra feature not present in dired.el
51 \let\diredx\diredx % `compile' while ^ still active
52 \overfullrule0pt
53 \def\~{\char`~} % an ASCII tilde character
54
55 \def\versionnumber{1.0}
56 \def\year{1992}
57 \def\version{\year\ v\versionnumber}
58
59 \def\shortcopyrightnotice{\vskip 1ex plus 2 fill
60 \centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
61 Permissions on back. v\versionnumber}}
62
63 \def\copyrightnotice{
64 \vskip 1ex plus 2 fill\begingroup\small
65 \centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.}
66 % \centerline{designed by Stephen Gildea, \version}
67 \centerline{\version}
68 \centerline{for GNU Emacs version 18 on Unix systems}
69
70 Permission is granted to make and distribute copies of
71 this card provided the copyright notice and this permission notice
72 are preserved on all copies.
73
74 For copies of the GNU Emacs manual, write to the Free Software
75 Foundation, Inc., 675 Massachusetts Ave, Cambridge MA 02139.
76
77 \endgroup}
78
79 % make \bye not \outer so that the \def\bye in the \else clause below
80 % can be scanned without complaint.
81 \def\bye{\par\vfill\supereject\end}
82
83 \newdimen\intercolumnskip
84 \newbox\columna
85 \newbox\columnb
86
87 \def\ncolumns{\the\columnsperpage}
88
89 \message{[\ncolumns\space
90 column\if 1\ncolumns\else s\fi\space per page]}
91
92 \def\scaledmag#1{ scaled \magstep #1}
93
94 % This multi-way format was designed by Stephen Gildea
95 % October 1986.
96 \if 1\ncolumns
97 \hsize 4in
98 \vsize 10in
99 \voffset -.7in
100 \font\titlefont=\fontname\tenbf \scaledmag3
101 \font\headingfont=\fontname\tenbf \scaledmag2
102 \font\smallfont=\fontname\sevenrm
103 \font\smallsy=\fontname\sevensy
104
105 \footline{\hss\folio}
106 \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}
107 \else
108 \hsize 3.2in
109 \vsize 7.95in
110 \hoffset -.75in
111 \voffset -.745in
112 \font\titlefont=cmbx10 \scaledmag2
113 \font\headingfont=cmbx10 \scaledmag1
114 \font\smallfont=cmr6
115 \font\smallsy=cmsy6
116 \font\eightrm=cmr8
117 \font\eightbf=cmbx8
118 \font\eightit=cmti8
119 \font\eighttt=cmtt8
120 \font\eightsy=cmsy8
121 \textfont0=\eightrm
122 \textfont2=\eightsy
123 \def\rm{\eightrm}
124 \def\bf{\eightbf}
125 \def\it{\eightit}
126 \def\tt{\eighttt}
127 \normalbaselineskip=.8\normalbaselineskip
128 \normallineskip=.8\normallineskip
129 \normallineskiplimit=.8\normallineskiplimit
130 \normalbaselines\rm %make definitions take effect
131
132 \if 2\ncolumns
133 \let\maxcolumn=b
134 \footline{\hss\rm\folio\hss}
135 \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
136 \else \if 3\ncolumns
137 \let\maxcolumn=c
138 \nopagenumbers
139 \else
140 \errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
141 \errmessage{Illegal number of columns per page}
142 \fi\fi
143
144 \intercolumnskip=.46in
145 \def\abc{a}
146 \output={%
147 % This next line is useful when designing the layout.
148 %\immediate\write16{Column \folio\abc\space starts with \firstmark}
149 \if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
150 \else\if a\abc
151 \global\setbox\columna\columnbox \global\def\abc{b}
152 %% in case we never use \columnb (two-column mode)
153 \global\setbox\columnb\hbox to -\intercolumnskip{}
154 \else
155 \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
156 \def\multicolumnformat{\shipout\vbox{\makeheadline
157 \hbox{\box\columna\hskip\intercolumnskip
158 \box\columnb\hskip\intercolumnskip\columnbox}
159 \makefootline}\advancepageno}
160 \def\columnbox{\leftline{\pagebody}}
161
162 \def\bye{\par\vfill\supereject
163 \if a\abc \else\null\vfill\eject\fi
164 \if a\abc \else\null\vfill\eject\fi
165 \end}
166 \fi
167
168 % we won't be using math mode much, so redefine some of the characters
169 % we might want to talk about
170 \catcode`\^=12
171 \catcode`\_=12
172
173 \chardef\\=`\\
174 \chardef\{=`\{
175 \chardef\}=`\}
176
177 \hyphenation{mini-buf-fer}
178
179 \parindent 0pt
180 \parskip 1ex plus .5ex minus .5ex
181
182 \def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
183
184 \outer\def\newcolumn{\vfill\eject}
185
186 \outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}
187
188 \outer\def\section#1{\par\filbreak
189 \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}%
190 \vskip 2ex plus 1ex minus 1.5ex}
191
192 \newdimen\keyindent
193
194 \def\beginindentedkeys{\keyindent=1em}
195 \def\endindentedkeys{\keyindent=0em}
196 \endindentedkeys
197
198 \def\paralign{\vskip\parskip\halign}
199
200 \def\<#1>{$\langle${\rm #1}$\rangle$}
201
202 \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows
203
204 \def\beginexample{\par\leavevmode\begingroup
205 \obeylines\obeyspaces\parskip0pt\tt}
206 {\obeyspaces\global\let =\ }
207 \def\endexample{\endgroup}
208
209 \def\key#1#2{\leavevmode\hbox to \hsize{\vtop
210 {\hsize=.75\hsize\rightskip=1em
211 \hskip\keyindent\relax#1}\kbd{#2}\hfil}}
212
213 \newbox\metaxbox
214 \setbox\metaxbox\hbox{\kbd{M-x }}
215 \newdimen\metaxwidth
216 \metaxwidth=\wd\metaxbox
217
218 \def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
219 {\hskip\keyindent\relax#1\hfil}%
220 \hskip -\metaxwidth minus 1fil
221 \kbd{#2}\hfil}}
222
223 \def\threecolumn#1#2#3{\hskip\keyindent\relax{#1}\hfil&{#2}\quad &{#3}\quad\cr}
224 \def\threecol#1#2#3{\threecolumn{#1}{\kbd{#2}}{\kbd{#3}}}
225
226 %**end of header
227
228
229 \title{Tree Dired Reference Card}
230
231 \centerline{(for GNU Emacs version 18)}
232
233 \centerline{$ !Id: dired-ref.tex,v 1.1.1.1 1992/06/29 22:33:08 devin Exp ! $}
234
235 A feature marked like this\diredx{} is optional and not part of dired
236 proper.
237
238
239 \section{Starting Dired}
240
241 \key{Dired in current window} {C-x d}
242 \key{Dired in other window} {C-x 4 d}
243
244 The last component of the pathname may contain wildcards. With prefix
245 argument, Dired asks you to enter the listing switches for the {\tt
246 ls} command.
247
248 Another way is from within {\tt find-file}, \kbd{C-x C-f}: just enter
249 a directory name (no wildcards possible).
250
251
252 \section {Cursor Motion}
253 All the usual Emacs cursor motion commands are available in Dired
254 buffers. Special motion commands are (see also ``Subdirectories''
255 below):
256
257 \beginindentedkeys
258 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
259 \threecol{\bf go to} {\bf previous} {\bf next}
260 \threecol{line} {C-p {\rm or} p} {C-n {\rm or} n}
261 \threecol{directory line} {<} {>}
262 %\threecol{inserted directory} {ESC C-p} {ESC C-n} % now below
263 \threecol{marked file} {ESC \{} {ESC \}}
264 }
265 \endindentedkeys
266
267
268 \section{Visiting Files}
269
270 \key{visit current file (dired if directory)} {f}
271 \key{visit current file in other window}{o}
272 \key{view current file read-only} {v}
273
274
275 \section{Displaying Files}
276
277 \key{toggle between sort by name/date} {s}
278 \key{specify new ls switches}{C-u s}
279 \key{redisplay current, marked or next N files}{l}
280 \key{revert buffer}{g}
281
282 \key{kill this line (but not this file)}{k}
283 \key{undo changes to Dired buffer} {C-x u {\rm or} C-_}
284 \key{copy file name(s) to kill ring\diredx} {w}
285
286
287 \section{Marking and Unmarking Files}
288
289 \key{mark (with \kbd{*}) the current or next N file(s)} {m}
290 \key{remove mark}{u}
291 \key{remove mark on previous line}{DEL}
292
293 \key{mark all files matching REGEXP}{\%m}
294 \key{mark all executable files}{*}
295 \key{mark all symbolic links}{@}
296 \key{mark all directories}{/}
297
298 \key{unmark the current or next N file(s)} {u}
299 \key{move up lines and remove flags there} {DEL}
300 \key{remove a specific or all flags from every file}{ESC DEL}
301 %\key{toggle marks\diredx}{T} % this command is not very important
302
303
304 \section {Mark Using Commands}
305
306 The following commands are applied to the marked files or (if there
307 are none) to the current file. Numeric prefix argument means, apply
308 command to the next N (previous N if negative) files. Digits work as
309 prefix arguments.
310
311 {\bf Copying And Moving Files\dots}
312
313 Default target directory is where point is.
314
315 \beginindentedkeys
316 \key{move or rename} {r}
317 \key{copy} {c}
318 \key{make hard links} {H}
319 \key{make symbolic links} {Y}
320 \key{make relative symbolic links\diredx} {S}
321 \endindentedkeys
322
323 {\bf \dots With Regexps}
324
325 {\tt \\\&} in NEWNAME stands for the entire text being replaced. {\tt
326 \\N} in NEWNAME, where N is a digit, stands for whatever matched the
327 N'th parenthesized grouping in REGEXP.
328
329 \beginindentedkeys
330 \key{move or rename} {\%r}
331 \key{copy} {\%c}
332 \key{make hard links} {\%H}
333 \key{make symbolic links} {\%Y}
334 \key{make relative symbolic links\diredx} {\%S}
335
336 \key{rename to upper case}{\%u}
337 \key{rename to lower case}{\%l}
338 \endindentedkeys
339
340 {\bf Shell Commands}
341
342 Shell commands have the top level directory as working directory.
343 A {\tt *} indicates where filenames go (default: at end).
344
345 \beginindentedkeys
346 \key{run a shell command}{!}
347 \key{run a shell command in background\diredx}{\&}
348 \endindentedkeys
349
350 {\bf Other Mark Using Commands}
351
352 \beginindentedkeys
353 \key{compress files}{C}
354 \key{uncompress files}{U}
355
356 \key{change the mode ({\tt g+w} etc. allowed)} {M}
357 \key{change the group} {G}
358 \key{change the owner} {O}
359
360 \key{load elisp files}{L}
361 \key{byte compile elisp files} {B}
362
363 \key{print files} {P}
364 \endindentedkeys
365
366
367 \section {Deleting Files}
368
369 \key{flag (with \kbd{D}) file for deletion}{d}
370
371 \key{flag auto-save files}{\#}
372 \key{flag backup files}{\~}
373 \key{flag excess numeric backup files}{.}
374 \key{flag files matching REGEXP}{\%d}
375
376 \key{delete \kbd{D}-flagged files}{x}
377 \key{delete \kbd{*}-marked files} {X}
378
379
380 \section{Comparing files}
381
382 \key{diff current file with file mark is on} {D}
383 \key{diff current file with its backup file} {ESC \~}
384
385
386 \section{Making Directories}
387
388 \key{create a new directory}{+}
389
390
391 \section{Error Logging}
392
393 \key{see why something went wrong}{W}
394
395
396 \section{Subdirectories}
397
398 \key{insert directory into same Dired buffer}{i}
399 \key{insert all marked directories\diredx}{I}
400
401 \key{relist subdirectory of this headerline}{l}
402 \key{kill subdirectory of this headerline}{k}
403
404 \key{go up (Dired parent directory)}{^}
405 \key{go down (view this directory)}{v}
406
407 \key{go up in inserted directory tree}{ESC C-u}
408 \key{go down in inserted directory tree}{ESC C-d}
409 \key{next inserted directory}{ESC C-n}
410 \key{previous inserted directory}{ESC C-p}
411
412
413 \section{Hiding Directories}
414 \key{hide or unhide current inserted directory}{\$}
415 \key{hide or unhide all inserted directories}{=}
416
417
418 \section{Advanced Commands\diredx}
419
420 %{\bf Dynamic Markers}
421 %\section{Dynamic Markers\diredx}
422
423 \key{push a new marker character}{(}
424 \key{pop current marker off stack}{)}
425
426 %{\bf Omitting}
427 %\section{Omitting\diredx}
428
429 \key{toggle omitting}{ESC o}
430
431 %{\bf Advanced Mark Commands}
432 %\section{Advanced Mark Commands\diredx}
433
434 \key{mark files for which PREDICATE is non-nil}{ESC (}
435
436 {\beginindentedkeys
437 \advance\leftskip by \keyindent
438 %
439 PREDICATE is a lisp expression, e.g., {\tt (= size 0)}, that can refer
440 to the following symbols:
441
442 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
443 \threecolumn{\bf meaning} {\bf symbol} {\bf type}
444 \threecolumn{inode (only for {\tt ls -i})} {\tt inode}{\rm integer}
445 \threecolumn{size, usually in blocks (only for {\tt ls -s})}{\tt s}{\rm integer}
446 \threecolumn{file permission bits ({\tt "-rw-r--r--"})}{\tt mode}{\rm string}
447 \threecolumn{number of links to file} {\tt nlink}{\rm integer}
448 \threecolumn{owner} {\tt uid}{\rm string}
449 \threecolumn{group} {\tt gid}{\rm string}
450 \threecolumn{file size in bytes} {\tt size}{\rm integer}
451 \threecolumn{time that {\tt ls} displays ({\tt "Feb 12 14:17"})}{\tt time}{\rm string}
452 \threecolumn{name of the file} {\tt name}{\rm string}
453 \threecolumn{if symlink, linked-to name, else {\tt ""}}{\tt sym}{\rm string}
454 }
455 \endindentedkeys
456 }
457
458 \section{Filename Transformers\diredx}
459 Use e.g. {\tt [b]} instead of {\tt *} to access basenames in shell
460 commands.
461
462 \key{unmodified filename (equivalent to {\tt [dbe]}).}{*}
463 \key{name without directory information}{n}
464 \key{directory component}{d}
465 \key{basename, without directory and extension}{b}
466 \key{extension}{e}
467 \key{file without directory and without {\tt,v} suffix.}{v}
468 \key{without directory and without {\tt .Z} suffix}{z}
469
470
471 \section{Find Dired\diredx}
472
473 \metax{Feed arbitrary find(1) command to Dired}{M-x find-dired}
474 \metax{Find file names matching WILDCARD}{M-x find-name-dired}
475 \metax{Find files containing PATTERN}{M-x find-grep-dired}
476
477 \bye