TheGramm · 2022-05-15 13:46
I stopped using file managers a while ago.
Complex file operations are done via a shell, the rest in dired.
They only reason I keep a file manager around is to be able to drag n drop subtitles to mpv, because it's the fastest way.
Do you know of any way to enable drag n drop from dired? Preferably under Xorg.
To clarify: I want to drag files from dired to other applications and have it work like it normally would in Dolphin or Thunar
Thanks!
organic-bookworm · 2022-05-15 14:03
Emacs 29.0.50 now has [dired-mouse-drag-files](https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?id=cfedc2872e7ee56e4da6e5e557786ab66ddbbf23#n1445).
**EDIT:** It's only supported on X Windows, though.
_viz_ · 2022-05-15 14:05
But if you don't/can't compile master, then you may look into dragon(1) https://github.com/mwh/dragon.
TheGramm · 2022-05-15 14:49
emacs delivers! thanks a lot!
TheGramm · 2022-05-15 14:50
that's very useful, thanks!
vfclists · 2022-05-15 20:42
That program is in C. How does it integrate with Emacs?
harizvi · 2022-05-16 06:24
This would be a pretty useful capability. Is it supposed to work across all platforms?
I've a pretty recent Emacs from /u/jimehgeek builds installed via brew. It has the said variable, dired-mouse-drag-files, but a drag doesn't work for me.
organic-bookworm · 2022-05-16 07:18
AFAIK, it's only supported on X Windows.
I've also edited my original comment.
_viz_ · 2022-05-16 10:45
The docstring says,
This feature is supported only on X Windows and Haiku.
harizvi · 2022-05-16 16:08
Ah, it's right there. I should rtfm a bit :-)
_viz_ · 2022-05-17 13:25
I use this command (replace xdragon with dragon),
(defun vz/dired-popup-xdragon (&optional arg)
"Open xdragon with the marked files or the file at point.
With optional prefix argument ARG, drag all the files at once."
(interactive "P")
;; xdragon rename is a nix thing, pretty sure.
(make-process
:name "xdragon"
:command (append '("xdragon")
(when arg '("-a"))
(dired-get-marked-files))
:noquery t))