(dired.info)Editing in Dired
Next: Listing Files in Dired Prev: Entering Dired Up: Dired
Editing in Dired
Once the Dired buffer exists, you can switch freely between it and other
Emacs buffers. Whenever the Dired buffer is selected, certain special
commands are provided that operate on files that are listed. The Dired
buffer is "read-only", and inserting text in it is not useful, so
ordinary printing characters such as `d' and `x' are used for Dired
commands, and digits are prefix arguments.
The file described by the line that point is on is called the
"current file". The directory this file is in is the "current Dired
directory". Note that there may be several directories in one Dired
buffer as long as they belong to the same tree. The top level
directory, the "root" of the tree, is used as the working directory of
Some or all directories can be "hidden", leaving only their
headerlines visible, and exlcuding their files from Dired operations.
Files can be "marked" for later commands. Marking means putting a
special character, usually `*', in the first column of the file line.
To "flag" a file means to mark it for later deletion. This special
case of "marking" is distinguished so that you do not delete files
accidentally. Internally, the only difference between marking and
flagging is the character used to mark the file: `*' (an asterisk) for
a marked file, and `D' for files flagged for deletion.
Most Dired commands operate on the "marked" files and default to the
current file. They are the "mark-using" commands. Deleting is the
only mark-using command that does not default to the current file.
Dired buffers "know" about each other. For example, copying from
DIR1 into DIR2 will update DIR2's Dired buffer(s). When you move files
or directories, file and dired buffers are kept up to date and refer to
the new location. But Dired only knows about files changed by itself,
not by other parts of Emacs or programs outside Emacs.
All the usual Emacs cursor motion commands are available in Dired
buffers. Some special purpose commands are also provided. The keys
`C-n' and `C-p' are redefined so that they try to position the cursor
at the beginning of the filename on the line, rather than at the
beginning of the line.
For extra convenience, SPC and `n' in Dired are equivalent to `C-n'.
`p' is equivalent to `C-p'. Moving by lines is also done so often in
Dired that it deserves to be easy to type. DEL (move up and unflag) is
often useful simply for moving up.
automatically generated by info2www