Copy files with folders

How to copy selected files with folders in emacs dired-mode

? The problem I am facing is the following: when I press the "C" button to copy the selected files with folders to another folder I specify dir and then emacs starts copying the files (files are copied in order), but then the contents of the selected folders are - not folders really! ..

Contents of source files:

Initial dirs content

Ready to copy:

Ready to copy

Press C:

Pressed C

Press Enter:

Pressed Enter

Press y:

Pressed y

Press g on both frames:

Pressed g on both frames

As you can see - the directory was 1

not copied to dir 2

, but only it contains content. This is a problem when copying selection with files and folders.

+3


source to share


3 answers


(require 'ls-lisp)
(setq ls-lisp-use-insert-directory-program nil)

      



solved my problem.

+2


source


If I mark a directory name a

that has the files 1

, 2

and 3

and copy it to another folder with the name b

, after copying the directory b

it contains a directory name a

that has the files 1

, 2

and 3

.



It seems to have the same behavior as cp

. Is this not the behavior you are seeing?

0


source


Strange behavior. I agree with Miserable Variable, it should be exactly the same as cp

.

Please give your version to emacs. And I suggest you run directly emacs -Q

without loading other settings to figure out the reason.

My Emacs (v23.3.1) will prompt Recursive copies of /path/to/1? (yes or no)

after clicking RETon the third image step.

0


source







All Articles