(dired.info)Dired User Options
Next: Dired Configuration Prev: Dired Customization Up: Dired Customization
Customization of Dired
The following variables are for personal customization in your
`~/.emacs' file. For example, include a line similar to the following
(setq dired-listing-switches "-Alt") ; sort on time, ignore . and ..
to set your favorite Dired listing switches.
Switches passed to `ls' for Dired. Must contain the `l' option.
Regexp of files to skip when moving point to the first file of a
new directory listing. Nil means move to the subdirectory line, t
means move to first file.
Default: `?*' (`?*' is the Lisp notation for the character `*'.)
In Dired, character used to mark files for later commands.
This is a variable so that one can write things like
(let ((dired-marker-char ?X))
;; great code using X markers ...
Character used to flag files for deletion.
Usually, marking for commands and flagging for deletion are
separate features. (Internally they use the same marking
mechanism.) You type `d' to flag with `D' and `x' to delete the
This explains how to make deletion behave just like a special case
of the general file marking feature, so that you type `m' to mark
with `*' (as usual) and `d' to delete the `*' (or next N) files:
In your `~/.emacs', include
(setq dired-del-marker dired-marker-char) ; use * also for deletions
;; other customizations here
;; let "d" do the actual deletion:
(define-key dired-mode-map "d" 'dired-do-delete))))
If you do not like that `d' defaults to the current file if there
are no marks, replace the `define-key' statement in
`dired-load-hook' above with this one:
(define-key dired-mode-map "d" 'dired-do-deletions)
Default: `(if (fboundp 'baud-rate) (> (baud-rate)
Whether Dired shrinks the display buffer to fit the marked files.
If non-nil, list of commands Dired should not confirm.
Confirmation for commands that require an argument to be entered
(like the shell command for `!') means a list of marked files is
displayed in a pop-up buffer. Confirmation for commands that do
not require an argument (like compressing with `C') means you have
to confirm by typing `y' or `SPC'.
Except `nil', it can be a sublist of
'(byte-compile chgrp chmod chown compress copy delete hardlink load
move print shell symlink uncompress)
to suppress confirmation for just those commands.
If nil, moved files are not marked.
If t, moved marked files are marked with the same marker they had
before (maybe none if you used the prefix argument to specify the
next N files).
If a character, moved files (marked or not) are marked with that
This also applies to the following, similar variables for copied,
and hard or symbolically linked files:
If non-nil, Dired tries to guess a default target directory: If
there is a Dired buffer displayed in the next window, use its
current subdirectory, instead of the current subdirectory of this
The target is used in the prompt for file copy, move etc., *Note
Copy and Move Into a Directory::.
If non-nil, Dired preserves the last-modified time in a file copy.
(This works on only some systems.) Use `c' (`dired-do-copy') with
a zero prefix argument to toggle its value. The prompt of copy
commands will display `Copy [-p]' instead of just `Copy' if
preservation of file times is turned on.
Non-nil if Dired should ask about making backups before
overwriting files. Special value `'always' suppresses
automatically generated by info2www