Variable: dired-create-destination-dirs-on-trailing-dirsep
dired-create-destination-dirs-on-trailing-dirsep is a customizable
variable defined in dired-aux.el.gz.
Value
nil
Documentation
If non-nil, treat a trailing slash at queried destination dir specially.
If this variable is non-nil and a single destination filename is
queried which ends in a directory separator (/), it will be
treated as a non-existent directory and acted on according to
dired-create-destination-dirs.
This option is only relevant if dired-create-destination-dirs
is non-nil, too.
For example, if both dired-create-destination-dirs and this
option are non-nil, renaming a directory named old_name to
new_name/ (note the trailing directory separator) where
new_name does not exists already, it will be created and
old_name be moved into it. If only new_name (without the
trailing /) is given or this option or
dired-create-destination-dirs is nil, old_name will be
renamed to new_name.
This variable was added, or its default value changed, in Emacs 29.1.
Source Code
;; Defined in /usr/src/emacs/lisp/dired-aux.el.gz
(defcustom dired-create-destination-dirs-on-trailing-dirsep nil
"If non-nil, treat a trailing slash at queried destination dir specially.
If this variable is non-nil and a single destination filename is
queried which ends in a directory separator (/), it will be
treated as a non-existent directory and acted on according to
`dired-create-destination-dirs'.
This option is only relevant if `dired-create-destination-dirs'
is non-nil, too.
For example, if both `dired-create-destination-dirs' and this
option are non-nil, renaming a directory named `old_name' to
`new_name/' (note the trailing directory separator) where
`new_name' does not exists already, it will be created and
`old_name' be moved into it. If only `new_name' (without the
trailing /) is given or this option or
`dired-create-destination-dirs' is nil, `old_name' will be
renamed to `new_name'."
:type '(choice
(const :tag
(concat "Do not treat destination dirs with a "
"trailing directory separator specially")
nil)
(const :tag
(concat "Treat destination dirs with trailing "
"directory separator specially")
t))
:group 'dired
:version "29.1")