40

In Dired mode, I can m mark files and R to move them to a destination.

Some times the destination path is too long. With the destination open in a split window, is there a way to move files quicker?

When I see the two dired windows on the screen, I missed the drag-and-drop function in a GUI file manager.

58

From the documentation:

dired-dwim-target is a variable defined in `dired.el'. Its value is nil

Documentation: If non-nil, Dired tries to guess a default target directory. This means: if there is a Dired buffer displayed in the next window, use its current directory, instead of this Dired buffer's current directory.

The target is used in the prompt for file copy, rename etc.

Put this in your init file: (setq dired-dwim-target t). Then, go to dired, split your window, split-window-vertically & go to another dired directory. When you will press C to copy, the other dir in the split pane will be default destination.

  • 1
    Wow, that's great! Emacs is amazing! Thank you. – Nick Dec 21 '14 at 1:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.