1 @c This is part of the Emacs manual.
2 @c Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
3 @c See file emacs.texi for copying conditions.
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).
8 @section Subdirectory Switches in Dired
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}.
14 In Emacs versions 22.1 and later, Dired remembers the switches, so
15 that reverting the buffer will not change them back to the main
16 directory's switches. Deleting a subdirectory forgets about its
19 Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u})
20 to reinsert or delete subdirectories, that were inserted with explicit
21 switches, can bypass Dired's machinery for remembering (or forgetting)
22 switches. Deleting a subdirectory using @code{dired-undo} does not
23 forget its switches. When later reinserted using @kbd{i}, it will be
24 reinserted using its old switches. Using @code{dired-undo} to
25 reinsert a subdirectory that was deleted using the regular
26 Dired commands (not @code{dired-undo}) will originally insert it with
27 its old switches. However, reverting the buffer will relist it using
28 the buffer's default switches. If any of this yields problems, you
29 can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}.
31 Dired does not remember the @code{R} switch. Inserting a subdirectory
32 with switches that include the @code{R} switch is equivalent with
33 inserting each of its subdirectories using all remaining switches.
34 For instance, updating or killing a subdirectory that was inserted
35 with the @code{R} switch will not update or kill its subdirectories.
37 The buffer's default switches do not affect subdirectories that were
38 inserted using explicitly specified switches. In particular,
39 commands such as @kbd{s}, that change the buffer's switches do not
40 affect such subdirectories. (They do affect subdirectories without
41 explicitly assigned switches, however.)
43 You can make Dired forget about all subdirectory switches and relist
44 all subdirectories with the buffer's default switches using
45 @kbd{M-x dired-reset-subdir-switches}. This also reverts the Dired buffer.
48 arch-tag: e3865701-9179-4ffb-bc34-d321111c688d