Frage

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:

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 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.

War es hilfreich?

Lösung

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

solved my problem.

Andere Tipps

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.

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?

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top