Reputation: 4950
How to copy selected files with folders in emacs dired-mode
?
The problem I've faced is the next one: when I'm pressing the 'C' button to copy selected files with folders to an other folder, I'm pointing dir, and then emacs starts to copy files (files are copied OK) but then content of selected folders - not folders actually!..
Initial dirs content:
Ready to copy:
Press C:
Press Enter:
Press y:
Press g on both frames:
As you can see - the dir 1
wasn't copyed to dir 2
, but only it's content. This couses a problem when copying a selection with files and folders.
Upvotes: 3
Views: 2042
Reputation: 28761
If I mark a directory named a
which has files 1
, 2
and 3
and copy it to another directory named b
then after I copy the directory b
, it contains a directory named a
which has files 1
, 2
and 3
.
This seems like it has the same behavior as cp
. Is that not the behavior you see?
Upvotes: 0
Reputation: 4950
(require 'ls-lisp)
(setq ls-lisp-use-insert-directory-program nil)
solved my problem.
Upvotes: 2
Reputation: 726
Weird behavoir. I agree with Miserable Variable, it should be exactly same as cp
.
Please give your emacs version. And I suggest you directly run emacs -Q
without loadding other settings in order to figure out the root cause.
My Emacs (v23.3.1) will prompt Recursive copies of /path/to/1? (yes or no)
, after you press RET in the step of your third picture.
Upvotes: 0