dired-xtra.texi 2.2 KB
Newer Older
Eli Zaretskii's avatar
Eli Zaretskii committed
1
@c This is part of the Emacs manual.
2
@c Copyright (C) 2004-2011  Free Software Foundation, Inc.
Eli Zaretskii's avatar
Eli Zaretskii committed
3 4
@c See file emacs.texi for copying conditions.
@c
5 6 7 8 9 10
@c This file is included either in emacs-xtra.texi (when producing the
@c printed version) or in the main Emacs manual (for the on-line version).
@node Subdir Switches
@section Subdirectory Switches in Dired

You can insert subdirectories with specified @code{ls} switches in
Glenn Morris's avatar
Glenn Morris committed
11
Dired buffers using @kbd{C-u i}.  You can change the @code{ls}
12 13
switches of an already inserted subdirectory using @kbd{C-u l}.

Glenn Morris's avatar
Glenn Morris committed
14 15
Dired preserves the switches if you revert the buffer.  Deleting a
subdirectory forgets about its switches.
16 17

Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u})
Glenn Morris's avatar
Glenn Morris committed
18 19
to reinsert or delete subdirectories that were inserted with explicit
switches can bypass Dired's machinery for remembering (or forgetting)
20 21 22 23 24
switches.  Deleting a subdirectory using @code{dired-undo} does not
forget its switches.  When later reinserted using @kbd{i}, it will be
reinserted using its old switches.  Using @code{dired-undo} to
reinsert a subdirectory that was deleted using the regular
Dired commands (not @code{dired-undo}) will originally insert it with
Glenn Morris's avatar
Glenn Morris committed
25
its old switches.  Reverting the buffer, however, will relist it using
26 27 28 29
the buffer's default switches.  If any of this yields problems, you
can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}.

Dired does not remember the @code{R} switch.  Inserting a subdirectory
Glenn Morris's avatar
Glenn Morris committed
30
with switches that include the @code{R} switch is equivalent to
31 32 33 34 35 36
inserting each of its subdirectories using all remaining switches.
For instance, updating or killing a subdirectory that was inserted
with the @code{R} switch will not update or kill its subdirectories.

The buffer's default switches do not affect subdirectories that were
inserted using explicitly specified switches.  In particular,
Glenn Morris's avatar
Glenn Morris committed
37 38 39
commands such as @kbd{s} that change the buffer's switches do not
affect such subdirectories.  (They do, however, affect subdirectories
without explicitly assigned switches.)
40 41 42 43

You can make Dired forget about all subdirectory switches and relist
all subdirectories with the buffer's default switches using
@kbd{M-x dired-reset-subdir-switches}.  This also reverts the Dired buffer.