Subject: bug#43470: 27.1; Drag and Drop not working properly in 27.1 on OSX

From: Alan Third <[email-masked]>
Date: Fri, 18 Sep 2020 13:54:24 +0100

On Fri, Sep 18, 2020 at 02:00:16PM +0200, Daniel Martín wrote:
> Alan Third <[email-masked]> writes:
> 
> > IIRC (and I could definitely be wrong here) a simple find/replace
> > breaks the ability to handle more than one file being dragged at a
> > time, which is why I left it (it used to work fine even though it was
> > flagged as deprecated).
> 
> You're right. I also misread the FIXME, which mentions this particular
> problem. That part of the patch is not correct.
> 
> I think we need to use the same constant names as those that are
> included in the ns_drag_types array, at least until we implement proper
> support for the new pasteboard API. This means that three constant names
> should be renamed in nsterm.m.

I'll have to have a look at the new API again, I can't remember
anything about it or why I didn't use it the last time I worked on
this. If you fancy giving it a go, feel free.

> I've attached a new patch that implements this idea. I've tested the
> following drag and drop operations work correctly after the patch is
> applied:
> 
> - Drag a URL.
> - Drag arbitrary text from another application.
> - Drag tabular text from another application.
> - Drag a couple of files from the OS file manager. It correctly creates
> a couple of buffers in Emacs that visit those files.

This looks good to me. I think we'll want to apply it to Emacs 27
since this is a regression from Emacs 26 and the fix is minimal, so
can you please rebase against emacs-27 and I'll push it there.

Thanks!

-- 
Alan Third