summaryrefslogtreecommitdiff
path: root/doc/emacs/dired.texi
diff options
context:
space:
mode:
authorTino Calancha <tino.calancha@gmail.com>2017-10-21 13:05:48 +0900
committerTino Calancha <tino.calancha@gmail.com>2017-10-21 13:05:48 +0900
commitcb29f41624e5163a0aea4bfc98591e683807a2f8 (patch)
tree78783e1c8a2010be53feeb6e20e9abde309806f3 /doc/emacs/dired.texi
parentc75f505dea6a560b825384cf3d277690f86840bf (diff)
downloademacs-cb29f41624e5163a0aea4bfc98591e683807a2f8.tar.gz
Allow to copy/rename file into a non-existent dir
* lisp/dired-aux.el (dired-create-destination-dirs): New option. (dired-maybe-create-dirs): New defun. (dired-copy-file-recursive, dired-rename-file): Use it (Bug#28834). * lisp/dired-aux-tests.el (dired-test-bug28834): Add test. * doc/emacs/dired.texi (Operating on Files): Update manual. * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 27.1) Announce this change.
Diffstat (limited to 'doc/emacs/dired.texi')
-rw-r--r--doc/emacs/dired.texi11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index db5dea329b5..9348ef5042d 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -647,6 +647,14 @@ Copy the specified files (@code{dired-do-copy}). The argument @var{new}
is the directory to copy into, or (if copying a single file) the new
name. This is like the shell command @code{cp}.
+@vindex dired-create-destination-dirs
+The option @code{dired-create-destination-dirs} controls whether Dired
+should create non-existent directories in the destination while
+copying/renaming files. The default value @code{nil} means Dired
+never creates such missing directories; the value @code{always},
+means Dired automatically creates them; the value @code{ask}
+means Dired asks you for confirmation before creating them.
+
@vindex dired-copy-preserve-time
If @code{dired-copy-preserve-time} is non-@code{nil}, then copying
with this command preserves the modification time of the old file in
@@ -678,6 +686,9 @@ single file, the argument @var{new} is the new name of the file. If
you rename several files, the argument @var{new} is the directory into
which to move the files (this is like the shell command @command{mv}).
+The option @code{dired-create-destination-dirs} controls whether Dired
+should create non-existent directories in @var{new}.
+
Dired automatically changes the visited file name of buffers associated
with renamed files so that they refer to the new names.