Merge from emacs-23; up to 2010-06-16T23:27:20Z!jay.p.belanger@gmail.com.
[bpt/emacs.git] / doc / emacs / dired-xtra.texi
1 @c This is part of the Emacs manual.
2 @c Copyright (C) 2004-2011 Free Software Foundation, Inc.
3 @c See file emacs.texi for copying conditions.
4 @c
5 @c This file is included either in emacs-xtra.texi (when producing the
6 @c printed version) or in the main Emacs manual (for the on-line version).
7 @node Subdir Switches
8 @section Subdirectory Switches in Dired
9
10 You can insert subdirectories with specified @code{ls} switches in
11 Dired buffers using @kbd{C-u i}. You can change the @code{ls}
12 switches of an already inserted subdirectory using @kbd{C-u l}.
13
14 Dired preserves the switches if you revert the buffer. Deleting a
15 subdirectory forgets about its switches.
16
17 Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u})
18 to reinsert or delete subdirectories that were inserted with explicit
19 switches can bypass Dired's machinery for remembering (or forgetting)
20 switches. Deleting a subdirectory using @code{dired-undo} does not
21 forget its switches. When later reinserted using @kbd{i}, it will be
22 reinserted using its old switches. Using @code{dired-undo} to
23 reinsert a subdirectory that was deleted using the regular
24 Dired commands (not @code{dired-undo}) will originally insert it with
25 its old switches. Reverting the buffer, however, will relist it using
26 the buffer's default switches. If any of this yields problems, you
27 can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}.
28
29 Dired does not remember the @code{R} switch. Inserting a subdirectory
30 with switches that include the @code{R} switch is equivalent to
31 inserting each of its subdirectories using all remaining switches.
32 For instance, updating or killing a subdirectory that was inserted
33 with the @code{R} switch will not update or kill its subdirectories.
34
35 The buffer's default switches do not affect subdirectories that were
36 inserted using explicitly specified switches. In particular,
37 commands such as @kbd{s} that change the buffer's switches do not
38 affect such subdirectories. (They do, however, affect subdirectories
39 without explicitly assigned switches.)
40
41 You can make Dired forget about all subdirectory switches and relist
42 all subdirectories with the buffer's default switches using
43 @kbd{M-x dired-reset-subdir-switches}. This also reverts the Dired buffer.