In Emacs’ Dired, You could conveniently move files from outside into Emacs by simply dragging them there.

Drag files in dired

That is effective.

Emacs has been my faithful companion for over 5 years, and I just stumbled upon this remarkable feature minutes ago.

Typically, I rely on async-shell-commands to open the current buffer directory in Windows 10’s File Manager, then move files from folder to folder.

But, now, this seeming-trival discovery has greatly enhanced my workflow, instill in me a strong sence that Emacs not only coexists within the operating system, but rather embodies the operating system itself.

While it is true that Windows does not support dragging files to external locations, I seldom encounter such a requirement in my day-to-day workflows.

Have you ever had such an experience? Discovered an amazing feature after a long time using Emacs?

  • desquared@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    The mouse does seem to work in dired, it’s just that it does emacs things, not OS things. :)

    For example, on Windows, I can drag a file from the Windows Explorer and drop it into dired and it copies the file – as OP observed. (Thanks for that, it’s nice!)

    But for the reverse, if I click on a file in dired and drag, it highlights a region, because click-and-drag in emacs does that. Likewise left-clicking on a file opens the file…in emacs, because that’s what hitting RET would do when point is on the same line.

    (There is a nice right-click context menu in dired, but it doesn’t include anything for browse-url-of-dired-file – bound to W – which for the most part opens a file using the default Windows application.)