Visuwesh <visuwe...@gmail.com> writes:
> Attached patch adds yank-media and DND handler to attach files in the > clipboard and dropped onto an Emacs frame respectively. > > The yank-media handler for images is well tested, I use it frequently > however, rest of the stuff aren't really tested since I don't use a GUI > file manager. I tested enough to make sure the logic is right so I > don't know if they are ergonomic enough. As noted in the comments, > files copied/cut to clipboard doesn't seem to have a solid spec and most > of the code was written with pcmanfm as the file manager, testing with > other file managers are highly welcome. > > Better names for the newly added defcustoms are highly welcome since I > don't find them to be clear enough from their name. > > The patch compiles cleanly without warnings but I haven't tested _this_ > patch yet, I have these functions in my init.el and have tested those. Thanks. You have only implemented handlers for one of the two protocols employed by X programs to perform drag-and-drop. Lisp code receiving dropped files must also implement an XDS handler, absent which files dropped from web browsers such as Firefox will merely be saved into the default-directory. XDS is distinct from the regular drag-and-drop system in that Emacs is enjoined by the drag source to provide a file name under which the file should be saved, whereas regular drag-and-drop transpires once it has already been saved by the drag source. Refer to (elisp)Drag and Drop.