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

From: Daniel Martín <[email-masked]>
Date: Fri, 18 Sep 2020 20:34:30 +0200

Alan Third <[email-masked]> writes:
>
> 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!

Here's the same patch applied on top of the emacs-27 branch. Thanks.

>From 4e3dc31ab100467fb39bce6e687aef029f0d3225 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= <[email-masked]>
Date: Fri, 18 Sep 2020 13:36:47 +0200
Subject: [PATCH] Use modern constant names for the NS pasteboard

Use the same pasteboard constant names defined in
ns_drag_types. (Bug#43470).

* src/nsterm.m: Rename NSURLPboardType to NSPasteboardTypeURL,
NSStringPboardType to NSPasteboardTypeString, and
NSTabularTextPboardType to NSPasteboardTypeTabularText
---
 src/nsterm.m | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/nsterm.m b/src/nsterm.m
index ac467840a2..3dd915e370 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -8363,7 +8363,7 @@ -(BOOL)performDragOperation: (id <NSDraggingInfo>) sender
       while ( (file = [fenum nextObject]) )
         strings = Fcons (build_string ([file UTF8String]), strings);
     }
-  else if ([type isEqualToString: NSURLPboardType])
+  else if ([type isEqualToString: NSPasteboardTypeURL])
     {
       NSURL *url = [NSURL URLFromPasteboard: pb];
       if (url == nil) return NO;
@@ -8372,8 +8372,8 @@ -(BOOL)performDragOperation: (id <NSDraggingInfo>) sender
 
       strings = list1 (build_string ([[url absoluteString] UTF8String]));
     }
-  else if ([type isEqualToString: NSStringPboardType]
-           || [type isEqualToString: NSTabularTextPboardType])
+  else if ([type isEqualToString: NSPasteboardTypeString]
+           || [type isEqualToString: NSPasteboardTypeTabularText])
     {
       NSString *data;
 
-- 
2.28.0