From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Unknown Newsgroups: gmane.emacs.bugs Subject: bug#43470: 27.1; Drag and Drop not working properly in 27.1 on OSX Date: Thu, 17 Sep 2020 20:12:56 +0200 Message-ID: References: <0EB1A591-9FE4-4128-96A0-C2A8E36BC8CE@duke.edu> <20200917174640.GB635@breton.holly.idiocy.org> Reply-To: =?UTF-8?Q?Reply-to=3A_Daniel_Mart=C3=83=C2=ADn_=3Cmardani29=40yahoo=2Ees?= =?UTF-8?Q?=3E=0A?= Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7349"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) Cc: "Paul Magwene, Ph.D." , 43470@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 17 20:14:17 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIyQD-0001ok-GF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Sep 2020 20:14:17 +0200 Original-Received: from localhost ([::1]:38726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIyQB-0008Hv-TQ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Sep 2020 14:14:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIyPz-0008Hn-NH for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 14:14:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55692) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIyPy-0007eZ-MF for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 14:14:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kIyPy-0004T6-Hb for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 14:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Sep 2020 18:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43470 X-GNU-PR-Package: emacs Original-Received: via spool by 43470-submit@debbugs.gnu.org id=B43470.160036639017108 (code B ref 43470); Thu, 17 Sep 2020 18:14:02 +0000 Original-Received: (at 43470) by debbugs.gnu.org; 17 Sep 2020 18:13:10 +0000 Original-Received: from localhost ([127.0.0.1]:39005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyP8-0004Rr-C8 for submit@debbugs.gnu.org; Thu, 17 Sep 2020 14:13:10 -0400 Original-Received: from sonic312-26.consmr.mail.ir2.yahoo.com ([77.238.178.97]:38292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIyP6-0004RQ-6k for 43470@debbugs.gnu.org; Thu, 17 Sep 2020 14:13:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1600366381; bh=TBvCIOKEbIrb729MqlsPxZYxL5J3Uj15wRuRMaXo/UM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject; b=EWLCVls4zIdiOPQvwGE5kIyYkg5sJsk6Clbkbrdxf25vg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w7Kgz73P1x6zAss_S9.qQLEyL1o9MW5gSVTyl4nbEBop5uww8iOtM4.iwQ2.wn uk7wOwHaHY6VFCYvz20QVio26vG6EVOjs7.WeyDfZ1 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ir2.yahoo.com with HTTP; Thu, 17 Sep 2020 18:13:01 +0000 Original-Received: by smtp409.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 7045f220e0d039d4230704eaefd55b5c; Thu, 17 Sep 2020 18:12:57 +0000 (UTC) In-Reply-To: <20200917174640.GB635@breton.holly.idiocy.org> (Alan Third's message of "Thu, 17 Sep 2020 18:46:40 +0100") X-Mailer: WebService/1.1.16583 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Original-From: Xref: news.gmane.io gmane.emacs.bugs:188242 Archived-At: Alan Third writes: > > Confirmed. > > Annoyingly I could've sworn this worked just a few months ago. I > wonder if Apple have changed something in their libraries to > completely deprecate the old methods. > > Anyway, It'll need to be almost completely rewritten (again!). Hi, Alan: Could it be caused by an incomplete rename done at https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9624f609493da7c08016ba00d6895bad0fe26a0e? The following patch fixes the reported bug for me on 10.15.6 and Emacs 28.0.50, and also fixes some compilation warnings as well: diff --git a/src/nsterm.m b/src/nsterm.m index 26059ab67c..c40f790e0f 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -5648,7 +5648,7 @@ Needs to be here because ns_initialize_display_info () uses AppKit classes. ns_drag_types = [[NSArray arrayWithObjects: NSPasteboardTypeString, NSPasteboardTypeTabularText, - NSFilenamesPboardType, + NSPasteboardTypeFileURL, NSPasteboardTypeURL, nil] retain]; /* If fullscreen is in init/default-frame-alist, focus isn't set @@ -8592,10 +8592,7 @@ -(BOOL)performDragOperation: (id ) sender { return NO; } - /* FIXME: NSFilenamesPboardType is deprecated in 10.14, but the - NSURL method can only handle one file at a time. Stick with the - existing code at the moment. */ - else if ([type isEqualToString: NSFilenamesPboardType]) + else if ([type isEqualToString: NSPasteboardTypeFileURL]) { NSArray *files; NSEnumerator *fenum; @@ -8610,7 +8607,7 @@ -(BOOL)performDragOperation: (id ) sender while ( (file = [fenum nextObject]) ) strings = Fcons ([file lispString], strings); } - else if ([type isEqualToString: NSURLPboardType]) + else if ([type isEqualToString: NSPasteboardTypeURL]) { NSURL *url = [NSURL URLFromPasteboard: pb]; if (url == nil) return NO; @@ -8619,8 +8616,8 @@ -(BOOL)performDragOperation: (id ) sender strings = list1 ([[url absoluteString] lispString]); } - else if ([type isEqualToString: NSStringPboardType] - || [type isEqualToString: NSTabularTextPboardType]) + else if ([type isEqualToString: NSPasteboardTypeString] + || [type isEqualToString: NSPasteboardTypeTabularText]) { NSString *data;