From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Nick Helm Newsgroups: gmane.emacs.bugs Subject: bug#30929: 26.0.91; Text drag and drop does not work Date: Mon, 09 Apr 2018 13:51:58 +1200 Message-ID: References: <20180325115732.GA52626@breton.holly.idiocy.org> <20180407150119.GA1190@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1523238668 18103 195.159.176.226 (9 Apr 2018 01:51:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Apr 2018 01:51:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) Cc: 30929@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 09 03:51:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f5LxX-0004bO-D1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Apr 2018 03:51:03 +0200 Original-Received: from localhost ([::1]:47375 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5Lzd-0004rl-4A for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Apr 2018 21:53:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5LzW-0004r9-N6 for bug-gnu-emacs@gnu.org; Sun, 08 Apr 2018 21:53:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5LzS-0006rg-QK for bug-gnu-emacs@gnu.org; Sun, 08 Apr 2018 21:53:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35091) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f5LzS-0006ra-K8 for bug-gnu-emacs@gnu.org; Sun, 08 Apr 2018 21:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f5LzS-0001Ox-Ag for bug-gnu-emacs@gnu.org; Sun, 08 Apr 2018 21:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nick Helm Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Apr 2018 01:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30929 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30929-submit@debbugs.gnu.org id=B30929.15232387335333 (code B ref 30929); Mon, 09 Apr 2018 01:53:02 +0000 Original-Received: (at 30929) by debbugs.gnu.org; 9 Apr 2018 01:52:13 +0000 Original-Received: from localhost ([127.0.0.1]:42988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f5Lye-0001Nx-RN for submit@debbugs.gnu.org; Sun, 08 Apr 2018 21:52:13 -0400 Original-Received: from mail-me1aus01on0117.outbound.protection.outlook.com ([104.47.116.117]:20085 helo=AUS01-ME1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f5Lyb-0001Ni-VY for 30929@debbugs.gnu.org; Sun, 08 Apr 2018 21:52:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenpointcomms.onmicrosoft.com; s=selector1-tenpoint-co-nz; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rZ5cVyweZbzks5jMpWqLnM6mY1w2y9ZoZzz9jZK0ukI=; b=WnIRhskSdkK8T7bzJ3DCwRvswmkob832uV3T9Glm4V/tjeZEvJpOBZlK3BGPBB/aCQY0pl7qe9o+6BdNxgO6VDYvMZGPcortn9YvFtEUY8Sb6uwzC64Z6tCPCQH0B+oWNLYFSaE4Wm/67pvCmaZGXdK9uu3Sghk3R9go0A83j1Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nick@tenpoint.co.nz; Original-Received: from oberon.local (125.239.174.80) by SY2PR01MB2908.ausprd01.prod.outlook.com (2603:10c6:1:1e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Mon, 9 Apr 2018 01:52:01 +0000 In-Reply-To: <20180407150119.GA1190@breton.holly.idiocy.org> (Alan Third's message of "Sat, 7 Apr 2018 16:01:19 +0100") X-Originating-IP: [125.239.174.80] X-ClientProxiedBy: SYAPR01CA0038.ausprd01.prod.outlook.com (2603:10c6:1:1::26) To SY2PR01MB2908.ausprd01.prod.outlook.com (2603:10c6:1:1e::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ea48f9f2-a710-4ba6-8fae-08d59dbc7ce4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(5600026)(4604075)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:SY2PR01MB2908; X-Microsoft-Exchange-Diagnostics: 1; SY2PR01MB2908; 3:ciBzz7KLat3t0FpxCu2Qd05J03Ezi8rePnTQZZA1qj0qYnnhes2LMLygFx0cWVN8FQcguN+N/lQHo7oN5rrsHyX6IYYpEcCfC2E5voVcnk8eRAisFNa8vjxvMP7WgKYdSR3v1lywSwLA/GqQr6tHf8fBF6CEUDuOPDkS28RwM1/cxrxYgPZ4NIECF+f7kpMc8b6Iz27mZ1qZ95mwfI6UxUZxy0nnfKLHMDGtwlZX+70QMntBiK8N03od/ggY6U2F; 25:3Y4KsdKCtyo+ScHo/W4dfdRMc0hwA4zCyoWLbo1cD4Pk6fBIUe8YNe/RSNH/jrzlZl3pSACXxGWauLDMsd+nv1CU6BriUULBGiuyMN4Kr0WrpbJf438A/pEV5fEGAbGg9p78DpSXc//SmVRz1U9SeiWnEnROVuNWKuJlca6ZQJob12rUzVc8r46MwALnhheQiGY+RtE3p5aBacU+xz84KqzSSlnN5QMigxm7BOkkYlVyECI5LGQYayPLyo7vY0W6ZAsOlugm/lWO1X+6w3mm5NEyoBt0oqAoImJOuMYGMNi5iN4DZCoNGusmK44iRJua8Ferwz2DNPL6r08PhwryeQ==; 31:d0gTpSziGc2xbHlrqW9RSSx3H2DD9pTjuyyJN1j5zpY8l+84Rr+Y8F7z0mxybCmPTNq3gy3DS80SgOCURF2YSbbHrAZykIwdOF8l9PWIoUFBQEVH6TVg3g5x73bCEkPO4Np7mwZSNRzFID3qAnWwTQJVYKV30HEiRgyforJ6XG3ZLBK+YQ/GG+shPCyRBq24/xtNz3ZzEiL1BUjeGm2GWmfcvJzCQtAQAo71mRRPK X-MS-TrafficTypeDiagnostic: SY2PR01MB2908: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231221)(944501327)(52105095)(6041310)(20161123562045)(2016111802025)(20161123558120)(20161123560045)(20161123564045)(6043046)(6072148)(201708071742011); SRVR:SY2PR01MB2908; BCL:0; PCL:0; RULEID:; SRVR:SY2PR01MB2908; X-Microsoft-Exchange-Diagnostics: 1; SY2PR01MB2908; 4:GqIKIYsqCtF3G0Mlj777xJdn8Fkhfh4TqzWSuxsTK/ytIkBAmOhqMHlPxRpmalwxBcVxulgzCxBnk2HaetGki/R5t8znUMFgsVCW/OE9U+PIDBD6/sNRm5QuN/TGGEahZQqH6XTFJ0C2TCEUqVLFaa6Q0dIhPOZ4/Of4HhAPbiq2XqzvV+n+ZrzeibjBEGw9dlUbvjngHgLGRwGL+WcxsYhIbaX0sui3Pi3hXPodRgXlTE+9QLuwVc5bWHpra4UCaEFGTHqYb+se0kQ7HPNbkg== X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(346002)(396003)(39380400002)(366004)(376002)(39830400003)(189003)(199004)(16526019)(2616005)(956004)(229853002)(5890100001)(52146003)(2486003)(50466002)(52116002)(23676004)(97736004)(6486002)(11346002)(6506007)(47776003)(386003)(446003)(476003)(66066001)(6246003)(76176011)(53936002)(58126008)(6512007)(106356001)(74482002)(68736007)(6116002)(36756003)(3846002)(478600001)(93886005)(2906002)(7736002)(305945005)(6916009)(186003)(6666003)(5660300001)(26005)(486006)(25786009)(4326008)(8746002)(8936002)(86362001)(81166006)(81156014)(8676002)(316002)(105586002); DIR:OUT; SFP:1102; SCL:1; SRVR:SY2PR01MB2908; H:oberon.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: tenpoint.co.nz does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1; SY2PR01MB2908; 23:O66iUV3777fWw4p/h9zhwf1w3VCxTjhSLXEpmZTH+1UfIK4u/SAGiy0oMmzPXkPmJEC46XtoozLixbadgeKQ3QVXjhwW0F01pQ0CTRk2sVHyCIvzIu/ZXrIZnFVVidfzDEVy1nrM640bHwigcsHGH/dQhnE+Q41ZyLKRa5wAn3HpVBFJ3Ms8Rtuc2LNTlq+St9uwYYNQvOehvqwvDUE0YkeeRogD3dG8XDcG6nT+x4WlCarRttOJ45gZdaGRuXLx4/AC/E+1QfyVchmucGjn6+KpYXycF6HZuH390lxXcnVQ03aOdfS7TJVe/NJqRTfNs8xtO9leIs8lQzQlFbTQlLNuOlWD6TP+s72nsr37JIJMF17C2itO6WJ9k9BXtDCOusd8GMCzXIbLnfTUdMb7MrgfVDahwcOLI5ftA1jO0dybYS+6itYvuFWiXr41MXeCUF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brKkqywTWdmK6/m8Xr66eetuIIKQUAfdw==; 5:BHdtE6c2T9/MRhZ+hTvUV4hQCtRbnQrrt1VIJLQbs6xspzaNv9IOprK8v1S6RtYNFW2u5NO2bfC+ZmkZY3cu2/r9OMCf6vAm4RztlqxvN3/DDYUvvimvV7f5vMBqrB+s64YJytUQxGS5lAtbaYWpu1IpsdA87jfmnaj8HAsMUnA=; 24:/D+lH7mLNQiMYQbO9oRLMDzaskkzu0YePuGNEhmO3ynaQxwZPiBguTw/ttRSkVwF8RdryHDacu77uOixx6BoY4i/vhMzbKNg6zHMq/ahNWk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SY2PR01MB2908; 7:5nlzrVZM6myexnQx9peW9uLRbNd3LYRqUOyyDan7XaPv/dnYIT80io1NT3ifrdAK9ZxVfLtRv9BYqIPkALMBp7YSVxOf1Qvvr455klnsh+kDtzH7OyM98okKgQ+yRqgzUBqni9V+8qwO1LPkMVxluimhFGOA0E4jSMzkh7fviyYzDe+i2ZILl47MB/JIkf8bhTVR5WGNwX7b6OZWWI5CicqMElKoxIXyGxKwxobwDOTPp8XglULiQ4FW9VHjAiZH X-OriginatorOrg: tenpoint.co.nz X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 01:52:01.4747 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ea48f9f2-a710-4ba6-8fae-08d59dbc7ce4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: ed686f26-19e8-407b-91d0-7364c1c6f5cf X-MS-Exchange-Transport-CrossTenantHeadersStamped: SY2PR01MB2908 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:145035 Archived-At: On Sun, 08 Apr 2018 at 03:01:19 +1200, Alan Third wrote: > On Wed, Mar 28, 2018 at 10:20:13PM +1300, Nick Helm wrote: >> > It=E2=80=99s setting the actual modifier keys, so when a user changes = those >> > keys=E2=80=99 settings this breaks. >> > >> > You can also set these flags by using the actual modifier keys. >> > >> > This looks like it matches up with what Apple expect you to do, but it >> > doesn=E2=80=99t seem to match up with Emacs=E2=80=99s event handling v= ery well.=20 >>=20 >> That looks about right to me too, it least it matches the general >> approach in the docs. >>=20 >> I had a go at mapping the hardware modifiers to Emacs events (and >> existing bindings) for each drag type and DragOperation mask. Patch >> attached. This doesn't support the ns-right-*-modifiers yet, but they >> should be pretty easy to add if you want to go this way. > I=E2=80=99ve been thinking about this and I=E2=80=99m not entirely sure i= t=E2=80=99s a good > idea to expose these modifier presses to Emacs. At least not by > default. For what it's worth, I think this is a much better idea. It's a significant change from what we have now though. > ns-drag-n-drop is perfectly capable of determining what action to take > by examining what it=E2=80=99s been passed in the event.=20 Based solely on the received operation mask (which may include the user's OS-level modifers) and the data type sitting on the pb, right? > This does mean that the modifier presses aren=E2=80=99t customisable, but= they > will always match the OS default at least. Isn't that a good thing in this case? If dnd is considered an OS-level event, then adding customisable modifier bindings was actually the wrong thing to do. > If there=E2=80=99s a good use case for allowing these modifiers to leak > through then I suggest we make it customisable.=20 Personally, I don't see a need. I think it's better to just do what the user expects, which is what I think you're proposing. Experts can still intercept the event in Lisp (BTW, it's interesting to note that the mac-port doesn't expose incoming dnd events to Lisp at all and silently ignores all the modifiers). If the dnd code gets a rewrite, it would be nice to add support for Emacs as the dragging source as well as a few nicities like mouse pointer overlays on copy operations etc. I'm guessing the boat has well and truly sailed for such major tweaks in Emacs 26 though. Instead, would it make sense to change the default binding on macOS so at least basic (unmodified) text dnd works out of the box for the upcoming release?