]> code.delx.au - gnu-emacs/blob - man/dired-xtra.texi
(Several Buffers): Replace inforef to emacs-xtra by conditional xref's,
[gnu-emacs] / man / dired-xtra.texi
1 @c This file is included either in emacs-xtra.texi (when producing the
2 @c printed version) or in the main Emacs manual (for the on-line version).
3 @node Subdir Switches
4 @section Subdirectory Switches in Dired
5
6 You can insert subdirectories with specified @code{ls} switches in
7 Dired buffers, using @kbd{C-u i}. You can change the @code{ls}
8 switches of an already inserted subdirectory using @kbd{C-u l}.
9
10 In Emacs versions 22.1 and later, Dired remembers the switches, so
11 that reverting the buffer will not change them back to the main
12 directory's switches. Deleting a subdirectory forgets about its
13 switches.
14
15 Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u})
16 to reinsert or delete subdirectories, that were inserted with explicit
17 switches, can bypass Dired's machinery for remembering (or forgetting)
18 switches. Deleting a subdirectory using @code{dired-undo} does not
19 forget its switches. When later reinserted using @kbd{i}, it will be
20 reinserted using its old switches. Using @code{dired-undo} to
21 reinsert a subdirectory that was deleted using the regular
22 Dired commands (not @code{dired-undo}) will originally insert it with
23 its old switches. However, reverting the buffer will relist it using
24 the buffer's default switches. If any of this yields problems, you
25 can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}.
26
27 Dired does not remember the @code{R} switch. Inserting a subdirectory
28 with switches that include the @code{R} switch is equivalent with
29 inserting each of its subdirectories using all remaining switches.
30 For instance, updating or killing a subdirectory that was inserted
31 with the @code{R} switch will not update or kill its subdirectories.
32
33 The buffer's default switches do not affect subdirectories that were
34 inserted using explicitly specified switches. In particular,
35 commands such as @kbd{s}, that change the buffer's switches do not
36 affect such subdirectories. (They do affect subdirectories without
37 explicitly assigned switches, however.)
38
39 You can make Dired forget about all subdirectory switches and relist
40 all subdirectories with the buffer's default switches using
41 @kbd{M-x dired-reset-subdir-switches}. This also reverts the Dired buffer.