Calaf
Calaf

Reputation: 10847

Emacs as Finder/Explorer -- copy files

I often want to copy files from one half (C-x 2) to the other of emacs, with different dired buffers in both halves.

The obvious way is to mark the files in one window, go to the other, move to the directory name, mark beginning, go to end, copy to the ring, return to the first half, and finally initiate the copy while pasting the name of the buffer from the ring.

Is there a shorter way to copy from one dired buffer to the other?

edit

Thanks, BRPocock. Under dired-dwim customization, I only see:

dired-dwim customization

Upvotes: 9

Views: 1690

Answers (2)

Drew
Drew

Reputation: 30708

Sorry, I don't understand what's so onerous about copying the directory name and yanking it when prompted for the target directory. And if you do this "often", as you say, then the same directory should be in your history list, accessible using M-p etc. -- you should only need to select and copy it once.

Another approach to reusing something like the directory name is to use the secondary selection. That persists when you change the region etc. I bind yanking it to C-M-y. See http://www.emacswiki.org/emacs/SecondarySelection.

Upvotes: -2

BRPocock
BRPocock

Reputation: 13934

Under Customize Group: Dired you can use the Dired Dwim Target option to default to copying to the other dired window. (customize-apropos <Ret> dwim <Ret> should find it, as well)

Upvotes: 10

Related Questions