From unknown Mon Jun 16 23:41:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#30929 <30929@debbugs.gnu.org> To: bug#30929 <30929@debbugs.gnu.org> Subject: Status: 26.0.91; [macOS] Text drag and drop does not work Reply-To: bug#30929 <30929@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:41:57 +0000 retitle 30929 26.0.91; [macOS] Text drag and drop does not work reassign 30929 emacs submitter 30929 Nick Helm severity 30929 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 24 15:59:44 2018 Received: (at submit) by debbugs.gnu.org; 24 Mar 2018 19:59:44 +0000 Received: from localhost ([127.0.0.1]:51793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ezpKJ-00080z-TQ for submit@debbugs.gnu.org; Sat, 24 Mar 2018 15:59:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ezpKI-00080n-2S for submit@debbugs.gnu.org; Sat, 24 Mar 2018 15:59:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ezpJ9-00012c-1V for submit@debbugs.gnu.org; Sat, 24 Mar 2018 15:59:37 -0400 Received: from lists.gnu.org ([2001:4830:134:3::11]:56917) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eznqI-0000v0-Gw for submit@debbugs.gnu.org; Sat, 24 Mar 2018 14:24:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eznlo-0007Sc-KL for bug-gnu-emacs@gnu.org; Sat, 24 Mar 2018 14:24:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: *** X-Spam-Status: No, score=3.3 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE, RECEIVED_FROM_WINDOWS_HOST,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eznkk-00069l-Ie for bug-gnu-emacs@gnu.org; Sat, 24 Mar 2018 14:20:00 -0400 Received: from mail-sy3aus01on0134.outbound.protection.outlook.com ([104.47.117.134]:43424 helo=AUS01-SY3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eziHV-00024y-0n for bug-gnu-emacs@gnu.org; Sat, 24 Mar 2018 08:28:21 -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=MoZp9s8peuYa7dPqqwXlJM+9KDrtwBEl2nFenIhUn1E=; b=TGmfGS0NbsxoraqGdK8rnK3SHZw3MqqryUpjta/8UaGBKszmtf24I5TADnIE26uERP7X8KO2w4yNrgQxiEfOwVhfJvk10SKP4s7JviBeEo1qvkwyfxeYAe6MgtZJF4fhVc3ub/yqwbUF7szbW2/EWDq3NNenT3WdxC+7rimP4k8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nick@tenpoint.co.nz; Received: from jupiter.local (125.239.174.80) by ME2PR01MB2900.ausprd01.prod.outlook.com (2603:10c6:201:22::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Sat, 24 Mar 2018 12:28:16 +0000 From: Nick Helm To: bug-gnu-emacs@gnu.org Subject: 26.0.91; Text drag and drop does not work Date: Sun, 25 Mar 2018 01:28:11 +1300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [125.239.174.80] X-ClientProxiedBy: ME1PR01CA0147.ausprd01.prod.outlook.com (2603:10c6:200:1b::32) To ME2PR01MB2900.ausprd01.prod.outlook.com (2603:10c6:201:22::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c7352a9d-c6f9-4d2a-adc7-08d59182b811 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:ME2PR01MB2900; X-Microsoft-Exchange-Diagnostics: 1; ME2PR01MB2900; 3:K2jOOJa9cijkQU/LtGrV4wzsiy18j9vtAXPv9jxlke75jBB5i7R+KdkC1L8bJdguZ8EuksjOwGbveeBI2nPKrUV9WyAmLb6D+er+iVyL1C6QwHvEh99x9KXVdS4kXkYy79aKbDASPicME9nNOMDm80MG/Zb2gv+qNEl3aOtN3FRNThoNCtTZogEOqyUqj+O3HWun3qZ2n3vTOXIeOfKbSKrLjUkQmiX53rPKrnieTCBIBj65qj2p0TzYGlzu0sBN; 25:EgK2HbeKzP55gH8AajDvSeZNP8VmkJ35eKHgtE1BOPAJeA+Suc+sTeZyGnN+gq9FfSBCZtrEweDFdGx9cTs0aaVy7NWyqET7tg0b01U9980pLVbRBf5BSVBP8RtZYIutz/aCHCt2Pn1fpbPt/nMtMiI+YfgmGIs62OyHe9+zB1uK91DhR5a1hhX3EXBPtGEmFYutczMLHRUpW3/PEdX5369goaUeMZeLViXYMq6nh1mXSPzWvLHjBR85r5FB2Fw6CEt7j6HKdB7NcRfVx78FQgzyq5tEiZEVMwauSJXyNAUartPUJRy6kXFsuvkFE62Bra9YJ92VPn2gMrcztySomQ==; 31:HafeiiMJod1rgYXZBNk7TgrUq+GdTN5mPSPStjmR9ioFb7J4MpGUdeBR+d76lUcIsndeZU1kmowUJ4zyYzzMB/leKN7wMRsi/aPBSso1OxESrbg6YvhPyGWsKtubo6K3RJT4aW6SJ05mWNthO9lDvY5Ta8kt3GSbJWqJ0+qgcTNiYv5My7VTkUnY6zvc2qrhFTYeTJGEnCBIqvpVi5j8OCEY7Uy+fJKldjmK2Ljva0E= X-MS-TrafficTypeDiagnostic: ME2PR01MB2900: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(158342451672863)(265634631926514)(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(10201501046)(3002001)(6041310)(20161123560045)(20161123564045)(20161123558120)(2016111802025)(20161123562045)(6043046)(6072148)(201708071742011); SRVR:ME2PR01MB2900; BCL:0; PCL:0; RULEID:; SRVR:ME2PR01MB2900; X-Microsoft-Exchange-Diagnostics: 1; ME2PR01MB2900; 4:6+zY3BPndT1/h3qQqGGKn1RQNVWpAOnDMlR4X9r44OV36nJL/gUvpZ055r1bxE8/5QtIDmNrq+yf7qFyFvw3SUzXmNoY3sDAICPf9NqxN4eufL34da8jXHGc+DunBPe3vZ0OVQqTISjvt1lOezck2rl/ChKvIkWXjMDaPFsCMXpKX4r2pT+cHhSiFjhjHo0wFdW5XKRLrGVHPOoNuY3TdyJQ02laHDW5ziiuqKM5Y8KwQkF7ndEYXlDBCW0HilnKTbklLJW29zzJ4g/B+qCEs++r38oI/UIWOGveuoi9hyE4TS61wc7sMq1UGA3NDkbZNTJ5NwbDTO6MtDwJTInlRpBOwXCaObcjhUki6ZJzR6Qy67jb2gyPQ+nmy0tChjLK X-Forefront-PRVS: 0621E7E436 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(396003)(366004)(346002)(39380400002)(39830400003)(376002)(377424004)(189003)(199004)(2906002)(68736007)(2351001)(5660300001)(6486002)(66066001)(316002)(478600001)(6512007)(53936002)(6116002)(8676002)(47776003)(956004)(8936002)(6916009)(81156014)(16526019)(551544002)(81166006)(45080400002)(105586002)(2361001)(36756003)(3846002)(106356001)(58126008)(6506007)(186003)(97736004)(7736002)(51416003)(25786009)(26005)(305945005)(48376002)(6666003)(86362001)(52116002)(74482002)(16586007)(59450400001)(386003)(50466002)(2616005); DIR:OUT; SFP:1102; SCL:1; SRVR:ME2PR01MB2900; H:jupiter.local; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: tenpoint.co.nz does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; ME2PR01MB2900; 23:eV2/00XYaitYVVH21OxzDKPFsCAd7UinkSEUQXHNZ?= =?us-ascii?Q?R57GbISqKwdzo47iiGArNurD1Q14n3cYF1CVre0xGomV8gC0Wk7Pr0MNaAGP?= =?us-ascii?Q?eOkAu8KVdisJqSysZT5yG9B6MS+HyxAaDVKziLz5qsVPd16zNtDfTVB30fPP?= =?us-ascii?Q?yK2sXNQUY9MHSNjxAfQ6JKBuMsHFghpb47kKuOJ0Esj9i+CoPO7tcODersug?= =?us-ascii?Q?bLVh8JVjtDkbvblutal42iT+LMd8bE/d+J2oN0Oo4iVc3E4RQN6exkGNJjD0?= =?us-ascii?Q?fmyaNCubdLWTxfeAG8LMF1JLFkwUwk9kK3yv1IF9GrZ+JpH0npKRVds9NsXk?= =?us-ascii?Q?lXn74N2v5kxMA7JNzj2v+PfR2v3h2ai13+PXiGIOr8EbTd2h1x/C+3+ZloO3?= =?us-ascii?Q?HqZB1oQC8J2PtDTm7hSqFewqfN0Jr1+XLRDk6Kj46MvT9W+kQQYImAPqTSoH?= =?us-ascii?Q?fd5pk9/Ee+IMJEMi/HHNIpUWGnP/b75L1v9ZSqCxuE/y7wJJDkurw/Q1Wgz9?= =?us-ascii?Q?R/NQRBBdjz0pgc1GnQkl8/R7ee9pgMepl8dQFUtcr+kT1caUe1vDGqzOhOuY?= =?us-ascii?Q?fgOOXT1xOLcYnTnZRvBUCPm5GEu657Ox8nbSJwBvplxAdY3lzQd9lBIT/8n+?= =?us-ascii?Q?3TYCL8H0GgjLGpWafpjN9RYS9gO7/dWvHxOlkfizM6vKAWg9f0aFMOp42pHd?= =?us-ascii?Q?tw9A/Fw7ujIz1YUIbtxfe2Hzu1dfSergyA5Qj34luvin3z0kQ3wVVcKLjbvn?= =?us-ascii?Q?P8dPrGcT7fQ+dVgze+omIGTKPj4BAauwemiztcWGXcGlpfvR7Qw/GjboF7f/?= =?us-ascii?Q?cbfahW2OtfTYPJh5yqJsvkMXTrcu9455eSGh4xqKdPFetqScdKmlkZD7q8tC?= =?us-ascii?Q?zD9eOx9ciGzw9IqRWAY39s5hDT1ym8xiCAYIwHji13LnxdPFd+SQfeMVaToX?= =?us-ascii?Q?dCOoIoPgMeDRY8rznFe5P35XImNYztovkYxF5ddhMlP8oPfk7ufgo1JYN6jT?= =?us-ascii?Q?uCLwB/KM5/o3MmGQJu5sf9fp3dLg9w+9XByvYQRUTZw3bS0jq3s97H2TVCHi?= =?us-ascii?Q?wXqJotvJwEXBODxFMtlacBY+N981PLtjIjYfNQutAfHe9XTFMdMnolVJNzin?= =?us-ascii?Q?8VS8qD1AB3qlSO8JMjBKxo/EGVwE+GcLDsgbLOFzCs/Sw54bG17vRxBiFx59?= =?us-ascii?Q?PtZbr2xSroKFhCikdUOO0ScTSuLFmf4N/lHMLHju59qNkwhZKdq8LcRxA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Antispam-Message-Info: rcGSKI8YbeWWtXPrKQmxmt9gN1b9fzcnWhwj2cscUbB6NmB1DQckebEHIbYHpORyc7ohrJ1cJKe71XLtL6KMEMS87zdSHLERjeV1P+BLPvzaCTuLfu5dIndrryMF8PFWK093wTnOvIO4z/IT3p2e4DejHB5h0A3rDz6KVzrl7jTVx2aZb8l03Q9YmxP71z6l X-Microsoft-Exchange-Diagnostics: 1; ME2PR01MB2900; 6:SvhaEU8vCyoThbev2BSslm+0BNeeWuDeB+8mUx+yLJNZafrJ1ggy4XDgQwLG39/8tX0hzkoUX3FBNEeUEDC/mV265LaoshGHPTiKh5k/D/J7t6xfHiUgmE+LjYxiKFYVWotQ59mNBd2dZ7/dgn7YXYKcIr9TFmluBHYtMkOF+vczM/gxXNGeeKrL/YBktGmDbMxkPUhEvQ7XzScGb+rjoh21vae5ah2JgeeoT2DGOyKkWl7G8+VDzHDtaII2dtEjUR0/VyQf8yLBxOur4InABZDbOiOhu1R7b8rS3iDVtxWy9IjmOOlBs1eppjxhGmtDRQsWSnA4WBQVQN4JYISBNpUlc5fIfjzc9UUI9vLKN9TcYpR+1jSF+igxehM6t61x1X/WhQAs5sffO8bLHignvCoe8nSn9wrRDPWfLvQPTGbDtbS7MFeD5khSMLnmRplpq53j+zgzG+buV713N4ciGw==; 5:i1frxFChboEvTBOFEt4fFi2P4N4x/Hxji6IO062E4eZgmMIt/0oI+NEKylqnE/Kym04b4PFYuv0zZGZ3vY9Tz3+IFmf2hshHXtGKWTmfuhSJENEpzi3Mg4OTieLpcFAtzEj+AHSQL5AnpW0hwU4WbbDn/5w46Rnm0SYltBBYGoQ=; 24:foyLfnNkqHfu1XxvB+dknnmE/35JD+t6MDql6li5VXbkT6p2vopSY6aPt/ll1STyPc+UgETCuo8Wyqq+PAUqBVj27lQucdnnZpxwPvsW3nY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; ME2PR01MB2900; 7:XNitp5bEoKvfk9/z723vYovsr0+wPLca0b+XdFMqaoHb9obHPrz7mP9D8xRVqgDmQ09jsuH/tn+0Z56XXbmbckPRvcjAAYPhcM3pGbAJWpDUI0hnrAtkMvxxPCvsuSAptI7z2IZBOg61RouzBXEwbYx73Kd1/6wfjr8mAVcKMqUIUbM98aVcKx9HDURu5frp/pmuC9OGCstmnYc2pNxNDwavJ+GVF4NnPHnWh7PMpTKgGLQD3wHOKikZ+GkwAbxa X-OriginatorOrg: tenpoint.co.nz X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2018 12:28:16.0704 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c7352a9d-c6f9-4d2a-adc7-08d59182b811 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: ed686f26-19e8-407b-91d0-7364c1c6f5cf X-MS-Exchange-Transport-CrossTenantHeadersStamped: ME2PR01MB2900 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) On MacOS text drag-n-drop does not work out of the box. Also a dnd event seems to be bound to different functions depending on modifier settings. Emacs -Q C-h v ns-command-modifier -> "It's value is super" C-h k -> " is undefined" (setq ns-command-modifier 'none) C-h k -> " at that spot runs the command ns-drag-n-drop-as-text" (setq ns-command-modifier 'control) C-h k -> " at that spot runs the command ns-drag-n-drop-as-text-other-frame" etc In GNU Emacs 26.0.91 (build 1, x86_64-apple-darwin17.4.0, NS appkit-1561.20 Version 10.13.3 (Build 17D102)) of 2018-03-22 built on jupiter.local Repository revision: f8cad16bb3272a8069b3008019f9d18516aef1a5 Windowing system distributor 'Apple', version 10.3.1561 Recent messages: Opening nnimap server on Office365... Opening connection to localhost via shell... Opening connection to localhost...done Opening nnimap server on Office365...done Opening nntp server on Gmane...done 1 new newsgroup has arrived Checking new news... Reading active file via nnnil...done Reading active file via nndraft...done Checking new news...done Configured using: 'configure --with-gnutls=no' Configured features: JPEG NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS THREADS LCMS2 Important settings: value of $LANG: en_NZ.UTF-8 locale-coding-system: utf-8-unix Major mode: Text Minor modes in effect: savehist-mode: t global-eldoc-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t visual-line-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow gnus-cite sort mail-extr nnir emacsbug sendmail gnus-demon nndraft nnmh cl-extra help-mode utf-7 network-stream nsm auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs starttls nnfolder nnnil gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap nntp gnus-cache gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message rmc puny seq byte-opt bytecomp byte-compile cconv format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr wid-edit time dired-x easymenu dired dired-loaddefs pcase savehist easy-mmode iso-transl edmacro kmacro cl-loaddefs cl-lib gv plain-theme time-date tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 282192 18056) (symbols 48 28457 1) (miscs 40 54 283) (strings 32 54201 2932) (string-bytes 1 1603692) (vectors 16 43788) (vector-slots 8 823234 17468) (floats 8 217 385) (intervals 56 246 0) (buffers 992 16)) From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 25 07:57:43 2018 Received: (at 30929) by debbugs.gnu.org; 25 Mar 2018 11:57:43 +0000 Received: from localhost ([127.0.0.1]:52164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f04HP-0003eN-3S for submit@debbugs.gnu.org; Sun, 25 Mar 2018 07:57:43 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:39600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f04HN-0003e8-Ir for 30929@debbugs.gnu.org; Sun, 25 Mar 2018 07:57:41 -0400 Received: by mail-wr0-f181.google.com with SMTP id c24so16167890wrc.6 for <30929@debbugs.gnu.org>; Sun, 25 Mar 2018 04:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Uex/N8k1hofXTqckWMOvR5gjSkpq8AWZ/V6hrga+Dq0=; b=PV3c4WBC0nEjLDPxm5UK4Qx5RkQeQ422jqHoAPEkicqd40NxNV4tQ+RQMNjakSsQFt ImmfbxnyUd3C80IuQ0FrHlhkRSNRFK4a7c2JpcCArdn78TwAdaqe48RKMjr1vAmpgnyy 4O0Ije7TmgRmqP5WgDFmjdNQk4ICG3y+F1syJHZT3bNr1y4nvSZAwvnFlyeEYqyKDD/d YLLNqG5QPdg6ILDUBtwySFbge6z7eKNORRL1RrKnrKo1VeZy047EPeBfjgLs2Wy+FCFe Ml2EEUp6rbfWG5+kwo9S7dNHQwcB+irebsMUlW3Apj0HYIaoSBDOkbATl69wceEyN9Hc 1+RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Uex/N8k1hofXTqckWMOvR5gjSkpq8AWZ/V6hrga+Dq0=; b=eYK/mMOgyfoMmZt+W/WL36Ouzy3w+ETJYaH7ySbTPTGPoRE76G8rD5jm2P0Wio7KDU 0FTa71VzLtjAVVnb/kE9842oKyFxrmXkQItc+wJjZ0Tpg92NRKivNRcb1szt1zsv+bFV ybknsOWY5M+jjDeZbsfWZBQsK0o5/tUaJplT4a7LxlxT4gLiKpO8HZlfwiWHtjTY7pJw qEisjnX0GNz1/ujzp6dE12RFd4enpcMS1Xg20NmO5tx6wM20xNLLiQN3wR6EIV7DJI3t mGxmki32lPcw4gr2/Neb9mMRTcTlEotyoXzOMsPNPOgY3g0mmSsthXAQmpx5+aahtdI/ h3EA== X-Gm-Message-State: AElRT7HwP6mDyD34yqWRCHrq1Jum2Buq1gD+MZXWU5zkVmM8st/GGJ43 VMJroZZ35xyQwr1ldXDX0+3dwQya+/Q= X-Google-Smtp-Source: AG47ELvdyFekft3Ytv3jQ/hBNlbJ4B/7aQ/NCZ4aYrti/iExdf9of6UR/JNm/hJ1Ece3DnvvK3+QTg== X-Received: by 10.223.182.132 with SMTP id j4mr27808023wre.66.1521979055555; Sun, 25 Mar 2018 04:57:35 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-d867-79aa-2be9-0ac9.holly.idiocy.org. [2001:8b0:3f8:8129:d867:79aa:2be9:ac9]) by smtp.gmail.com with ESMTPSA id d18sm1245070wre.5.2018.03.25.04.57.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Mar 2018 04:57:34 -0700 (PDT) Date: Sun, 25 Mar 2018 12:57:32 +0100 From: Alan Third To: Nick Helm Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work Message-ID: <20180325115732.GA52626@breton.holly.idiocy.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Sun, Mar 25, 2018 at 01:28:11AM +1300, Nick Helm wrote: > > On MacOS text drag-n-drop does not work out of the box. Also a dnd > event seems to be bound to different functions depending on modifier > settings. > > Emacs -Q > > C-h v ns-command-modifier -> "It's value is super" > > C-h k > -> " is undefined" > > (setq ns-command-modifier 'none) > C-h k > -> " at that spot runs the command > ns-drag-n-drop-as-text" > > (setq ns-command-modifier 'control) > C-h k > -> " at that spot runs the command > ns-drag-n-drop-as-text-other-frame" Looks like this is how the modifiers are set in performDragOperation if (! (op & (NSDragOperationMove|NSDragOperationDelete)) && // URL drags contain all operations (0xf), don't allow all to be set. (op & 0xf) != 0xf) { if (op & NSDragOperationLink) modifiers |= NSEventModifierFlagControl; if (op & NSDragOperationCopy) modifiers |= NSEventModifierFlagOption; if (op & NSDragOperationGeneric) modifiers |= NSEventModifierFlagCommand; } modifiers = EV_MODIFIERS2 (modifiers); It’s setting the actual modifier keys, so when a user changes those keys’ 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’t seem to match up with Emacs’s event handling very well. I’ll have to read up on it and have a think to see if I can work out a solution. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 28 05:20:33 2018 Received: (at 30929) by debbugs.gnu.org; 28 Mar 2018 09:20:33 +0000 Received: from localhost ([127.0.0.1]:56542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f17Fw-0004Qv-Qb for submit@debbugs.gnu.org; Wed, 28 Mar 2018 05:20:33 -0400 Received: from mail-me1aus01on0102.outbound.protection.outlook.com ([104.47.116.102]:4352 helo=AUS01-ME1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f17Fr-0004QX-8t for 30929@debbugs.gnu.org; Wed, 28 Mar 2018 05:20:30 -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=P+gyoqg2yzLASj9kHkcURS4nJtyeBFmkw2AVjxFnmv0=; b=l7T2wIpLV5XL6VbCE7oJuI+/iswcmOfBeAEeylDg3o5XzJignkqv3w2oru49IJo+ga9Xe7QgvhrU4IlkNyHzoKMrw4zFkQ7oouLXT4HSm/5SeSy/ZlDb63lL7AUCVBlOT1TKol+SXwycvEljVvc42mZItfPZiQnmmvgE6tDuZ7Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nick@tenpoint.co.nz; Received: from jupiter.local (125.239.174.80) by SYAPR01MB2909.ausprd01.prod.outlook.com (2603:10c6:1:10::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Wed, 28 Mar 2018 09:20:18 +0000 From: Nick Helm To: Alan Third Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work References: <20180325115732.GA52626@breton.holly.idiocy.org> Date: Wed, 28 Mar 2018 22:20:13 +1300 In-Reply-To: <20180325115732.GA52626@breton.holly.idiocy.org> (Alan Third's message of "Sun, 25 Mar 2018 12:57:32 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [125.239.174.80] X-ClientProxiedBy: ME2PR01CA0009.ausprd01.prod.outlook.com (2603:10c6:201:15::21) To SYAPR01MB2909.ausprd01.prod.outlook.com (2603:10c6:1:10::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 058ec655-8a21-4437-447c-08d5948d1feb 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)(49563074)(7193020); SRVR:SYAPR01MB2909; X-Microsoft-Exchange-Diagnostics: 1; SYAPR01MB2909; 3:Hw0Q+WriLCWqaoPakiMpnoYsjn9N3MuumYjA5hK8tSGpcq1lAawuX9fzuThT6DyxOGLna8z4vtIq52+wzsmA5KZQiN3MFmkzOIwWJM0xznUGQUG6L86rVzfmaCMV0s04+9fLaIDtlA3EJ/GE0lvlLNBiDEK2X6zg9tXBx53NtiHpzSyuTb6DcO+3CNBbCw8OPjfR3MvrSY9uM/EgQH3prTXGpcHT7A93wZdaXOUTJmvgMBpUjkNKEqBSoPegAkLa; 25:Vj9Xb340ns62SWgvsr1f8+fAadx0e6LGpIKgifpCGZOnsCaqmGYjdqZCUl4n6CApjQoIvC1cJxvzs1A+Xs5/Rxb6YltCI6ieXTM/klmIzLlCLQWfYoZY7PqVE+Lp7kL2blaHmh6bfRnVwVM6DlFu4xIVFVFFfkZqgo5POVvH0KTGR1QBewv1H2+sEVd0ox3xmIYH1WboeG8H/B99rTrKyNKgu2dDIS8wgEovh1hFK87X7zIVZDBUQTWeBBQoq6eflNYRzO1q9pu3pqQ84gyeovWE6CNxh9OCQsPHNzcx94m4hHfnz8tz1/IzU4HdaguzgzlNcnB3lCIJC1X5ZbtqlQ==; 31:JllRf/solhK+wq2Ze1BrzmoNRm8DxZXQ0Vm4B6Z0R/TZYrpOHT0T6chyfjFCOC7Morq8IM2dnqVlHLXQm21T97AQv6cOJeJ4YwFqHvc6on6ap0dtR8E5gG0KPYZUKGd8EY9fKc+hGRy39IfaYFOuOAHzgvljkOFlU6uqp2B1mzQDq3FEDzDeCjj9ffVru/gQMEr0t3uzSeHLoBX5hQCVYPetiKl5A8qJumG1oVgC6Wg= X-MS-TrafficTypeDiagnostic: SYAPR01MB2909: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415395)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501327)(52105095)(10201501046)(3002001)(93006095)(93001095)(6041310)(2016111802025)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(6043046)(6072148)(201708071742011); SRVR:SYAPR01MB2909; BCL:0; PCL:0; RULEID:; SRVR:SYAPR01MB2909; X-Microsoft-Exchange-Diagnostics: 1; SYAPR01MB2909; 4:lzofBfYzSQCcH8gLyjHmZLVfiIGN22l30qVMxXW+jP2+AbvYmis9Mn+4Pd57diR+x41vIL8dbEETfVRQvTBRPwrwnxMtQ10is4BhBa3AtLeRG+OsX7GrZqHhWeoOwqcskUxGWBhORmmw76W1ZlDAAhJhoYyyl2LYsXAwjxlBvf0ZTTX9QknHx3qKo+bd53SnurbuJf1kdBquLqP3rNOqoCUBWxmw+3opziOIMlugHz1VZfKCt22O0KNtv5ftSUYVzQAZhVBtPJvnyh1zI2Kfdw== X-Forefront-PRVS: 06259BA5A2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(39380400002)(346002)(366004)(376002)(396003)(39830400003)(199004)(189003)(74482002)(5660300001)(84326002)(6512007)(53936002)(11346002)(2476003)(58126008)(6916009)(478600001)(4610100001)(4326008)(8936002)(105586002)(3846002)(229853002)(76176011)(6116002)(33964004)(106356001)(52116002)(446003)(86362001)(6506007)(386003)(26005)(316002)(68736007)(16526019)(97736004)(568964002)(6246003)(2906002)(16586007)(476003)(486005)(956004)(25786009)(2616005)(486005)(6666003)(6486002)(5890100001)(36756003)(305945005)(186003)(81166006)(81156014)(8676002)(7736002)(66066001); DIR:OUT; SFP:1102; SCL:1; SRVR:SYAPR01MB2909; H:jupiter.local; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: tenpoint.co.nz does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SYAPR01MB2909; 23:iSTRSyXkXmKAkxX1PT3bV9UuOwmBny9tPZJzUqgLZ?= =?us-ascii?Q?lVDBfb1eqCBXXO+4yK94xoWIerDgO6/Q8X9/UzoyATpWBu4nKyVthv/5YyX0?= =?us-ascii?Q?dx1TOoEfOG8HOtGebybp/TdCso20A3xBjIsDmXlusu84t+Su/KqMg6f7s8Fn?= =?us-ascii?Q?5f2VZgDdrut1hhfQ3x5D32ePS202GDDn2tncvuk986/LmerPoUD3WNEjPZVE?= =?us-ascii?Q?4eVAWJ2pbB+sZb9+usCjnz4YP+Lu4TGEvFr43/FJ2wgnmZmEoLDisl4vTkXt?= =?us-ascii?Q?W6FBWSHc9mcMdIXjv/jA+b8/tBrZVnxwUAR7sP0/MBAkxk31GGO/Pr7qgm23?= =?us-ascii?Q?whyj/u4duG63+fmHLXEl3lnmocUf/CLoL7tJT3r9jST3Y9Bi2sCuUSGRuF4p?= =?us-ascii?Q?NHkiTcoP8N4IlanGsoZWBWY8M4BB15MnJc1+yM8n//Bivyvn+4IHjbgz3RWE?= =?us-ascii?Q?KcsyuSV2GxQ3iiaN1A6XmNO0Jszl0bQPP+Er/Uq7FilmhcENxkMf74Ai4B10?= =?us-ascii?Q?3ez72D14cLikjpxklJWMpLBD3PnX4krXr+l4YGPaCr69yrmewJPXqYnmMj3d?= =?us-ascii?Q?tWkFNPL96nALdO2hK2CCf0dx3EN6LbX8iyeqR4dpsZEeDUtauFo3ALwS9XM8?= =?us-ascii?Q?c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mxkQDgy/RIq8C2SvpKd+eH5E1R/mCAn9Dz X-OriginatorOrg: tenpoint.co.nz X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Mar 2018 09:20:18.6323 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 058ec655-8a21-4437-447c-08d5948d1feb X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: ed686f26-19e8-407b-91d0-7364c1c6f5cf X-MS-Exchange-Transport-CrossTenantHeadersStamped: SYAPR01MB2909 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Alan, On Sun, 25 Mar 2018 at 12:57:32 +0100, Alan Third wrote: > Looks like this is how the modifiers are set in performDragOperation > > if (! (op & (NSDragOperationMove|NSDragOperationDelete)) && > // URL drags contain all operations (0xf), don't allow all to be se= t. > (op & 0xf) !=3D 0xf) > { > if (op & NSDragOperationLink) > modifiers |=3D NSEventModifierFlagControl; > if (op & NSDragOperationCopy) > modifiers |=3D NSEventModifierFlagOption; > if (op & NSDragOperationGeneric) > modifiers |=3D NSEventModifierFlagCommand; > } > > modifiers =3D EV_MODIFIERS2 (modifiers); > > It=E2=80=99s setting the actual modifier keys, so when a user changes tho= se > 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 very= well.=20 That looks about right to me too, it least it matches the general approach in the docs. 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Improve-handling-of-drag-and-drop-modifiers-on-NS.patch >From 9a177de5bacde98ef5c513c73f7aa48b58909af4 Mon Sep 17 00:00:00 2001 From: Nick Helm Date: Wed, 28 Mar 2018 21:06:59 +1300 Subject: [PATCH] Improve handling of drag-and-drop modifiers on NS. --- src/nsterm.m | 56 +++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index c8ae31abc0..4ad60d1b6a 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8115,19 +8115,6 @@ -(BOOL)performDragOperation: (id ) sender pb = [sender draggingPasteboard]; type = [pb availableTypeFromArray: ns_drag_types]; - if (! (op & (NSDragOperationMove|NSDragOperationDelete)) && - // URL drags contain all operations (0xf), don't allow all to be set. - (op & 0xf) != 0xf) - { - if (op & NSDragOperationLink) - modifiers |= NSEventModifierFlagControl; - if (op & NSDragOperationCopy) - modifiers |= NSEventModifierFlagOption; - if (op & NSDragOperationGeneric) - modifiers |= NSEventModifierFlagCommand; - } - - modifiers = EV_MODIFIERS2 (modifiers); if (type == 0) { return NO; @@ -8141,13 +8128,24 @@ -(BOOL)performDragOperation: (id ) sender if (!(files = [pb propertyListForType: type])) return NO; + if (! (op & (NSDragOperationMove | NSDragOperationDelete)) && + (op & 0xf) != 0xf) + { + if (op & NSDragOperationGeneric) + modifiers |= NSEventModifierFlagCommand; + else if (op & NSDragOperationLink) + modifiers |= NSEventModifierFlagControl; + else if (op & NSDragOperationCopy) + modifiers |= NSEventModifierFlagOption; + } + fenum = [files objectEnumerator]; while ( (file = [fenum nextObject]) ) { emacs_event->kind = DRAG_N_DROP_EVENT; XSETINT (emacs_event->x, x); XSETINT (emacs_event->y, y); - emacs_event->modifiers = modifiers; + emacs_event->modifiers = EV_MODIFIERS2 (modifiers); emacs_event->arg = list2 (Qfile, build_string ([file UTF8String])); EV_TRAILER (theEvent); } @@ -8158,10 +8156,22 @@ -(BOOL)performDragOperation: (id ) sender NSURL *url = [NSURL URLFromPasteboard: pb]; if (url == nil) return NO; + if (! (op & (NSDragOperationMove|NSDragOperationDelete)) && + // URL drags contain all operations (0xf), don't allow all to be set. + (op & 0xf) != 0xf) + { + if (op & NSDragOperationGeneric) + modifiers |= NSEventModifierFlagCommand; + else if (op & NSDragOperationLink) + modifiers |= NSEventModifierFlagControl; + else if (op & NSDragOperationCopy) + modifiers |= NSEventModifierFlagOption; + } + emacs_event->kind = DRAG_N_DROP_EVENT; XSETINT (emacs_event->x, x); XSETINT (emacs_event->y, y); - emacs_event->modifiers = modifiers; + emacs_event->modifiers = EV_MODIFIERS2 (modifiers); emacs_event->arg = list2 (Qurl, build_string ([[url absoluteString] UTF8String])); @@ -8183,6 +8193,22 @@ -(BOOL)performDragOperation: (id ) sender if (! (data = [pb stringForType: type])) return NO; + if (! (op & (NSDragOperationMove | NSDragOperationDelete)) && + (op & 0xf) != 0xf) + { + if ((op & NSDragOperationCopy) && (op & NSDragOperationGeneric)) + modifiers |= meta_modifier; + else if (op & NSDragOperationGeneric) + modifiers |= (parse_solitary_modifier (ns_command_modifier) + | meta_modifier); + else if (op & NSDragOperationCopy) + modifiers |= (parse_solitary_modifier (ns_alternate_modifier) + | meta_modifier); + else + modifiers |= (parse_solitary_modifier (ns_control_modifier) + | meta_modifier); + } + emacs_event->kind = DRAG_N_DROP_EVENT; XSETINT (emacs_event->x, x); XSETINT (emacs_event->y, y); -- 2.14.3 (Apple Git-98) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 31 00:31:30 2018 Received: (at control) by debbugs.gnu.org; 31 Mar 2018 04:31:30 +0000 Received: from localhost ([127.0.0.1]:60574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f28As-0006kL-7D for submit@debbugs.gnu.org; Sat, 31 Mar 2018 00:31:30 -0400 Received: from mail-it0-f41.google.com ([209.85.214.41]:36194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f28Aq-0006k9-E7 for control@debbugs.gnu.org; Sat, 31 Mar 2018 00:31:28 -0400 Received: by mail-it0-f41.google.com with SMTP id 15-v6so2958516itl.1 for ; Fri, 30 Mar 2018 21:31:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=my9qtORabaSq00Mi7CeNZaVEe5jBtzNc19b5g8wnC6Q=; b=lrhzewQTWVzPYvObDuBDr99r+7Q/2mNSI2dnCXSHwbaYUHyF2h6PNQESBztMU3jk6N 6DmOq3wtphb1OSqErcEfxNnBLixp2HEq5FAJGDYu1I9mZVi6B4+z5F0vuYDj1F58An+2 SRiWvZgVoDnYwwidHp+Ef4C8AA/8F3qY/s2lI0QE9qDem2F4f0p5MGngTMlQCqif7KkA J83e+ZFOnM3O3EaDmwVCWM/ThuLgnrkoq/ecFPc9RFr1tHhmEhwwBJE6W3+ZDTxoAYJe 276cFoq1o32lqRqUPbztyDLzvJL4XEh6YPZWXCjNkWzoZ0A34bfluEw/0s+0ed8FOhdA 7cjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=my9qtORabaSq00Mi7CeNZaVEe5jBtzNc19b5g8wnC6Q=; b=ht8krKdKzs/V38Mf9kmkUEED8bXsyDpKMAX7mbuqtkDyQVofQXjfQP9MplqiOdRLeu kraFXXs3KKklQLpYTlJ0t1JdZjR5seHm+N2RuIfppigo3sh1/UQcJeNdeFQ8xLx4Ymm7 HtENukwsEqN8At5NBLCa/mIN2Cnaw8YNgOdt2tIx1zbeAHOE/y3MOjlauSbNOHuxUOY3 XA5a6Xt+XGJWxX4Dq/7QoB40IDX+quFpN9c3CECzDnaPPmf1Rus/9UbaeBYucDSx7yDm A02ObE4QpL6MpO9Glg2e3CHW+J3dtcxQgZ6cjzzyMoLD2i+JbXRd8gFdHJ/07nTD5FcF ikhw== X-Gm-Message-State: ALQs6tC+7BcqTBK2SVEtY/Wudva9Ujb6yp/ufFL2a/XkS25BurJOsHId d93/45zVTSssbpWQq46z04SnxQ== X-Google-Smtp-Source: AIpwx4+7FjDdplpCV21A/xxdd9zswgwqahsmTLBH0qRl/Jss6abBpoMNN8c6KOftTDfCHTqG9nq8vw== X-Received: by 2002:a24:cdc2:: with SMTP id l185-v6mr5487321itg.41.1522470682880; Fri, 30 Mar 2018 21:31:22 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id e142-v6sm1489556ite.3.2018.03.30.21.31.22 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Mar 2018 21:31:22 -0700 (PDT) From: Noam Postavsky To: control@debbugs.gnu.org Subject: control message for bug #30929 Date: Sat, 31 Mar 2018 00:31:21 -0400 Message-ID: <87r2o0q31i.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) retitle 30929 26.0.91; [macOS] Text drag and drop does not work quit From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 07 11:01:31 2018 Received: (at 30929) by debbugs.gnu.org; 7 Apr 2018 15:01:31 +0000 Received: from localhost ([127.0.0.1]:41314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f4pLP-000051-JM for submit@debbugs.gnu.org; Sat, 07 Apr 2018 11:01:31 -0400 Received: from mail-wr0-f171.google.com ([209.85.128.171]:39953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f4pLN-0008WS-L5 for 30929@debbugs.gnu.org; Sat, 07 Apr 2018 11:01:30 -0400 Received: by mail-wr0-f171.google.com with SMTP id n2so4102921wrj.7 for <30929@debbugs.gnu.org>; Sat, 07 Apr 2018 08:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=z6B0PJPNyoBzn/fSjCfKB/eo1uS7XT3JpM2o0KoiQI8=; b=ntgSHEvXQAYsvlRKsopFg2/J6ThJzYdVMt+fk+bfke46UNvrss9K9BNcYORVTLBJmT psFD2996cX3LAis2R4NYrd42RQCPfd7o2jpusRB/jkva72aoS6+XdiICgc+BmJjFZ3Yw 4Au+bhl1FapiF4z5Z0z04dwAUOhdAkqRGoiK/obhJnL2tbcRpXcALtOUXg7U1S6nd6e5 cqptCe3KGx2if2ESA1+7J/iD99VwQOHW/lL5glQma4+MwxjDOkufHtSCLwPcZDHwVnXE GqtsSgnD6Ov5DuawCdrduKNcJGojVKkqQHZM8c3Go+vwHPGXtkUVgyUEyv68Ivt6ZrB9 tCEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=z6B0PJPNyoBzn/fSjCfKB/eo1uS7XT3JpM2o0KoiQI8=; b=FlbzFjh5AzWTc7Jsta+FHxJ33RvCDli3jKE+GUbSrzq1TLymmmF06hLHrO064i3tKx GiX9kn2xuwMKiI/FpEwyrcdwPJouaX+alhfBqZKIu01iWIXxwa19xOBqq7yyMO5nMTpg ywsY+rFYnSzBZgQeXyXRUOHvoX4pm8Jt/OT9EAfsgCXAN+bMCFaAnGpQAKE1vinQ7QXS wui9F5DpV/igUZ6I2ngsyafKEBSrtcl1AXPLrQXpr+MZkE56fWML4mow7XI8XAwwBYaT Uq4T4Tf3z+nW4OIikwfnaAD+fYlOo2t7ADSya29hv9VCapHewhL2UnMIpLDxnYssjocX vwtg== X-Gm-Message-State: AElRT7EJGSIcs1olOVqW+ercBx/QJe5WUFZ3tQHtDSJSzs9PL6QJh8hE e8oeCUiVQLQEEFjjOuoj4WXYQtOA X-Google-Smtp-Source: AIpwx49VBCK75H5hb6U1E5gNNrAtj8Gs0lNmvvRIUfy5QEVNSrBQkxYp/qJd2GxZWehAhQEgQIoVgg== X-Received: by 10.223.131.229 with SMTP id 92mr23104123wre.249.1523113283622; Sat, 07 Apr 2018 08:01:23 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-60c2-1a84-b7b0-dd5f.holly.idiocy.org. [2001:8b0:3f8:8129:60c2:1a84:b7b0:dd5f]) by smtp.gmail.com with ESMTPSA id k11sm16065715wmi.35.2018.04.07.08.01.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Apr 2018 08:01:22 -0700 (PDT) Date: Sat, 7 Apr 2018 16:01:19 +0100 From: Alan Third To: Nick Helm Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work Message-ID: <20180407150119.GA1190@breton.holly.idiocy.org> References: <20180325115732.GA52626@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Wed, Mar 28, 2018 at 10:20:13PM +1300, Nick Helm wrote: > > It’s setting the actual modifier keys, so when a user changes those > > keys’ 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’t seem to match up with Emacs’s event handling very well. > > That looks about right to me too, it least it matches the general > approach in the docs. > > 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. Except we have no way of identifying whether the left or right modifier has been pressed. I’ve been thinking about this and I’m not entirely sure it’s a good idea to expose these modifier presses to Emacs. At least not by default. I have two reasons for avoiding this: 1. They’re not always modifier presses. Applications set these flags themselves and it seems strange to me that it can look like a modifier has been pressed when the user has done no such thing. 2. It’s so very easy to break the bindings by rebinding the modifiers, which is often recommended for people using non‐US keyboards. ns-drag-n-drop is perfectly capable of determining what action to take by examining what it’s been passed in the event. So I think that if we receive, for example, a filename and only NSDragOperationLink is set then we should mark the filename as a string and then send the event to lisp where it is inserted as plain text. But if NSDragOperationCopy or NSDragOperationGeneric is set we mark it as a file and lisp will open the file. This does mean that the modifier presses aren’t customisable, but they will always match the OS default at least. If there’s a good use case for allowing these modifiers to leak through then I suggest we make it customisable. That way new users aren’t going to completely break drag‐n‐drop accidentally, and people who know what they’re doing can break it as much as they want and live with the consequences. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 08 21:52:13 2018 Received: (at 30929) by debbugs.gnu.org; 9 Apr 2018 01:52:13 +0000 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 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; 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 From: Nick Helm To: Alan Third Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work References: <20180325115732.GA52626@breton.holly.idiocy.org> <20180407150119.GA1190@breton.holly.idiocy.org> Date: Mon, 09 Apr 2018 13:51:58 +1200 In-Reply-To: <20180407150119.GA1190@breton.holly.idiocy.org> (Alan Third's message of "Sat, 7 Apr 2018 16:01:19 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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/xtNz3ZzEiL1BUjeGm2GWmfcvJzCQtAQAo71mRRPKlc= 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: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bKNg6zHMq/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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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? From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 10 15:38:35 2018 Received: (at 30929) by debbugs.gnu.org; 10 Apr 2018 19:38:35 +0000 Received: from localhost ([127.0.0.1]:45426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f5z6B-0000uE-0R for submit@debbugs.gnu.org; Tue, 10 Apr 2018 15:38:35 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:38640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f5z69-0000u2-U1 for 30929@debbugs.gnu.org; Tue, 10 Apr 2018 15:38:34 -0400 Received: by mail-wm0-f51.google.com with SMTP id i3so25399395wmf.3 for <30929@debbugs.gnu.org>; Tue, 10 Apr 2018 12:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=b5FGEV5RCEh1yMmUZgpL+KR8R2IcoeM/Ddj9zmhWR0M=; b=c/b9akkQUtXyD74m1bEs3rNw8TwVCThsCOhAVXQNlxXBtL1fGmEjKs77mNdKBw6pvO DEx7Fnbk90QyeYq3DbTSCNTcaMbGJbo6aBj6PLYHvZJgwuU9gPcr5ZajIXpHu8ZGgVRC MmLNOw47qlNgiBZdJwdNZCLF+nAm99WZ/Qh5bPF+MBqoH/FsSfdURRlFryK9SfaDoM7o JYWUR/hENvkAUthR6vnKlD7K5395Uc4KbUm6vp2wKYmpMYPJyM/hsQfkAGMp866cT5Th uBqCgt6HaqZ+CuY3PEObhGVkkL2m170yc4Ne5kGca79pBNs3TG3fJoqjHyaGzRb+eJfi NaTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=b5FGEV5RCEh1yMmUZgpL+KR8R2IcoeM/Ddj9zmhWR0M=; b=t+ZPG6voxgAjeGzgRutB6INufINNRXHqGxSXJscFCbWpJJjz9Gk2nnSuRrV4qS0fHE ciop2FvSLTuICcMjo128V4GUHbNVRal41n030uEXhJ3e79Wl5XcLuLwZW9sSjHgd/Q6d TcwhWviCk5He1p97UXsOvxjWfv+7bBWYCMitZL+iY7pObr1CsNkprz9wTgQn/3W562ZJ Fhnr0uss1WsPxtRD+tfaACfczrjz25gDMGSVp51+/qgVn4ThUU6EEsZbnj+93do2QsUQ suJf78Dg8+ho1Mxwy5AbRolv/g/bEiWd7anO9e2MA5bNRATlqhniAEPTTY3w5PJbVjWQ 2Buw== X-Gm-Message-State: ALQs6tCZkXocMfqNgxfMN3neX80H+sUSxgza65inSYfJfPjmpHNIN9Gy M4Zy6P3cOvsEJfCgS25a7QvkyxUM X-Google-Smtp-Source: AIpwx49eI1h4MArSrZ/AoEAu1GQGD942T6/lRq1HI0qhMyPhWu07IexpfPMt6IkeBFArf2JE+K3vgg== X-Received: by 10.28.35.76 with SMTP id j73mr476647wmj.103.1523389107813; Tue, 10 Apr 2018 12:38:27 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-d913-31fc-0f49-6afb.holly.idiocy.org. [2001:8b0:3f8:8129:d913:31fc:f49:6afb]) by smtp.gmail.com with ESMTPSA id j21sm4591290wrb.49.2018.04.10.12.38.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 12:38:26 -0700 (PDT) Date: Tue, 10 Apr 2018 20:38:24 +0100 From: Alan Third To: Nick Helm Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work Message-ID: <20180410193824.GA15361@breton.holly.idiocy.org> References: <20180325115732.GA52626@breton.holly.idiocy.org> <20180407150119.GA1190@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Mon, Apr 09, 2018 at 01:51:58PM +1200, Nick Helm wrote: > On Sun, 08 Apr 2018 at 03:01:19 +1200, Alan Third wrote: > > > I’ve been thinking about this and I’m not entirely sure it’s 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. Indeed. But given it doesn’t work without a reasonable amount of work just now, I suspect it’s not going to affect too many people. > > ns-drag-n-drop is perfectly capable of determining what action to take > > by examining what it’s been passed in the event. > > 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? Well, that’s not quite what I was thinking of. At the moment, in C, we build a list like: '(file "filename") '(url "http://url") '(nil "plain text") So I was thinking that using the operation mask and PB type we can choose the correct type of list (like, it’s a file, but we only have the link mask, so use the nil list). Then ns-drag-n-drop just looks at that list and handles it. But... > > If there’s a good use case for allowing these modifiers to leak > > through then I suggest we make it customisable. > > 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). This is probably a better idea, we pass the string, the type (from the PB) and the mask to lisp, and then let ns-drag-n-drop sort it out. Like you say, if an expert wants to do something different they can then write their own function. So in C we just construct something like: '(file (ns-drag-operation-copy ns-drag-operation-link) "filename") Are you wanting to give this a go? I’m happy to work on it if not. > 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 not sure what the deal is with drag‐n‐drop from Emacs on GNU/Linux, but assuming it works under GNUstep as well as Cocoa we could add Emacs as a drag source. > 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? That’s up to Eli. What would we have to do, just change the default bindings in ns-win.el? (global-set-key [drag-n-drop] 'ns-drag-n-drop) (global-set-key [C-drag-n-drop] 'ns-drag-n-drop-other-frame) (global-set-key [M-s-drag-n-drop] 'ns-drag-n-drop-as-text) (global-set-key [C-M-s-drag-n-drop] 'ns-drag-n-drop-as-text-other-frame) BTW, is it just me or does ‘ns-drag-n-drop-as-text-other-frame’ not actually do anything different from ‘ns-drag-n-drop-as-text’? ... OK. This is a disaster area. The current binding works if I drag and drop text from iterm2, but fails if I drag from textedit. So I think we need to bind every combination that includes meta to text dragging: (global-set-key [M-drag-n-drop] 'ns-drag-n-drop-as-text) (global-set-key [M-s-drag-n-drop] 'ns-drag-n-drop-as-text) (global-set-key [C-M-s-drag-n-drop] 'ns-drag-n-drop-as-text) And probably drop ns-drag-n-drop-as-text-other-frame, unless someone can show that it does actually do what it’s supposed to. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 12 01:34:31 2018 Received: (at 30929) by debbugs.gnu.org; 12 Apr 2018 05:34:31 +0000 Received: from localhost ([127.0.0.1]:46953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f6UsR-00035I-8I for submit@debbugs.gnu.org; Thu, 12 Apr 2018 01:34:31 -0400 Received: from mail-me1aus01on0091.outbound.protection.outlook.com ([104.47.116.91]:60051 helo=AUS01-ME1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f6UsP-000354-BP for 30929@debbugs.gnu.org; Thu, 12 Apr 2018 01:34:30 -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=tSMkQRFE8piRLy7O7jYXeyBItkqtC5Y4wuLu4nR0nKQ=; b=lUe+25qsNp9BWS3OwyNrOYraHmxooyVURoEXgCgZv7U8BVrotGP6l9VAhebe/FhXU71gOxBYGhXyZIWpKL8Fl+wsxJSuxkZY/z7oOgerMB6DKkL6QBgDi8lc62q/Nvl8K5Ec3emrsE5L2IEKQ2slpYd3QkU60+EgTIUclfYGe3I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nick@tenpoint.co.nz; 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; Thu, 12 Apr 2018 05:34:20 +0000 From: Nick Helm To: Alan Third Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work References: <20180325115732.GA52626@breton.holly.idiocy.org> <20180407150119.GA1190@breton.holly.idiocy.org> <20180410193824.GA15361@breton.holly.idiocy.org> Date: Thu, 12 Apr 2018 17:34:17 +1200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [125.239.174.80] X-ClientProxiedBy: SY2PR01CA0040.ausprd01.prod.outlook.com (2603:10c6:1:15::28) To SY2PR01MB2908.ausprd01.prod.outlook.com (2603:10c6:1:1e::21) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(5600026)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:SY2PR01MB2908; X-Microsoft-Exchange-Diagnostics: 1; SY2PR01MB2908; 3:1q2Nhw3sEPuGvJLEdOJrimkqd5W2AYDUpdReYNcZda8wl/STS+dP3p0qTwWaTXO053/cCH+U1IT/GDV0J6u/u6jp7fBVtyLsL4ShA1/hZKNVSdb0NoJX+jJIjuPLmTMqydPN77Jgbz3uDfptgczGHy3GypbDx+PiWwQON8vg2LCAyx484iBMIV/FEKzxmpO/b+rPfCj45CT8AtQ50h2TjKimIlQwCUXVpbElTBklG5PiWNGyp1lX8/kTfDHcWwh4; 25:9EmnbiiDY07M8msF56j0eVt8lJ01bTsaEE39nTsZJWVq7Xf2RXajZOZzuilxM/QguFkzMcn76g32grt7jEBPywh0+1nnry/aTe3nazE7DI2bPCI4qldT80pDdioGvwSAKrJ6zpptTnipdDl1gWQl2VacLvxt/qsB+s+Y/oCZRL0mG6FD4sCTW2zJ9K1Npyy3cJocE+tpliuHNDGcTYtRPYrpUQ4C7HUqJ52fY/sfpbNd2yms86pgqIFBTOw969o+GIN+jP71JEt8da002lZlUY+1zSHgoGiwq+uzC7t25CN+WhNJHPN3J+KD5aeZ7VRbfFi6v8GeMz0t093anmZxUQ==; 31:WTHw6+XFQOt3dwzbd+08KEDrZpRDDUF1sHdwiDHeC6Hj+Vqy/lBCuW1wbO2c+CDgHUYUCp9iHsn/Cxt9/g+DXgEs8X3v/EyJ0O55oICDSmgthd+xGVM1XOsQd4go052W40kG0nQHacZJZAariq1XdRvOQ+FJrgvnf3UrLHzLe7mMiRY0oi22CtgfLP0v7TMaGVXNXU2yDSAa18fe33Ea4ALJMpz+q/ecajfblSgjxi4= 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)(10201501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(6041310)(2016111802025)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(6043046)(6072148)(201708071742011); SRVR:SY2PR01MB2908; BCL:0; PCL:0; RULEID:; SRVR:SY2PR01MB2908; X-Microsoft-Exchange-Diagnostics: 1; SY2PR01MB2908; 4:62O9A+uqoj73rzml2KkpntB+HnCs6RKQPGcqn39y5umKyTHD/rdVcdZabrNcvO4NsPoCwXjBNkdUOO/Yy/7k5/6ZAVtLtyhSjZjjjb2/3oiyWpB26p9/wk5meU9g1Purzy0ChE2S7kpoote1xdifkg5leBjZD2yBxCHo17XCp3go+JgepXV3hqhUVXqpk/8z9g8KqKjlD6gRDwFzWqLKclaBurLnDMDISDfbXkWTo72ZxAXmsdA+0Buvnyxqnk0yL67lZrYotisrwloohaGMPA== X-Forefront-PRVS: 06400060E1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(396003)(366004)(376002)(346002)(39830400003)(39380400002)(189003)(199004)(2906002)(486006)(3846002)(16526019)(86362001)(47776003)(6116002)(229853002)(76176011)(25786009)(52116002)(4326008)(8676002)(81156014)(2486003)(186003)(6916009)(476003)(23676004)(36756003)(6666003)(26005)(68736007)(52146003)(8746002)(8936002)(81166006)(6506007)(316002)(7736002)(6246003)(386003)(956004)(105586002)(478600001)(6486002)(53936002)(446003)(6512007)(106356001)(66066001)(50466002)(93886005)(2616005)(58126008)(74482002)(97736004)(305945005)(5660300001); 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: =?utf-8?B?MTtTWTJQUjAxTUIyOTA4OzIzOkFkR1dxM0FuaVpoZEl2VXRUQisvODloYWZn?= =?utf-8?B?NkFFZlIxejJ6UzhOVTQ4RG5DaHVncVJnc3RtclcrQnpHeWkwY3d5bHNsazlw?= =?utf-8?B?bGFURHFVcnN3NmhacFpsUmpOTU5sR21ZMnRrZ2FPWEk4N1dySi9OMTdEUExi?= =?utf-8?B?NVVwb084L0ZGVElCcmRURXM5STNIdE5BZzVxeHpOOUExaXFjTENtOU96WHkr?= =?utf-8?B?ajVudjhNNFNJQjRhUTN3Sm1yZFV1QVp4bFVkbkdrMnNVdkJrN01pOEplVm4r?= =?utf-8?B?SGl4WGJMY1dvdGpNM3NVdm5FQ3BEa01DUzFRemdldnJ3dGFiY0Vza25jVDdI?= =?utf-8?B?eVA5d2NSTE5GLzRFNU41UEdQNnhLSUFjZ2FIWS9iZC8xWGFWNWJPeERYOEoy?= =?utf-8?B?YkhtcFVlcmRLYTAxZ3dEVmYyaVFZV3ViUHl0cG9YRFZYajNDOTVUWVJmQ1R0?= =?utf-8?B?UGdWbmdZb3NuemdicGF3QWpLalQ1NllmY0hDL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qBmUy+7XNL/bxpIin47ap5erDpAWVQ9Uuc/GyG5Bg==; 5:2KZuqM/gY/ZeZgHRLRIHabsUZza+o5ntJQkLKozxgQ/wj2Tg2MK6jNN34+ZvKp9LkOdGOIsXBOpY5rJa24DUnFyNiXi4JqO7RvPVG0lnY4HRa1Y1heRmvIbz82Lgz29REoi990yAF+05aO9X/xdK6hD4msEqYixef6+SLRG6hKw=; 24:W9d39lG7qSQhZ0SUbJk8l+pICxN73AE0AP4b1ojIAjcF804iAgSLg5q/B9hJXuI4RN/QFcjQ8JUsfLCPT28dr2BonK5hpu3RQ12juuQQquE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SY2PR01MB2908; 7:l/qvO/i6mxP969Ke797oX6ZtXqTut36iKMDpWPk8yqTd4S9zMjtWbE/haiKWYXr3TFMam0uk6DyyXnGsr9esgv/UQXk2qV+wNxbAeyxqbjdh4VVu/Wxxx3RCF6lok8qQ+NRwXhuF8Qxpl5vjPKxVgwypUhF/FziDICoCO9rl3oC2oXZUWlHN43IdPPM2Fp+a8opUPxryKpSpVudbRpRvM2Vaii3VPzl+ROL57ezxZiDU+cKY424QDdbsKnP/utyL X-MS-Office365-Filtering-Correlation-Id: 1fce5282-8480-46e7-15f9-08d5a0370abf X-OriginatorOrg: tenpoint.co.nz X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2018 05:34:20.4546 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1fce5282-8480-46e7-15f9-08d5a0370abf X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: ed686f26-19e8-407b-91d0-7364c1c6f5cf X-MS-Exchange-Transport-CrossTenantHeadersStamped: SY2PR01MB2908 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, 11 Apr 2018 at 07:38:24 +1200, Alan Third wrote: > On Mon, Apr 09, 2018 at 01:51:58PM +1200, Nick Helm wrote: > This is probably a better idea, we pass the string, the type (from the > PB) and the mask to lisp, and then let ns-drag-n-drop sort it out. > Like you say, if an expert wants to do something different they can > then write their own function. > > So in C we just construct something like: > > '(file > (ns-drag-operation-copy > ns-drag-operation-link) > "filename") > > Are you wanting to give this a go? I=E2=80=99m happy to work on it if not. Ok, I see what you mean. Yep, I can have a go at it. > I=E2=80=99m not sure what the deal is with drag=E2=80=90n=E2=80=90drop fr= om Emacs on > GNU/Linux, but assuming it works under GNUstep as well as Cocoa we > could add Emacs as a drag source. I'll check. There may also be some technical hurdle, but I'd like to have a go at this too. The docs for NSDraggingSource make it sound so easy... >> 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? > What would we have to do, just change the default bindings in > ns-win.el? > > (global-set-key [drag-n-drop] 'ns-drag-n-drop) > (global-set-key [C-drag-n-drop] 'ns-drag-n-drop-other-frame) > (global-set-key [M-s-drag-n-drop] 'ns-drag-n-drop-as-text) > (global-set-key [C-M-s-drag-n-drop] 'ns-drag-n-drop-as-text-other-frame) Yes, but I was thinking of only changing this one - (global-set-key [M-drag-n-drop] 'ns-drag-n-drop-as-text) + (global-set-key [M-s-drag-n-drop] 'ns-drag-n-drop-as-text) as it's the only one unbound by default. This would be the bare minimum change to make sure all unmodified dnd operations work by default.=20 > BTW, is it just me or does =E2=80=98ns-drag-n-drop-as-text-other-frame=E2= =80=99 not > actually do anything different from =E2=80=98ns-drag-n-drop-as-text=E2=80= =99? The former pops up a new frame for me, but I have to bind it to an event first. I don't think there's an easy way to generate the default [C-M-drag-n-drop] event because of the way the modifiers are interpreted, so `ns-drag-n-drop-as-text-other-frame' is never called. > The current binding works if I drag and drop text from iterm2, but > fails if I drag from textedit. I'm guessing, but this might be expected. The sender sets the initial operation mask based on its capabilities. I don't know iTerm2 very well, but it probably doesn't support move operations (as its text is read only) so it masks out the move to force a copy. Emacs receives [drag-n-drop] and the op works because `ns-drag-n-drop' is smart enough to know what to do with text on the pb. TextEdit supports both move and copy, so it doesn't mask out the move, and Emacs receives [M-s-drag-n-drop] which is currently unbound. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 14:33:45 2018 Received: (at 30929) by debbugs.gnu.org; 13 Apr 2018 18:33:45 +0000 Received: from localhost ([127.0.0.1]:50914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f73W4-0006jI-Uq for submit@debbugs.gnu.org; Fri, 13 Apr 2018 14:33:45 -0400 Received: from mail-wr0-f176.google.com ([209.85.128.176]:40775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f73W3-0006j3-9t for 30929@debbugs.gnu.org; Fri, 13 Apr 2018 14:33:43 -0400 Received: by mail-wr0-f176.google.com with SMTP id v60so6518917wrc.7 for <30929@debbugs.gnu.org>; Fri, 13 Apr 2018 11:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=dM18w8PknMPKMLE8GanTyMHYcEtcxCTvJakiydPZIkU=; b=KWF3wLLpXKSyUpC4Hla6q6SyEeDlyVKY7Xvk+HggTzuc2mJRsgdBUc9HJ9NI9CUjDH Js0fq6Zx7hrgMzDfEtk2Os20n/5Z3n2m3dsg3MjZvSxNNOM/P8qUNdnP5Txwv0ZBBesh qHP3qkFPyABljDWsrG5ayN9x1hjYMuHzdsEwfMTyZJDwTfajj8wOzI2GX48R9dXg3Q3v sSqQqhruzwL0vSx1r87qhSusanAfGwiztUBYlhsj0mipeX97nM4NE4Skt7LqkhLk5sUN 9KP6pq284S2jF8lZLHIxmfKu2PRBiybtdx+wKXOPwL8zQlXaj3UEsyHNy/UabKHWgqQe KQkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=dM18w8PknMPKMLE8GanTyMHYcEtcxCTvJakiydPZIkU=; b=ZIlHCUrzAzgzxFW+vClQ4BpP/2Oiq5V8hiA2f24ucNZHnxs8NbD69lbgGFe5Qw3qnR 7u/nDWycpQpcjzeaYPNt47quNUiNjwp2cqF3gsPrCBgiokqX2eLe7zrHlooq4H1kVNCY CkefDBlKSP0+1ue+GQqGJGWicw9EeHHqpg8RtE/u+Gz6y7XUpkWfkNDim7/w8ZbAk677 SdFoM/lzj/21yCBUIZnJUYFx/D4xbMi66neIvgNn/T15qEsXtBb0nR+bH5zsRFU6B8b1 PFs/9ZZfu2HzTtt+5EUAUroNhsuWovpcUlnsv21OC/6Hd6kS9sjYBwapoF8EGWsB2z4F mGTg== X-Gm-Message-State: ALQs6tCGgLVhE74Wzzybtm5Cc8igkR2otzNJRH0S/69hI/mlScVN0777 uctV3W5SGpA9xh+6ahhYPVhK1DEq X-Google-Smtp-Source: AIpwx496Nt9HftHB1Ow5R+6Hgm56Rb9V1FQ8EkThZWbIq9ewSCAc32JV0GmiyDO0xQStp6op0F0cwA== X-Received: by 10.223.192.3 with SMTP id z3mr4285875wre.177.1523644417553; Fri, 13 Apr 2018 11:33:37 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-b067-446f-7f80-450f.holly.idiocy.org. [2001:8b0:3f8:8129:b067:446f:7f80:450f]) by smtp.gmail.com with ESMTPSA id 72sm2859097wmu.38.2018.04.13.11.33.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Apr 2018 11:33:36 -0700 (PDT) Date: Fri, 13 Apr 2018 19:33:34 +0100 From: Alan Third To: Nick Helm Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work Message-ID: <20180413183334.GA39515@breton.holly.idiocy.org> References: <20180325115732.GA52626@breton.holly.idiocy.org> <20180407150119.GA1190@breton.holly.idiocy.org> <20180410193824.GA15361@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On Thu, Apr 12, 2018 at 05:34:17PM +1200, Nick Helm wrote: > On Wed, 11 Apr 2018 at 07:38:24 +1200, Alan Third wrote: > > > On Mon, Apr 09, 2018 at 01:51:58PM +1200, Nick Helm wrote: > > > This is probably a better idea, we pass the string, the type (from the > > PB) and the mask to lisp, and then let ns-drag-n-drop sort it out. > > Like you say, if an expert wants to do something different they can > > then write their own function. > > > > So in C we just construct something like: > > > > '(file > > (ns-drag-operation-copy > > ns-drag-operation-link) > > "filename") > > > > Are you wanting to give this a go? I’m happy to work on it if not. > > Ok, I see what you mean. Yep, I can have a go at it. I look forward to it. BTW, there’s some code in the drag and drop stuff that sets ns_input_file. You don’t need that, it’s not used for DnD and, in fact, causes problems with other ways of opening files. (More info in commit 292c09ff6db4bba1655bbb3160e859fef59ab34b and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29121, which I now see was raised by you. :) ) -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 24 08:42:37 2018 Received: (at 30929) by debbugs.gnu.org; 24 Apr 2018 12:42:37 +0000 Received: from localhost ([127.0.0.1]:37773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fAxHI-0003cX-Q3 for submit@debbugs.gnu.org; Tue, 24 Apr 2018 08:42:36 -0400 Received: from mail-me1aus01on0125.outbound.protection.outlook.com ([104.47.116.125]:19478 helo=AUS01-ME1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fAxHE-0003cH-FD for 30929@debbugs.gnu.org; Tue, 24 Apr 2018 08:42:35 -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=jHk3u+wLsH6M3djUBCvdMMKg3Tm/JJEdtLeBmA5OyTQ=; b=QDhHw//8ymbmiy14Z4cOoFYuDoAQqHE2FZ0YoHWl3ddmGuCtiUth3Cq2MZZSYHqXJ/pInqLcXo/C4kmX5znZ9RIG11z9ofUby9BSolO6Fv3jz/+4aiobenDYZZwLnSaIGkOYzgJuk3jRwrgTaKApTqdzR3P7IEcxmGfOTRjn2wE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nick@tenpoint.co.nz; Received: from jupiter.local (125.239.174.80) by ME2PR01MB2899.ausprd01.prod.outlook.com (2603:10c6:201:22::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.12; Tue, 24 Apr 2018 12:42:23 +0000 From: Nick Helm To: Alan Third Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work References: <20180325115732.GA52626@breton.holly.idiocy.org> <20180407150119.GA1190@breton.holly.idiocy.org> <20180410193824.GA15361@breton.holly.idiocy.org> <20180413183334.GA39515@breton.holly.idiocy.org> Date: Wed, 25 Apr 2018 00:42:19 +1200 In-Reply-To: <20180413183334.GA39515@breton.holly.idiocy.org> (Alan Third's message of "Fri, 13 Apr 2018 19:33:34 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [125.239.174.80] X-ClientProxiedBy: SYXPR01CA0093.ausprd01.prod.outlook.com (2603:10c6:0:2e::26) To ME2PR01MB2899.ausprd01.prod.outlook.com (2603:10c6:201:22::16) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(5600026)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:ME2PR01MB2899; X-Microsoft-Exchange-Diagnostics: 1; ME2PR01MB2899; 3:Aiwx9Dc8Qd83m10mVqnNwOf2jLSCTMpaNsNdyS5nvs2j5j/sFZyCOm08JdI1M5dTlWfUdqoub/FNrVBXkWP8eck886j5UXeIECf/WZVZyz8HebRNe3WvB75okVp7hdRGIAFRJMCqbanqQmwjXkMeDHg4wIr25wSUJPVXnEa3jE2Bj6yA4Fk1w7vWki+oOWTXDfY1LpCsxvy0Cgf9KL7b6E7u8Eqf/vdOYi8XajyyPnXZlfzsqjKm1zbMXUMMYNFY; 25:avd0XaT+3VjJ8k/qS+ks/3rEoc4Nv/as8zFHCUuPRUH5FAE0tCRHQjxnjwvkLzunIQ26A1gKIxZxpy3rku6eLkvE6kWOTvd8sbTOZBgnQ/S4+TY/W9qAsCHcturOFJ+9rzYRcFEX8876bMe3ozS+Jgp4BW2klTqmiTf39/Faq3hbr3M/9vjiPbhapY+m7mSEBvfRf3R7DjacEuR2svchFiqaob4vy5CW8Gs2sWJiFyc+9WGcjiWPjdH2YnZWJhn7hB1OQWgLSf75kjMbHovnSsCfC+2j/xBY4v3zqC14nF5W4OeT1ig9NAWii91pe+IOgK/uDkpVVs68ZoNYaW5OSw==; 31:sc2vJITAUnmBKtrTlq0jh+7rqOEbgNy6AVSud5Ne+7fhPf+CVVK01V5Wv7hAJsq19lL/qByL7td63G2LKF1r1slXd12PWqoj5H91yjtzwDeJN7nfdxh9sFL0XdGp939myO34X2QAXKWt7vOR8btli976OS/GfB0JYl1x+ZwFdBI36tnE5FzJeD1aoYLXS+h7zYhizM/513w86j8bljeZreHdik7TBiwAewHMUL30nqs= X-MS-TrafficTypeDiagnostic: ME2PR01MB2899: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231232)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6041310)(20161123558120)(20161123562045)(2016111802025)(20161123560045)(20161123564045)(6043046)(6072148)(201708071742011); SRVR:ME2PR01MB2899; BCL:0; PCL:0; RULEID:; SRVR:ME2PR01MB2899; X-Microsoft-Exchange-Diagnostics: 1; ME2PR01MB2899; 4:eXf8KHxNBNUhv4XRBUoVFz2bycSQTkh7CDf7/ZN+BFFNf9+OzCZ7vH3ymSBCxYFR0w+O8DpESXbjzLagEEsjyVE2UjEqsY/ME80jJZCL2Ly1XLGpXqXy6WEzfH1j6OrYa3NzPaXAZraXd9BgmzNZrS9v0BzQaRlNcyfB1U/oqHlltoIRokVix5SqKPFJUrPNtT2OU095pSeCYvPR1FmoEwUyWgAf1867eIZZquAB3di0kdrCfKLS38I/5lVRzQX6/kfnVy+QsJ9RGSRQz9jt/g== X-Forefront-PRVS: 0652EA5565 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(396003)(366004)(346002)(39380400002)(376002)(39830400003)(199004)(189003)(8676002)(66066001)(26005)(6506007)(47776003)(76176011)(36756003)(386003)(6916009)(68736007)(52146003)(23676004)(2486003)(105586002)(5660300001)(52116002)(2906002)(6116002)(50466002)(6666003)(3846002)(305945005)(53936002)(7736002)(86362001)(6246003)(8936002)(478600001)(74482002)(8746002)(6512007)(106356001)(476003)(25786009)(2616005)(316002)(81156014)(956004)(81166006)(4326008)(486006)(229853002)(11346002)(6486002)(97736004)(58126008)(16526019)(446003)(93886005)(186003); DIR:OUT; SFP:1102; SCL:1; SRVR:ME2PR01MB2899; H:jupiter.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: tenpoint.co.nz does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNRTJQUjAxTUIyODk5OzIzOjh3Y2QzUklIMUM4aU8zcXlLVEoyem85REVv?= =?utf-8?B?N0JmaHV5OXpmaUJOdGJjSjdwZE12SjIrZkVpaUk3QkZUTGpSdWZHVnZpN0tB?= =?utf-8?B?TGg0citOalVMRWwvSElkcGpINmQ3OVpCdE5NUFhwZm5yZlFMQ2pFS3N0WGpG?= =?utf-8?B?MTVIOE9jcDgvVU00TXFib3ZRay84Tm9ucVdXL0E3NGdqalM4VHpxdDh1WEta?= =?utf-8?B?L0FyODViWlU5R085eHFmSTRGZTNNaXZRdENSaXY0YzdSOGkwSlh3VHNwVFY4?= =?utf-8?B?R1NNbTZTTGpLOUZNaDJFOEduQVhWNThISktaNmFtUGVJWjJ0aWdoMlJaQmVG?= =?utf-8?B?Y1VuMG9NSjlHejZzRUxZaklCUGFTVFFIUGhxenBxTm5DODQyWUh2QWR2NEVn?= =?utf-8?B?THlTajRLMzUyZVl1RlNYL2VNa2p0S1ZCS0R1TjFPOUM2endBQUg5cHk5RDg5?= =?utf-8?B?WHlKMXhoVlozSEJQMjVHOUVSaTVwNzlOblBNczlMM0JRUlEzZjdSMGhVZXhn?= =?utf-8?B?M2l6QU9xdFBCa1hsN1JKRjNyd2FTSWpaT0pIK09GdHM0cTJPeU1ZK0VZQU85?= =?utf-8?B?akJUZ0ZkZjFmdGtaK3B3eFVyMWxIUDY4cFk1TVFrUUlabk9nZXpVOWpORkFO?= =?utf-8?B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I+v6FNUwrerDuM2kafzlY+rSEKjxEsod+HeYQ=; 24:IjAYuRA2AqjH8U8nGJV62Q4Vf6y6NKSd35UHT49DAtzLSutYhUeD2a9sChi36qZvT8Jvqm1LDRaIn35/rn8i5/My8fUVnnTInLFZ5HLlI4E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; ME2PR01MB2899; 7:EJLgOE7Dccs/ktu2kfL7xw5VmjsjqJYqoZ1B0KHhjt8tuB1NBDOr9/Vz8gtD/5Ek8lxsPWR3NqLsfRsE+BBaMnCIrTxeF5vhIT0cUM/c/kEvj5+u4FyPErOFqiQm/kfKRi4Z1AiMN85kK0AyyP+Jhs46IGFOoAuAv0H9qjMaVbj9JezArLdwzgaJ6cuorS5pJUSM921DBLBUcr0OLoiKLIjh7XUX4/Gfqo1FuSWcMN5jg69E1AKT/keTmJ15dIH2 X-MS-Office365-Filtering-Correlation-Id: e3e86168-3462-41d0-dd7b-08d5a9e0d44c X-OriginatorOrg: tenpoint.co.nz X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2018 12:42:23.9556 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e3e86168-3462-41d0-dd7b-08d5a9e0d44c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: ed686f26-19e8-407b-91d0-7364c1c6f5cf X-MS-Exchange-Transport-CrossTenantHeadersStamped: ME2PR01MB2899 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, 14 Apr 2018 at 06:33:34 +1200, Alan Third wrote: > On Thu, Apr 12, 2018 at 05:34:17PM +1200, Nick Helm wrote: >> On Wed, 11 Apr 2018 at 07:38:24 +1200, Alan Third wrote: >>=20 >> > On Mon, Apr 09, 2018 at 01:51:58PM +1200, Nick Helm wrote: >>=20 >> > This is probably a better idea, we pass the string, the type (from the >> > PB) and the mask to lisp, and then let ns-drag-n-drop sort it out. >> > Like you say, if an expert wants to do something different they can >> > then write their own function. >> > >> > So in C we just construct something like: >> > >> > '(file >> > (ns-drag-operation-copy >> > ns-drag-operation-link) >> > "filename") >> > >> > Are you wanting to give this a go? I=E2=80=99m happy to work on it if = not. >>=20 >> Ok, I see what you mean. Yep, I can have a go at it. > > I look forward to it. I've spent many many hours on this but I'm afraid I can't get it to work. There are just too many permutations. I give up, sorry. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 24 14:19:45 2018 Received: (at 30929) by debbugs.gnu.org; 24 Apr 2018 18:19:45 +0000 Received: from localhost ([127.0.0.1]:38419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fB2XZ-0006tl-DB for submit@debbugs.gnu.org; Tue, 24 Apr 2018 14:19:45 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:40924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fB2XX-0006tV-2y for 30929@debbugs.gnu.org; Tue, 24 Apr 2018 14:19:43 -0400 Received: by mail-wr0-f181.google.com with SMTP id v60-v6so50875949wrc.7 for <30929@debbugs.gnu.org>; Tue, 24 Apr 2018 11:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BSOhn0e42XF+P+KZeuusJ2Yqxs74BtTzyx+dCoGBkvA=; b=YHG1xf+0eyhQpZd82KKfhHDbLfO2bDk6+wpLaKHJykT7whZuBGZn4WMPXUsBA8rG7F zHxEPsyXN0ry7MkBQqpa5DGfcn1+ozMnZgaJZpJVJT0+k7zOdfsrIRIg5Ml8jj5inrzy 4leTSP78eIFculmQsplfphg4B/wpNA0l8CsKavlGtuGKNvdu7fWVGBE4SiZfMO7gelJb DMwAtE8sN3diNjrtIouk/U3mS1TLdnvyNofLzT40IxJN01RYZdYKFCHWcAHHLqajDibD jApLoGhB/KlaXXTPAC/79Ip21ARnr3MbLhjNR03ALrcaztbREO2sdvFuB2UktTdfM6RC S/4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=BSOhn0e42XF+P+KZeuusJ2Yqxs74BtTzyx+dCoGBkvA=; b=QE8f2BrjcLAb5nyKH7D3EDl5yb2+PGN8OjcwZBraV3sX2vmYcQCHRyKd50NAU1SObL HewqwFD6nYPAYGPNv892C8NUFNY+pJhrwlxQS8N4qeQR42K1t7W1wdWUAnJY5p1WhKKO 5HwdCQ7p1NG4JVk2ZYkMo1IHN0Tj6AGMOmIyxFHcJe0IC6rr5NcFqJI/Ji38pFY6NE0g U03oz6vqG8d0cLZDnLC3pW5H9x6r6dC+4CtT5/+LYdhFyd8l7h/gjo/S0XcS760kkO6P cQOTJs+cniVwPX+sU+663exSo35pRs3aFSD5amGBDI9EgdhD9aO5fSWlA0ApgsK78oVB mN7w== X-Gm-Message-State: ALQs6tAyvatWQLUgW7ijbxdMS6SHcXqsedOb1HHO2vasB4kk2KwGQjFC KUfHSWeh2TKk836vx1kTsQKIBrPH X-Google-Smtp-Source: AIpwx4+Rt0RIDml5JPEpieC6buAcoFKdidymzMs+TqHCDFwUZqAVlfMQ4vUIPaP2ST0nRLUSvvEMVQ== X-Received: by 2002:adf:959a:: with SMTP id p26-v6mr21994315wrp.211.1524593977030; Tue, 24 Apr 2018 11:19:37 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-e08d-4c91-29c1-f42e.holly.idiocy.org. [2001:8b0:3f8:8129:e08d:4c91:29c1:f42e]) by smtp.gmail.com with ESMTPSA id 44-v6sm13385177wrl.83.2018.04.24.11.19.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 11:19:36 -0700 (PDT) Date: Tue, 24 Apr 2018 19:19:33 +0100 From: Alan Third To: Nick Helm Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work Message-ID: <20180424181933.GA48133@breton.holly.idiocy.org> References: <20180325115732.GA52626@breton.holly.idiocy.org> <20180407150119.GA1190@breton.holly.idiocy.org> <20180410193824.GA15361@breton.holly.idiocy.org> <20180413183334.GA39515@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Wed, Apr 25, 2018 at 12:42:19AM +1200, Nick Helm wrote: > > I've spent many many hours on this but I'm afraid I can't get it to > work. There are just too many permutations. What do you mean by too many permutations? Is it because of the number of NSDragOperation options? -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 25 19:16:49 2018 Received: (at 30929) by debbugs.gnu.org; 25 Apr 2018 23:16:49 +0000 Received: from localhost ([127.0.0.1]:39682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBTeb-0004rN-GI for submit@debbugs.gnu.org; Wed, 25 Apr 2018 19:16:49 -0400 Received: from mail-me1aus01on0095.outbound.protection.outlook.com ([104.47.116.95]:4320 helo=AUS01-ME1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBTeY-0004r8-IL for 30929@debbugs.gnu.org; Wed, 25 Apr 2018 19:16:47 -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=w4b2ctldYyxd2dxH5HFfbCOdFwviAK6/IVdIwMwx7DA=; b=kpaFg4o6NSunwYCWpW5FEVbLhJ/ke8zJBDqUTPSy6E1vLNBuERoA2TuiyN0kCAJYlYW73iqKPiWK2pvqOEBnWvkebin453nAPHEEaCR+7EdktjIvtc/BLJRZ2aX24AQPw7Ewq4VcJ06zUMYkQzJ8TNhYKktYw1YpLsAhmlWUpjk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nick@tenpoint.co.nz; Received: from jupiter.local (125.239.174.80) by ME2PR01MB2899.ausprd01.prod.outlook.com (2603:10c6:201:22::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.715.18; Wed, 25 Apr 2018 23:16:37 +0000 From: Nick Helm To: Alan Third Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work References: <20180325115732.GA52626@breton.holly.idiocy.org> <20180407150119.GA1190@breton.holly.idiocy.org> <20180410193824.GA15361@breton.holly.idiocy.org> <20180413183334.GA39515@breton.holly.idiocy.org> <20180424181933.GA48133@breton.holly.idiocy.org> Date: Thu, 26 Apr 2018 11:16:32 +1200 In-Reply-To: <20180424181933.GA48133@breton.holly.idiocy.org> (Alan Third's message of "Tue, 24 Apr 2018 19:19:33 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [125.239.174.80] X-ClientProxiedBy: SYAPR01CA0035.ausprd01.prod.outlook.com (2603:10c6:1:1::23) To ME2PR01MB2899.ausprd01.prod.outlook.com (2603:10c6:201:22::16) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(5600026)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:ME2PR01MB2899; X-Microsoft-Exchange-Diagnostics: 1; ME2PR01MB2899; 3:atS8O0pYZSRN+SmsqYPCDqi6UXLQdQPikxP/JjkTAQ31ifVr/00wp3j5yonLoqT3xqTtQ1AU5Kreb9acgjtCHFNlXMDBTBzU9xCpmhE38jfSJbf+F0zOxurRu5Atzs9kIXJGtDmrxt2Ly6mCya+OGo6Bc/MjWX3xhkiBk11xSrcQemR5qmNB/589Ji/nnkT5G4a1+jQB/BixxvohSrx3jzZU9HBANC5HdIgYlvDI08v9mVvs4qbqaM7FU/5eecTF; 25:gJOTbf5zF+TY/ck60PC/F5lEsqWvw8Z9qsqbBedYfbamCUZfbM4R5SoMAWsYIvk6jdrgQVCIZLXUWyOkPSw+FdV6wOAnYC2Cir2vpbjr882yvrV3QicvF/0TpJ5mtSUj3whqFbo9hbIp1QxGwQbI6KTrziq+Yzl7yBjAIziTFgu9gaEuMWwxMxaELmaTCrqMv/z8P2DuMAca4RSIG21xl5gWqLWV3dROFXpg0E/nHv+Sqwgeiaeooqu4uOOlBul7Lk6+bjUHSxokzzngtHQzGU5jUlvzLSGTB7EXCSBkk73ux5HMm5bYgQAmya4JoARLIq84PYCT3m0D+S6zazckUQ==; 31:ILpBEFj2K82SeRMdeUmnZbLc0dlb9fQp9PYqrgoJIoVgJ4JDiaUQ+YpNI+zcpHxuR0w3nLK5XGbM6aKXHYAhcA5rH+1PvFdKpBW2+AHSIVegxG/3L+Gl1r7sj9PdwFuz+9G/Ij11lUMK2yjEGScgnlzSWsT5GWI/omJZiPfzZlwrNkvYWPvVrSiB4DZVMTcEPwgxZiq7I/+LB+GcWYKNe97IoUOLePNp2V9UsDqXQyA= X-MS-TrafficTypeDiagnostic: ME2PR01MB2899: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231232)(944501410)(52105095)(3002001)(93006095)(93001095)(6041310)(20161123562045)(20161123558120)(2016111802025)(20161123560045)(20161123564045)(6072148)(6043046)(201708071742011); SRVR:ME2PR01MB2899; BCL:0; PCL:0; RULEID:; SRVR:ME2PR01MB2899; X-Microsoft-Exchange-Diagnostics: 1; ME2PR01MB2899; 4:sU55Mas0YVY7mvh35gT+cdEt9dpjsz8T2ONAl2hvZ3FZo6RMQVFCRKa005DvOXi4BBeWpwf5dz1OPVmwz/Lpc4Ja40nWDBD9HLOYrFMWzU7ZznoZUclUaF/lEUrHQFSABcpAxmhIm3+4QxoEYXAoZUTO2hOGwY+g4UfmsMHxv0phrXb7rotixOKylbu6jeIAXDWcRTuJCzl1HbYTY1i0T43osSZmX4usD/+WH9W5ra83Dm/qpXJo69P9hCg90ZOswPJIewkjY38NDlcO5LAumg== X-Forefront-PRVS: 06530126A4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(376002)(39830400003)(39380400002)(346002)(366004)(396003)(199004)(189003)(81156014)(8936002)(8676002)(81166006)(68736007)(446003)(93886005)(6666003)(6916009)(53936002)(36756003)(6512007)(6246003)(25786009)(7736002)(476003)(66066001)(86362001)(2616005)(305945005)(956004)(47776003)(11346002)(229853002)(486006)(3846002)(386003)(4326008)(6506007)(76176011)(26005)(59450400001)(186003)(316002)(478600001)(6116002)(16526019)(52116002)(51416003)(58126008)(16586007)(106356001)(48376002)(105586002)(50466002)(97736004)(6486002)(5660300001)(2906002)(74482002); DIR:OUT; SFP:1102; SCL:1; SRVR:ME2PR01MB2899; H:jupiter.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: tenpoint.co.nz does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; ME2PR01MB2899; 23:MfgshS8O6uS4UMVIa8OcMmOD5O4C6GpxXJ3XiPePL?= =?us-ascii?Q?ubfcNkm1Nt1VrJCpwOeSQZ3c/pBVLALyBPeMOmXgGK3InVFubhWPoQF9tzqI?= =?us-ascii?Q?quZTF0p0X9IkqqUPb8HX6/vww/8tGwoYQ05W64hxkpbvt1DE7sSCcZiSXrI8?= =?us-ascii?Q?kGM7v34nFYZHC/DmSUJQlyDE2fQk1trhaG/mUayl5ijvxmpKqpSdjBW2phRc?= =?us-ascii?Q?Kfe/wFNVmoDeD8BmmVg+Sqwv9BOR5pdhnpqLVhDRK2VtB+IvY5HBDBneGhXC?= =?us-ascii?Q?DvJNWz2JYecTlRVD5QH8TK37pYbW/uMzR9WqlMqtX8ZKSNcW16CrFeuav2Fn?= =?us-ascii?Q?W/AIxp7GbJr3POxuKdgFDZ2NGEFycd98KrJ/3U6I1MR9wWfFWEHD+5jVXW0C?= =?us-ascii?Q?6ffL/8cJHHf9CdoTTIaEo9yrERA7UHHj2lrZaexqZiKhw3Pzea0Z2Zxg9fxf?= =?us-ascii?Q?xNGHNCI6YEiFeK/Ue+K9YMBeDHDU1WiuHn4sNllN6GN4NW9eAsz/mtjV1tJP?= =?us-ascii?Q?jCMrrLmRfyTovrt73ZhBMHG+0dFC57lhDPDqqXjvJpFQanDKZjQ7Rh7cjlyN?= =?us-ascii?Q?lBIr7LJpINJbWEYQzgdUkXEBwIYd7n/18xCh1IMuiyk7PW8O5LLfos9gEgsA?= =?us-ascii?Q?mgUoyIHU3p38Hkg8LtgdO02HdW7QgS8W1wCbncjA5Md69Ih41f79pxA+D4T/?= =?us-ascii?Q?8oRwEc11NbvI34vs4IinIgKjfC95lDKPwLb5iJZZV5AM6qMk1M3pkkeQhzhK?= =?us-ascii?Q?nBtDz7JuQGdUwBCzLO4yL55iLnvfbN4wq/ZpwV3Pxag3dJaDXcYxC7/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YJzAAcIF6Xat0rvEfeNIz7WM86wV0h8CPA0Tx4ISa6H8jnUE/zVG64VqCyVXi0QbdlhZ1VgH0iJ80+L+6afJ2K7rVvto92AA5M8F9vASBZBErq/daFt6amYI81jY55tBf8hWBe/HQuHUzA7lUNNIb8nuCNloZ7ST9z9Fr/vdH0OmAf+ZmTB0n/ftzGHkUacZ4gC0HUDlPiNXQL+OJgZDLIDD8pveb7PVOwtBKCi5O2zE+vS8Usm3BKBGGR+4eFQVZ4bOY5w==; 5:r1d1XSOM+YhlGyGWh5O7j857nyJF1ATe3wRAqCqTJEdZ1jZ2hYf0ANtaipvBVLdBtMgi+1dYYh8F/5JefvKudnVz27ZdZg8Qz2y2oNtGJxlsfHKVmKvzw4Iz1QsoRJk/sJdS5Ps99XsUhcU9j0/spuiMwPm7faaB97cL26I0twk=; 24:JYoLxa45Rgt1AB6vH9bbDgO6YKIW0DSkBb9RslqPjRdx/a0e/X0GqUM5sMr0mxKqkuorWM+nsbdbUtteuR27AM1reOL4QBx8NXS87MS1cRE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; ME2PR01MB2899; 7:f4tm51urh0fiFGGR1L3a4vJ92DaSnpNVpB8lIe34UuKcq4RP6Yb10PnmYHYn7I75FXCo9Z96SVo9PHtolXidOsDD6SUnkLAOVLwr9ikxVMnntBzTjEk4Tf52OX2aQROlP38CXpXHIsCRn6U+VbPDNhzf9kmM/FThn1LBzNDA8Kuzcjb7tKGawtGrrYCtYbuJwsH8bRi8jqSvj6EKdEA/uQQ0Alpqm7mpZmDn2lXesEdHK1a68JTjxz6E46vLAUvO X-MS-Office365-Filtering-Correlation-Id: c59de349-35b7-4147-13c7-08d5ab0298a4 X-OriginatorOrg: tenpoint.co.nz X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2018 23:16:37.9311 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c59de349-35b7-4147-13c7-08d5ab0298a4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: ed686f26-19e8-407b-91d0-7364c1c6f5cf X-MS-Exchange-Transport-CrossTenantHeadersStamped: ME2PR01MB2899 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, 25 Apr 2018 at 06:19:33 +1200, Alan Third wrote: > What do you mean by too many permutations? Is it because of the number > of NSDragOperation options? No, the NSDragOperation and mask stuff is relatively straightforward, although we have to work out which one to apply and a lot of that depends on the context in Lisp. My main problem is the bewildering number of different data types that have be to handled, in particular casting every possibility from ObjC -> C -> Lisp and interpreting them at the end. But there are other complications. When the source adds a dragging image to the pasteboard, I thought it was a single type. It's not, each one (NSStringPboardType, NSFilenamesPboardType, etc) is an array of conforming types, and different sources can use different conforming types to represent the same image. We have to work out which one to use. This gets harder when we're dealing with more than one image on the pasteboard, each with it's own types. Some sources also place the same image on the pasteboard twice (or more) to represent it using different types, so we need to know about those too. Then there's backwards compatibility, as not all these things work the same way on older versions of macOS. It all gets pretty convoluted. Other related stuff doesn't work the way I expect either. I'd planned to highlight the target Emacs window with a border to give the user better feedback about the drop location. That's a pretty basic thing to do. But there's something odd about Emacs's NSView implementation, which means any code using drawRect is either ignored or affects all the objects in the view at once, as if everything is drawn onto one flat canvas. I also wanted to use draggingUpdate to update point during the dragging session, in order to give the user better control over the insertion point. Again, pretty rudimentary stuff. But I'm embarrassed to admit, I can't even work out how to move point from C, much less from ObjC, and much much less make it follow the mouse mid-dragging session. As far as I can tell, Emacs on free platforms doesn't support being the dragging source (either to other apps or within Emacs itself), so I didn't look at that option at all. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 26 16:44:54 2018 Received: (at 30929) by debbugs.gnu.org; 26 Apr 2018 20:44:54 +0000 Received: from localhost ([127.0.0.1]:40732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBnl7-0000cD-OP for submit@debbugs.gnu.org; Thu, 26 Apr 2018 16:44:54 -0400 Received: from mail-wr0-f173.google.com ([209.85.128.173]:37743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBnl5-0000c0-RI for 30929@debbugs.gnu.org; Thu, 26 Apr 2018 16:44:52 -0400 Received: by mail-wr0-f173.google.com with SMTP id c14-v6so17921723wrd.4 for <30929@debbugs.gnu.org>; Thu, 26 Apr 2018 13:44:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=ndGHbXCAdon2pbKkn8V4OkL8c/43HrnepuJDM2J1ntY=; b=FUqa9F7XgcquNG20gmInbRRjYi/VvL4SVuuqutqGF5tFOwXVLJPpYm+KI9aPWAnA8s h/8YbTlNQ0jcg5JU9zSh09WZF5+aMk2SwyBUNUMJT+SXusc4qzEnZiI9PzAakOdzGKQR K6dSbznpsqmTmIWLhnKmeBkDoQQFEauOWyEESlGetI5lEbexYPB0aArIxdrzqJUcKYHA JYt1uq/etMkeGy1e83Gl6WQYE/CufhAIEtYfXN4v3VBE1ZYwPTjUYb4u4ZlITILkWNl3 8uMOkgDzIwRfIA72N237GtLXICi2gNftIKAoD+sKISZIHhNp8mA7Gx1SYmgVnkLStmBG neuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=ndGHbXCAdon2pbKkn8V4OkL8c/43HrnepuJDM2J1ntY=; b=gEI+qe3uTnREg67jpQuKpynzgdADHn3NUZaUXjS6ls3i2DIVd+sD0MA+VeCAQJ8XV6 dwOQNFx6KHpcBlqGh/VLkZSwA86teBeeeWAAp3i4CmARoUC/wvSwkizWxQAlQ4CET8Jc hApF7FEspCEzxf5nBpdh5D/8ppEdzNNRo8Psl0GexOWtBW2uLug/AI73VmKYY1xJhNSh L8BP7HvhLc1S4AbdGcttVhRHazH/PpGEvJDjxvYLwDKL/Am5ajilFosWe+g/quwTVF4o gkYu3BqDps3vHfRpRGjpHzWTVPUIINsVoOhpSdfNEzqcQbv0opuVlWRoCWWNNfRdHAw7 KC2Q== X-Gm-Message-State: ALQs6tCR5DtZdz3nEY7LgnVst1Ww1VDbvi/YHSxT9jUye+pWsUax0IkR BI/psMgPX9uxX42LhtXC8Kvqi+cJ X-Google-Smtp-Source: AIpwx4/uXm9IHblYiI8jy5JRy8GmUHASMlW6w/NVXduNy20dOgn7nXmRQYH8mvz8UCHPRt6XJNU34g== X-Received: by 2002:adf:9aea:: with SMTP id a97-v6mr30601804wrc.21.1524775486029; Thu, 26 Apr 2018 13:44:46 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-5ce5-d343-c2a0-e268.holly.idiocy.org. [2001:8b0:3f8:8129:5ce5:d343:c2a0:e268]) by smtp.gmail.com with ESMTPSA id h81sm38234wmd.0.2018.04.26.13.44.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Apr 2018 13:44:44 -0700 (PDT) Date: Thu, 26 Apr 2018 21:44:42 +0100 From: Alan Third To: Nick Helm Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work Message-ID: <20180426204442.GB48707@breton.holly.idiocy.org> References: <20180325115732.GA52626@breton.holly.idiocy.org> <20180407150119.GA1190@breton.holly.idiocy.org> <20180410193824.GA15361@breton.holly.idiocy.org> <20180413183334.GA39515@breton.holly.idiocy.org> <20180424181933.GA48133@breton.holly.idiocy.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Thu, Apr 26, 2018 at 11:16:32AM +1200, Nick Helm wrote: > > My main problem is the bewildering number of different data types that > have be to handled, in particular casting every possibility from > ObjC -> C -> Lisp and interpreting them at the end. Can we simplify this? For example, the current code only supports ‘file’, ‘URL’ and ‘text’. I don’t think we need to worry about more than that. At least for now. I also don’t think you need to worry about converting many different types. When we pass the data to lisp we *always* want it in plain text, so if it’s a file then the filepath, a URL is plaintext anyway, as is text. Anything else we can ignore or reject. If we did want to add other types, like say images, then we would still want to accept only a plaintext description, like a filepath or URL. FWIW, the current code appears to handle this. But I may be completely misunderstanding what you’re telling me. > Then there's backwards compatibility, as not all these things work the > same way on older versions of macOS. It all gets pretty convoluted. Remember we only support back to 10.6, so it may not be too bad. Either way, we can deal with it as we go. Just make sure to mark where you think there may be issues in the code. In the worst case we can continue to use the current code, modified somewhat, in older versions of macOS. > Other related stuff doesn't work the way I expect either. I'd planned to > highlight the target Emacs window with a border to give the user better > feedback about the drop location. That's a pretty basic thing to do. But > there's something odd about Emacs's NSView implementation, which means > any code using drawRect is either ignored or affects all the objects in > the view at once, as if everything is drawn onto one flat canvas. It is pretty much drawn onto a single flat canvas. I think this because of the way Emacs draws. It is annoying. Do you need to use ns_focus and ns_unfocus? These select and unselect an NSRect you want to update. If you search through nsterm.m for ns_focus you’ll be able to find other places where we draw to the frame. > I also wanted to use draggingUpdate to update point during the dragging > session, in order to give the user better control over the insertion > point. Again, pretty rudimentary stuff. But I'm embarrassed to admit, I > can't even work out how to move point from C, much less from ObjC, and > much much less make it follow the mouse mid-dragging session. I’m not sure how you’d implement that, nor whether it’s actually a good idea: you could accidentally move point by dragging over the wrong window. But you should be able to use lisp functions from C, for example goto-char is Fgoto_char, but you need to remember to convert the C int type to a lisp number type before passing it in. (see make_number) I don’t think this stuff is terribly easy, mostly I’ve got to know it through modifying existing code (and messing it up). > As far as I can tell, Emacs on free platforms doesn't support being the > dragging source (either to other apps or within Emacs itself), so > I didn't look at that option at all. If it works in GNUstep, and I think this must, then we’re home free as it counts as a Free platform. http://wiki.gnustep.org/index.php/Drag_and_drop I’ve got a GNUstep build virtual machine, so I can make sure it all works OK. If you need any help, or don’t understand something, please feel free to ask. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 28 05:58:01 2018 Received: (at 30929) by debbugs.gnu.org; 28 Apr 2018 09:58:01 +0000 Received: from localhost ([127.0.0.1]:41599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fCMcB-0006d2-1Y for submit@debbugs.gnu.org; Sat, 28 Apr 2018 05:58:00 -0400 Received: from mail-sy3aus01on0129.outbound.protection.outlook.com ([104.47.117.129]:17312 helo=AUS01-SY3-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fCMc6-0006cm-P6 for 30929@debbugs.gnu.org; Sat, 28 Apr 2018 05:57:56 -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=cPWVPc/9yGql1iMogGwTVcyk1yp4hBMlPO2rjZXOSsU=; b=Bajz94ETovMVgy2MEEQAmJiMdctRKPygVxTnM2DiGml5Wt2jPA2HjTD2WzsD0Ady+Xo/RQGKf1U61m9CE0k4FRhbul1uxiXP9hPA9+UZHEhM/SESZMVZIj/I7le7JrKwSbKZe1jh1qoyJBZLNOKTUtK1Lh5G5JNLr3OLPcG86XQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nick@tenpoint.co.nz; Received: from jupiter.local (125.239.174.80) by MEAPR01MB2902.ausprd01.prod.outlook.com (2603:10c6:201:11::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.715.20; Sat, 28 Apr 2018 09:57:46 +0000 From: Nick Helm To: Alan Third Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work References: <20180325115732.GA52626@breton.holly.idiocy.org> <20180407150119.GA1190@breton.holly.idiocy.org> <20180410193824.GA15361@breton.holly.idiocy.org> <20180413183334.GA39515@breton.holly.idiocy.org> <20180424181933.GA48133@breton.holly.idiocy.org> <20180426204442.GB48707@breton.holly.idiocy.org> Date: Sat, 28 Apr 2018 21:57:40 +1200 In-Reply-To: <20180426204442.GB48707@breton.holly.idiocy.org> (Alan Third's message of "Thu, 26 Apr 2018 21:44:42 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [125.239.174.80] X-ClientProxiedBy: SY2PR01CA0035.ausprd01.prod.outlook.com (2603:10c6:1:15::23) To MEAPR01MB2902.ausprd01.prod.outlook.com (2603:10c6:201:11::12) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(7021125)(5600026)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:MEAPR01MB2902; X-Microsoft-Exchange-Diagnostics: 1; MEAPR01MB2902; 3:2D7mHzxS2VBedEGqVdDGLKUwBvOjdEn5cnvghtMU8wYROWvkWcEzlOmmSyEiKTf/w6niXB1waluaZxf5tsFfZTIbiC9Gz4hvAGyMDUdEw6nebpYPHsOKNCMNwxCCIXnEXhDYNNKl+mzUYSkHAtqcK2oHbe9sNYoflohqB6swIpxDwkgcmqhqtT1Ft/n5uDynI3Qqkpi/OaZSpj22GKOXjNvqE2kJ4Onct38fn/R/qBSDNGtBtar1ljlk/X5vGUwJ; 25:7jgVCHgXJaEoZobarrjAhI1TS2j9PIpvtHH3LsOiFIqlgyHsBbPRtUw3fl5c14UAXeOxCHpg5WykhXRTqeTMRYEcBYuTJJxe2reax3Sk26DkT44+moIFARLiD8Uh3SoxTtBznzerULXVFis33vh8EgZK16Kw6l9rNEOaAZv96CMHz/3UVva+00iGor7zcbLrULvhVaakQQ5h9QNnbnZuTOVmU00dJmu96UpPON/bg4NjgLyjojqSva5I0YLQZmiKAyhKEyQZ3ijLbDOIXuOkqYTAlTNSg1N82FOuqjJvtXYhQdgUsw2sMR3efJccakNvVQApe1KWadjtu/69Gf0Spg==; 31:9zVhgnL64Wleg+0poDKEGs2JmqXkFxKW6a2DKjFVCsPwi18G+1tbi5FX7miREuHNbiQ1Rw6epFLhwiCGw6V+i9agr5c389iCUA6Frn4p9Hb6IQApcGA68Uqejdr2o+wMXFsDg9IHk83YevAiq4xcNZLdEkNZQPx7vTaaijjYcGGgh8ualbyTUpf40aLZWQUONgXXi5v3aTRGvAetfxsijb3YFD676Og/1tWswjH84H0= X-MS-TrafficTypeDiagnostic: MEAPR01MB2902: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231254)(944501410)(52105095)(6041310)(20161123558120)(2016111802025)(20161123562045)(20161123564045)(20161123560045)(6072148)(6043046)(201708071742011); SRVR:MEAPR01MB2902; BCL:0; PCL:0; RULEID:; SRVR:MEAPR01MB2902; X-Microsoft-Exchange-Diagnostics: 1; MEAPR01MB2902; 4:clBvtUfxXvNQR5+y593L7ocUj3LHIpQ1QFNZdikPqDlkS56hhzVvpwqFqMp51zMhZyc9MyBNXvWnRVwrXpiy0rZTjfmffFo1q6VwERoFAwTwILNMtfQ5y8FBMpddWawy7mdi5z/T0huwARkjesxFkjSfkKEAEjjTGCafvw9p8d+gw2d44gwIUkyWCSgSrbLRZ8ueElnRdbVN0DOkG35JvRQyZ1yOmIa4+G92PG8AAk3bQb1/YponnPGmJbBaeV40hCWjAptlhhQK3uMUZRd5sQ== X-Forefront-PRVS: 0656A4403B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(39380400002)(39830400003)(376002)(366004)(396003)(346002)(199004)(189003)(52314003)(316002)(6512007)(97736004)(6306002)(76176011)(106356001)(105586002)(36756003)(229853002)(52116002)(52146003)(23676004)(53936002)(6486002)(2486003)(5660300001)(58126008)(47776003)(74482002)(66066001)(3846002)(6116002)(7736002)(305945005)(11346002)(6916009)(16799955002)(50466002)(476003)(8746002)(347745004)(19625735003)(478600001)(956004)(16526019)(2616005)(2906002)(26005)(386003)(6666003)(68736007)(6506007)(4326008)(186003)(8936002)(59450400001)(93886005)(966005)(446003)(86362001)(486006)(81156014)(25786009)(81166006)(6246003)(8676002); DIR:OUT; SFP:1102; SCL:1; SRVR:MEAPR01MB2902; H:jupiter.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: tenpoint.co.nz does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNRUFQUjAxTUIyOTAyOzIzOm5hUlVLb0xkYXMyRHpiajRiQUFpaVNLbjNK?= =?utf-8?B?THdMMlRPWlQrbzBTcG94L1c5R0piODBHUXNTeVAzZkZ4eWdxclJiWUdLanJO?= =?utf-8?B?bXp0L25QU1pmalV5OWdyK2JOcGY1KzNXQWlsaC81MUtaRFBkbnBwbFAyS3My?= =?utf-8?B?c1QyYU9Fd0dxZC8zODBkcjJzclJsM3N4aVEzMFh3UEFSa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QxBsG0Fb/432hvVqX0VrI+bjnxCjgLspxPqyTwbmk+HkXJw1bejlufpzr4wKN3tnqAgkCduwjGG2rFnv0/6qhupx0Fed2pUjh1qB/GQHzIwi/xCIu8bHlM732oSgjPYHsR8xETnNoYT4BjO6GFG/AvdVoAG3hx8ipOpcxBgVMfc9WtknOL3Lw6ECRLxP7txafeI8Gi5JkjN/YXFCXnGztFEXdNFNp X-MS-Office365-Filtering-Correlation-Id: b229489d-1dae-4783-9afd-08d5acee7e3a X-OriginatorOrg: tenpoint.co.nz X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2018 09:57:46.0100 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b229489d-1dae-4783-9afd-08d5acee7e3a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: ed686f26-19e8-407b-91d0-7364c1c6f5cf X-MS-Exchange-Transport-CrossTenantHeadersStamped: MEAPR01MB2902 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Fri, 27 Apr 2018 at 08:44:42 +1200, Alan Third wrote: > On Thu, Apr 26, 2018 at 11:16:32AM +1200, Nick Helm wrote: >>=20 >> My main problem is the bewildering number of different data types that >> have be to handled, in particular casting every possibility from=20 >> ObjC -> C -> Lisp and interpreting them at the end. > > When we pass the data to lisp we *always* want it in plain > text, so if it=E2=80=99s a file then the filepath, a URL is plaintext any= way, > as is text. > > Anything else we can ignore or reject. OK, this is helpful. I was thinking we'd need to handle all the uniform type identifiers. For example, yes a NSURLPboardType is always text but it might conform to public.text, public.plain-text, public.utf8-plain-text, public.url, public.file-url, etc. But I guess Emacs couldn't care less about all that. The current code simply converts to a UTF8 string and sends it on, so I'll do that too. >> I'd planned to highlight the target Emacs window with a border to >> give the user better feedback about the drop location > > Do you need to use ns_focus and ns_unfocus? These select and unselect > an NSRect you want to update. If you search through nsterm.m for > ns_focus you=E2=80=99ll be able to find other places where we draw to the > frame. Thanks, I'll give that a try. >> As far as I can tell, Emacs on free platforms doesn't support being the >> dragging source (either to other apps or within Emacs itself), so >> I didn't look at that option at all. > > If it works in GNUstep, and I think this must, then we=E2=80=99re home fr= ee as > it counts as a Free platform. > > http://wiki.gnustep.org/index.php/Drag_and_drop > > I=E2=80=99ve got a GNUstep build virtual machine, so I can make sure it a= ll > works OK. If you could check and let me know, that would be great. I'll get the destination stuff working properly first though. > If you need any help, or don=E2=80=99t understand something, please feel = free > to ask. Thanks, I really appreciate it. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 05 05:27:34 2019 Received: (at 30929) by debbugs.gnu.org; 5 Jan 2019 10:27:34 +0000 Received: from localhost ([127.0.0.1]:47261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfjB0-0005cs-1c for submit@debbugs.gnu.org; Sat, 05 Jan 2019 05:27:34 -0500 Received: from mail-wr1-f51.google.com ([209.85.221.51]:33179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfjAx-0005ce-U2 for 30929@debbugs.gnu.org; Sat, 05 Jan 2019 05:27:32 -0500 Received: by mail-wr1-f51.google.com with SMTP id c14so38706778wrr.0 for <30929@debbugs.gnu.org>; Sat, 05 Jan 2019 02:27:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=hQ72Gj6l6z+T2CVVCOrT+BwsUzLZ+hOgwMVKS4fkJj8=; b=YqujejiPNRciobfwxJ+ObXh7wijhG5zI6/FVVbLAKy4bzJrsW0HGmURFuXgG4iyCSY iZ4KIWnQZZ5IH/E21CTTc2f0HhEwe0BpzwU7IZ2k4ouQBgP4GDZjQAdVDFO6Mb/GiCl7 aerykx2Et1PivKraadeeW4FAZrikfjp6uXFHZqWz/88GKM2wLcvB1caEV6Ekn586pNMl cfH/ccXirwHE0aNotzOsMqzs2gdwxY+hFExZuNNeL7+iIHos5NKBQf8EIRg8tQc7bsbU F7r8zG2s/DzfPzPi85ZdX/EzL7QCcTsKbSaMweQxVfFfXFJOF/lEGwDWAYSu8BbFOB9e jXNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=hQ72Gj6l6z+T2CVVCOrT+BwsUzLZ+hOgwMVKS4fkJj8=; b=TuEm0GOBP4w16tID0DzqpMLCfyVoIIrk/qNBjNd1XeaL0QL81o2E5X4uIRLSfq/NVd XcZ9U6RmD4e7sYIgtTzRrYCcTg75C5OWuF7shxp6vTadO4YfBKRb0kIMoi+R2e3y/q3n jxBw6LueEVJ40gYSnHvfa2US6VDhJvOJ4cKISqCmrxp7VzvwHxsYBpg/iv53pwK7latC pXFdbPHUV61cZgBmVkYhhVQ24wJJmzlcAe2M1qjurXWQunwROhDDESqbsoNC2/vD9Kfd b7xh+oe6JaynLIogFvQeZ+Lp31P2ewyYqEy6+OeA1epN88RcpYaPyieyCBgJQHFfryjQ V0yw== X-Gm-Message-State: AJcUukcw8Kaityxvi0Honfo5ILeXg82r1DvNjlYT9qQSitSW9ZVszlLd D4k6uhRVbgoJX4V2GHnMbsBPPeq3uFY= X-Google-Smtp-Source: ALg8bN6mrXWWys4vshwMy7GegRQGKdQyw/kUpM6zXSb5tqhHTi4bQu9YDKTJ4VgXnauPw7R4wVvCFg== X-Received: by 2002:a5d:448f:: with SMTP id j15mr43630856wrq.108.1546684045896; Sat, 05 Jan 2019 02:27:25 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-952c-07b1-cb8c-2eaf.holly.idiocy.org. [2001:8b0:3f8:8129:952c:7b1:cb8c:2eaf]) by smtp.gmail.com with ESMTPSA id y145sm2509040wmd.30.2019.01.05.02.27.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Jan 2019 02:27:25 -0800 (PST) From: Alan Third To: Nick Helm Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work References: <20180325115732.GA52626@breton.holly.idiocy.org> <20180407150119.GA1190@breton.holly.idiocy.org> <20180410193824.GA15361@breton.holly.idiocy.org> <20180413183334.GA39515@breton.holly.idiocy.org> <20180424181933.GA48133@breton.holly.idiocy.org> <20180426204442.GB48707@breton.holly.idiocy.org> Date: Sat, 05 Jan 2019 10:27:24 +0000 In-Reply-To: (Nick Helm's message of "Sat, 28 Apr 2018 21:57:40 +1200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Nick Helm writes: > On Fri, 27 Apr 2018 at 08:44:42 +1200, Alan Third wrote: > >> On Thu, Apr 26, 2018 at 11:16:32AM +1200, Nick Helm wrote: >>>=20 >>> My main problem is the bewildering number of different data types that >>> have be to handled, in particular casting every possibility from=20 >>> ObjC -> C -> Lisp and interpreting them at the end. >> >> When we pass the data to lisp we *always* want it in plain >> text, so if it=E2=80=99s a file then the filepath, a URL is plaintext an= yway, >> as is text. >> >> Anything else we can ignore or reject. > > OK, this is helpful. I was thinking we'd need to handle all the uniform > type identifiers. For example, yes a NSURLPboardType is always text but > it might conform to public.text, public.plain-text, > public.utf8-plain-text, public.url, public.file-url, etc. But I guess > Emacs couldn't care less about all that. The current code simply > converts to a UTF8 string and sends it on, so I'll do that too. Hi Nick, did you make any progress on the drag and drop stuff? --=20 Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 05 08:06:10 2019 Received: (at 30929) by debbugs.gnu.org; 5 Jan 2019 13:06:10 +0000 Received: from localhost ([127.0.0.1]:47341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfleU-0003HT-El for submit@debbugs.gnu.org; Sat, 05 Jan 2019 08:06:10 -0500 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:46807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfleS-0003HF-Hr for 30929@debbugs.gnu.org; Sat, 05 Jan 2019 08:06:09 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 3217DBF5C; Sat, 5 Jan 2019 08:06:03 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 05 Jan 2019 08:06:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenpoint.co.nz; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; s=fm1; bh= Z1QtipkOOa3w+TiPs6+XcnSXTLr09UEhbG+mhZAvU+Q=; b=qAS2x/WrNejR1Yjd d+nATerjEApPOMK7JxpCXMp2vWxz1n9rZHrlggNOINSMd7mVSbkCtWb1WtfeWXjX plJhpMi6gCB7Pf9eBwYe8egdVy9/jmgpIr73+Heox8KEMwZVs+jWwKa9ai9lYD5S SrE9RCLa+ZRKvbLwQqOLLfDt/YLO4vUbucp+4Uqi3yD8Ny4VCmKryM2jyMbh8cYO UVywrlrK7g1m7eVJI5naIR43RD65L5GnvKZiV4CTQ4QROxXZzbmmUMVDRNW1TSrS kGVDmLQ319IfLaTTeDtDF9L6Rw1X8QO+eh+nxfvJ4lXi9/gY5oFYqIGtRxBN7GyA 1W1lZQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Z1QtipkOOa3w+TiPs6+XcnSXTLr09UEhbG+mhZAvU +Q=; b=ysY9UTbTH/HcD1BZJsWDjvFYxM2WhekH12er/u/kNTCL68DrDpg2rryPg ttf9D9NpnZEnQmdAaw92z+2S46mFUQKc1RLl2+yK40gCEnAuI+YglMa5WatrAJwN dAulkSFRs8DDE9Rga556Zs2OnogU3OIiydQ7um5LMX38FsxCc8/VgWwX2vNx4kFg UFpTrwm1S7lVz67kQomQhQtiYiItKilpRUIWpRvMEGKeXj2qr3pZQ6Z1YDDk7PG/ HX92uWaZzPzVqbJunO2+15/erT5kKXZ8nNWt2JYWmtHecumOby5CVbQqvWiGKGcU dsp8ll1jJxwPaiH2QRp/FoTfC6Yaw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrvdefgdehtdculddtuddrgedtkedrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkffuhffvffgjfhgtfggggfesthekredttderjeenucfhrhhomheppfhitghk ucfjvghlmhcuoehnihgtkhesthgvnhhpohhinhhtrdgtohdrnhiiqeenucfkphepuddvhe drvdefledrudejhedruddtheenucfrrghrrghmpehmrghilhhfrhhomhepnhhitghkseht vghnphhoihhnthdrtghordhniienucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from jupiter (125-239-175-105-vdsl.sparkbb.co.nz [125.239.175.105]) by mail.messagingengine.com (Postfix) with ESMTPA id 0DEEF100B8; Sat, 5 Jan 2019 08:06:00 -0500 (EST) Message-ID: <17f6792bc79ba45c3c3be0bc00288ebb452275ec.camel@tenpoint.co.nz> Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work From: Nick Helm To: Alan Third Date: Sun, 06 Jan 2019 02:05:57 +1300 In-Reply-To: References: <20180325115732.GA52626@breton.holly.idiocy.org> <20180407150119.GA1190@breton.holly.idiocy.org> <20180410193824.GA15361@breton.holly.idiocy.org> <20180413183334.GA39515@breton.holly.idiocy.org> <20180424181933.GA48133@breton.holly.idiocy.org> <20180426204442.GB48707@breton.holly.idiocy.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.3 (3.30.3-1.fc29) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sat, 2019-01-05 at 10:27 +0000, Alan Third wrote: > Nick Helm writes: > > > On Fri, 27 Apr 2018 at 08:44:42 +1200, Alan Third wrote: > > > > > On Thu, Apr 26, 2018 at 11:16:32AM +1200, Nick Helm wrote: > > > > My main problem is the bewildering number of different data > > > > types that > > > > have be to handled, in particular casting every possibility > > > > from > > > > ObjC -> C -> Lisp and interpreting them at the end. > > > > > > When we pass the data to lisp we *always* want it in plain > > > text, so if it’s a file then the filepath, a URL is plaintext > > > anyway, > > > as is text. > > > > > > Anything else we can ignore or reject. > > > > OK, this is helpful. I was thinking we'd need to handle all the > > uniform > > type identifiers. For example, yes a NSURLPboardType is always text > > but > > it might conform to public.text, public.plain-text, > > public.utf8-plain-text, public.url, public.file-url, etc. But I > > guess > > Emacs couldn't care less about all that. The current code simply > > converts to a UTF8 string and sends it on, so I'll do that too. > > Hi Nick, did you make any progress on the drag and drop stuff? Hi Alan. Sorry, no I never managed to get it working they way I wanted. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 05 11:20:32 2019 Received: (at 30929) by debbugs.gnu.org; 5 Jan 2019 16:20:32 +0000 Received: from localhost ([127.0.0.1]:48012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfogZ-0001fT-GD for submit@debbugs.gnu.org; Sat, 05 Jan 2019 11:20:32 -0500 Received: from mail-wr1-f51.google.com ([209.85.221.51]:34174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfogX-0001fG-68 for 30929@debbugs.gnu.org; Sat, 05 Jan 2019 11:20:30 -0500 Received: by mail-wr1-f51.google.com with SMTP id j2so39259825wrw.1 for <30929@debbugs.gnu.org>; Sat, 05 Jan 2019 08:20:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=qI/dbhitA28jdUHOw9pzqta3d3q/o6NRLm6i0y8upaI=; b=ENt/RO6BrjXuaGWInETA7/KcDpdVTFQ0v43vClx/JdVGfdGmQl0LjYIz4WxWbMNMGX +xBjJejs2jEzd5OgUUmME1Ut23uxxi36pfyl0ydd1WBfH1iTHApsgS0auwIbn3eeZ6uJ K/hWzFxalT2YvLpO5vLKzXijhtOjMCGcPMu01++ksMNTV6r2aFO/ZL+37/IMCa0NPWMK HveQmdFoPlOBwtOW3coPNqqIfxDAbr9CsCNA7n4zhhgfiJjGeh9X5LCHhUPxfRTSimbb yJE/VelrRCBoGjnGcDr81+Bbb3v0XDZydcca6e+ISYn88liNrYIGATa9qTdB+F04iLM9 9J+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=qI/dbhitA28jdUHOw9pzqta3d3q/o6NRLm6i0y8upaI=; b=SEpazYRQGsN+6N4TE+ut9FLpKH+0XgZi51SEwbo+/FWVTVZ09N+8oODbfkAPmRiD1f L3fyU/oY70YDWyVERZqQbULgjUNII+YlTiAEWIh9LSZlBMDj4xqXaOuUf2d91hmDtsDz iSdJ1XMMoj/XyxHvkHvl1b9YlwF8S3hDAloQhZdLElpJ0recyq7rBlTjwQZNfofy/cyE R+c0RsTWOP3+SmhDsh9ql+p9kqyZXVUu7iT5Y+gXa/ZpZT+lTu5bStaD8vlf4JyvaIi2 lIAm6YeaWshTtrhZfOASQs9G6WBD2trOx4A35gUj3i/ig15wYfmdJRHk3+TAH1ctXUOF NoUg== X-Gm-Message-State: AJcUukfb8GoXfYvTIbpaJd2Q+nVSX8Bylh/EHutz0XEWr99JbRhwEIKj YSzRcZKp8tYSEMJT6U9CDlpjZ7oBefE= X-Google-Smtp-Source: ALg8bN71VqOuesWF3wSCUwWR4GeOtHFZM9VCtA6ixLcsbEYKe4SfhZDDiFNBWGXKxd55symMCoZVMQ== X-Received: by 2002:adf:e3d0:: with SMTP id k16mr49474959wrm.223.1546705223408; Sat, 05 Jan 2019 08:20:23 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-952c-07b1-cb8c-2eaf.holly.idiocy.org. [2001:8b0:3f8:8129:952c:7b1:cb8c:2eaf]) by smtp.gmail.com with ESMTPSA id q12sm3344138wmf.2.2019.01.05.08.20.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jan 2019 08:20:22 -0800 (PST) Date: Sat, 5 Jan 2019 16:20:20 +0000 From: Alan Third To: Nick Helm Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work Message-ID: <20190105162020.GA52639@breton.holly.idiocy.org> References: <20180410193824.GA15361@breton.holly.idiocy.org> <20180413183334.GA39515@breton.holly.idiocy.org> <20180424181933.GA48133@breton.holly.idiocy.org> <20180426204442.GB48707@breton.holly.idiocy.org> <17f6792bc79ba45c3c3be0bc00288ebb452275ec.camel@tenpoint.co.nz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <17f6792bc79ba45c3c3be0bc00288ebb452275ec.camel@tenpoint.co.nz> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sun, Jan 06, 2019 at 02:05:57AM +1300, Nick Helm wrote: > On Sat, 2019-01-05 at 10:27 +0000, Alan Third wrote: > > Hi Nick, did you make any progress on the drag and drop stuff? > > Hi Alan. Sorry, no I never managed to get it working they way I wanted. No problem. Can you have a look at the attached. It’s not as ambitious as we discussed, but it does pretty much the minimum required to make drag and drop usable. If you think the defaults I’ve chosen don’t make sense, I’m happy to change them. I don’t ever use drag and drop, so I don’t know what’s really useful for people. -- Alan Third --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Fix-drag-and-drop-behaviour-on-NS.patch" >From 1d4cbb250bb0f8fd75a3c749b454c9b177c4dae7 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sat, 5 Jan 2019 16:11:37 +0000 Subject: [PATCH] Fix drag and drop behaviour on NS * doc/emacs/macos.texi (Mac / GNUstep Events): Describe the new drag and drop behaviour. * lisp/term/ns-win.el (ns-drag-n-drop): Handle the new event format. (ns-drag-n-drop-other-frame): (ns-drag-n-drop-as-text): (ns-drag-n-drop-as-text-other-frame): Remove functions and key bindings. * src/nsterm.m ([EmacsView performDragOperation:]): Send Emacs event in new format without setting any modifiers. --- doc/emacs/macos.texi | 21 ++++++++++-- etc/NEWS | 6 ++++ lisp/term/ns-win.el | 54 ++++++++++++----------------- src/nsterm.m | 81 ++++++++++++++++++++------------------------ 4 files changed, 84 insertions(+), 78 deletions(-) diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index 6d27e97821..d9920957ad 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi @@ -170,8 +170,25 @@ Mac / GNUstep Events This event occurs when a user drags an object from another application into an Emacs frame. The default behavior is to open a file in the window under the mouse, or to insert text at point of the window under -the mouse. It may sometimes be necessary to use the @key{Meta} key in -conjunction with dragging to force text insertion. +the mouse. + +The sending application has some limited ability to decide how Emacs +handles the sent object, but the user may override the default +behaviour by holding one or more modifier key. + +@table @kbd +@item control +Insert as text in the current buffer. If the object is a file, this +will insert the filename. +@item alt/option +Attempt to open the object as though it is a file or URL. +@item super/command +Perform the default action for the type. This can be useful when an +application is overriding the default behaviour. +@end table + +The modifier keys listed above are defined by macOS and are unaffected +by user changes to the modifiers in Emacs. @item ns-change-font This event occurs when the user selects a font in a Nextstep font diff --git a/etc/NEWS b/etc/NEWS index b316aecbfa..3b3c4483e9 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1480,6 +1480,12 @@ versions of MS-Windows. Set this variable to 50 if for some reason you need the old behavior (and please report such situations to Emacs developers). ++++ +** On NS the behaviour of drag and drop can now be modified by use of +modifier keys in line with Apples guidelines. This makes the drag and +drop behaviour more consistent, as previously the sending application +was able to 'set' modifiers without the knowledge of the user. + ---------------------------------------------------------------------- This file is part of GNU Emacs. diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index c9f5bfef52..6a668b213d 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -501,48 +501,38 @@ ns-find-file (find-file f))))) -(defun ns-drag-n-drop (event &optional new-frame force-text) +(defun ns-drag-n-drop (event) "Edit the files listed in the drag-n-drop EVENT. -Switch to a buffer editing the last file dropped." +Switch to a buffer editing the last file dropped, or insert the +string dropped into the current buffer." (interactive "e") (let* ((window (posn-window (event-start event))) (arg (car (cdr (cdr event)))) (type (car arg)) - (data (car (cdr arg))) - (url-or-string (cond ((eq type 'file) - (concat "file:" data)) - (t data)))) + (operations (car (cdr arg))) + (objects (cdr (cdr arg))) + (string (mapconcat 'identity objects "\n"))) (set-frame-selected-window nil window) - (when new-frame - (select-frame (make-frame))) (raise-frame) (setq window (selected-window)) - (if force-text - (dnd-insert-text window 'private data) - (dnd-handle-one-url window 'private url-or-string)))) - - -(defun ns-drag-n-drop-other-frame (event) - "Edit the files listed in the drag-n-drop EVENT, in other frames. -May create new frames, or reuse existing ones. The frame editing -the last file dropped is selected." - (interactive "e") - (ns-drag-n-drop event t)) - -(defun ns-drag-n-drop-as-text (event) - "Drop the data in EVENT as text." - (interactive "e") - (ns-drag-n-drop event nil t)) - -(defun ns-drag-n-drop-as-text-other-frame (event) - "Drop the data in EVENT as text in a new frame." - (interactive "e") - (ns-drag-n-drop event t t)) + (cond ((memq 'ns-drag-operation-generic operations) + ;; Perform the default action for the type. + (if (eq type 'file) + (dolist (data objects) + (dnd-handle-one-url window 'private (concat "file:" data))) + (dnd-insert-text window 'private string))) + ((memq 'ns-drag-operation-copy operations) + ;; Try to open the file/URL. If type is nil, try to open + ;; it as a URL anyway. + (dolist (data objects) + (dnd-handle-one-url window 'private (if (eq type 'file) + (concat "file:" data) + data)))) + (t + ;; Insert the text as is. + (dnd-insert-text window 'private string))))) (global-set-key [drag-n-drop] 'ns-drag-n-drop) -(global-set-key [C-drag-n-drop] 'ns-drag-n-drop-other-frame) -(global-set-key [M-drag-n-drop] 'ns-drag-n-drop-as-text) -(global-set-key [C-M-drag-n-drop] 'ns-drag-n-drop-as-text-other-frame) ;;;; Frame-related functions. diff --git a/src/nsterm.m b/src/nsterm.m index 016c044760..2bce4a89ae 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8230,7 +8230,9 @@ -(BOOL)performDragOperation: (id ) sender NSEvent *theEvent = [[self window] currentEvent]; NSPoint position; NSDragOperation op = [sender draggingSourceOperationMask]; - int modifiers = 0; + Lisp_Object operations = Qnil; + Lisp_Object strings = Qnil; + Lisp_Object type_sym; NSTRACE ("[EmacsView performDragOperation:]"); @@ -8243,19 +8245,17 @@ -(BOOL)performDragOperation: (id ) sender pb = [sender draggingPasteboard]; type = [pb availableTypeFromArray: ns_drag_types]; - if (! (op & (NSDragOperationMove|NSDragOperationDelete)) && - // URL drags contain all operations (0xf), don't allow all to be set. - (op & 0xf) != 0xf) - { - if (op & NSDragOperationLink) - modifiers |= NSEventModifierFlagControl; - if (op & NSDragOperationCopy) - modifiers |= NSEventModifierFlagOption; - if (op & NSDragOperationGeneric) - modifiers |= NSEventModifierFlagCommand; - } + /* We used to convert these drag operations to keyboard modifiers, + but because they can be set by the sending program as well as the + keyboard modifiers it was difficult to work out a sensible key + mapping for drag and drop. */ + if (op & NSDragOperationLink) + operations = Fcons (Qns_drag_operation_link, operations); + if (op & NSDragOperationCopy) + operations = Fcons (Qns_drag_operation_copy, operations); + if (op & NSDragOperationGeneric || NILP (operations)) + operations = Fcons (Qns_drag_operation_generic, operations); - modifiers = EV_MODIFIERS2 (modifiers); if (type == 0) { return NO; @@ -8269,39 +8269,20 @@ -(BOOL)performDragOperation: (id ) sender if (!(files = [pb propertyListForType: type])) return NO; + type_sym = Qfile; + fenum = [files objectEnumerator]; while ( (file = [fenum nextObject]) ) - { - emacs_event->kind = DRAG_N_DROP_EVENT; - XSETINT (emacs_event->x, x); - XSETINT (emacs_event->y, y); - emacs_event->modifiers = modifiers; - emacs_event->arg = list2 (Qfile, build_string ([file UTF8String])); - EV_TRAILER (theEvent); - } - return YES; + strings = Fcons (build_string ([file UTF8String]), strings); } else if ([type isEqualToString: NSURLPboardType]) { NSURL *url = [NSURL URLFromPasteboard: pb]; if (url == nil) return NO; - emacs_event->kind = DRAG_N_DROP_EVENT; - XSETINT (emacs_event->x, x); - XSETINT (emacs_event->y, y); - emacs_event->modifiers = modifiers; - emacs_event->arg = list2 (Qurl, - build_string ([[url absoluteString] - UTF8String])); - EV_TRAILER (theEvent); + type_sym = Qurl; - if ([url isFileURL] != NO) - { - NSString *file = [url path]; - ns_input_file = append2 (ns_input_file, - build_string ([file UTF8String])); - } - return YES; + strings = Fcons (build_string ([[url absoluteString] UTF8String]), Qnil); } else if ([type isEqualToString: NSStringPboardType] || [type isEqualToString: NSTabularTextPboardType]) @@ -8311,19 +8292,27 @@ -(BOOL)performDragOperation: (id ) sender if (! (data = [pb stringForType: type])) return NO; - emacs_event->kind = DRAG_N_DROP_EVENT; - XSETINT (emacs_event->x, x); - XSETINT (emacs_event->y, y); - emacs_event->modifiers = modifiers; - emacs_event->arg = list2 (Qnil, build_string ([data UTF8String])); - EV_TRAILER (theEvent); - return YES; + type_sym = Qnil; + + strings = Fcons (build_string ([data UTF8String]), Qnil); } else { fprintf (stderr, "Invalid data type in dragging pasteboard"); return NO; } + + emacs_event->kind = DRAG_N_DROP_EVENT; + XSETINT (emacs_event->x, x); + XSETINT (emacs_event->y, y); + emacs_event->modifiers = 0; + + emacs_event->arg = Fcons (type_sym, + Fcons (operations, + strings)); + EV_TRAILER (theEvent); + + return YES; } @@ -9358,6 +9347,10 @@ Convert an X font name (XLFD) to an NS font name. DEFSYM (Qfile, "file"); DEFSYM (Qurl, "url"); + DEFSYM (Qns_drag_operation_copy, "ns-drag-operation-copy"); + DEFSYM (Qns_drag_operation_link, "ns-drag-operation-link"); + DEFSYM (Qns_drag_operation_generic, "ns-drag-operation-generic"); + Fput (Qalt, Qmodifier_value, make_fixnum (alt_modifier)); Fput (Qhyper, Qmodifier_value, make_fixnum (hyper_modifier)); Fput (Qmeta, Qmodifier_value, make_fixnum (meta_modifier)); -- 2.19.1 --+QahgC5+KEYLbs62-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 07 05:38:52 2019 Received: (at 30929) by debbugs.gnu.org; 7 Jan 2019 10:38:52 +0000 Received: from localhost ([127.0.0.1]:47656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggSJ2-00041H-Cm for submit@debbugs.gnu.org; Mon, 07 Jan 2019 05:38:52 -0500 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:58281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggSIy-000410-Ic for 30929@debbugs.gnu.org; Mon, 07 Jan 2019 05:38:51 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id A39405CAB; Mon, 7 Jan 2019 05:38:42 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 07 Jan 2019 05:38:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenpoint.co.nz; h=date:from:subject:to:cc:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm1; bh= GdI8xTIsi5tzxHth8fm01Aiihr2qQLKPVjagH9k2CkE=; b=o71zcnCAzyaDGVTr ehQpk0UFiMyKaF+nEAZegt+/whojRLIFILEbEzERBZLFL8LErfotJtNI5NYyROSC zwEnnLCUchR2p95YczKC9UyYf/7G1WLOo7z1bXbekHXpFpOLczKD5l9l19z8/IDK CIAn+BOdF3dxsS4cDz7Kzo7L/Ep27xyB5QW9ch4l5LPA0g9YaTUOdt6Y9Kl+ttWm OQ2oD6pCgrZHqm3osWZLukqnPxKRKdCisXKoTdoWMXt0ublwNYOhOKmGYpQ4W8ZO VdoXRKfPlEEgtbboks2oH8myOOHu6AsBGizBJsWIgpQbou/qlMXW0+GymV89ciXN l7Drwg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=GdI8xTIsi5tzxHth8fm01Aiihr2qQLKPVjagH9k2C kE=; b=rkMA0Q7n86E3lbk6xwyHC057Zav///1NuOODiUQa5GMNXBgd8zC6645jV uopZJxXYHrLGPR/xTNpwbBQx/VeYyYnOuiv+lFpHqoejfqLNyX1KgFPP/ebHpjPf l5M/VokWHYK/3pU7d7bjSfiuVfqZoJvOLoib6K1JAedem//+gIOglfAklNP/12cB 7/Q/xSA4WTZ/Q3qzDlB+63DvLglRwyVzzoD7xZ16ylGGhjY92+aeXSlSp7dZF/Mf SvTyh2SEmBg6QPgrjbrcEpgiVsuIfSvvBGOpRmooWBTDXdIvSBmGtj/LqPVR9OB1 XIeSfuTkBjePK6Io9J8NhMKO+pISA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrvdejgdduieculddtuddrgedtkedrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhuffvkfgjfhfogggtgfesthhqredtredtiienucfhrhhomheppfhitghk ucfjvghlmhcuoehnihgtkhesthgvnhhpohhinhhtrdgtohdrnhiiqeenucfkphepuddvhe drvdefledrudejhedruddtheenucfrrghrrghmpehmrghilhhfrhhomhepnhhitghkseht vghnphhoihhnthdrtghordhniienucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [10.10.0.105] (125-239-175-105-vdsl.sparkbb.co.nz [125.239.175.105]) by mail.messagingengine.com (Postfix) with ESMTPA id 0A35B10106; Mon, 7 Jan 2019 05:38:39 -0500 (EST) Date: Mon, 07 Jan 2019 23:38:33 +1300 From: Nick Helm Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work To: Alan Third Message-Id: <1546857513.15202.0@smtp.fastmail.com> In-Reply-To: <20190105162020.GA52639@breton.holly.idiocy.org> References: <20180410193824.GA15361@breton.holly.idiocy.org> <20180413183334.GA39515@breton.holly.idiocy.org> <20180424181933.GA48133@breton.holly.idiocy.org> <20180426204442.GB48707@breton.holly.idiocy.org> <17f6792bc79ba45c3c3be0bc00288ebb452275ec.camel@tenpoint.co.nz> <20190105162020.GA52639@breton.holly.idiocy.org> X-Mailer: geary/0.12.4 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-13; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 30929 Cc: 30929@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sun, Jan 6, 2019 at 5:20 AM, Alan Third wrote: > No problem. Can you have a look at the attached. It=FFs not as=20 > ambitious > as we discussed, but it does pretty much the minimum required to make > drag and drop usable. >=20 > If you think the defaults I=FFve chosen don=FFt make sense, I=FFm=20 > happy to > change them. I don=FFt ever use drag and drop, so I don=FFt know=20 > what=FFs > really useful for people. Thanks, this is a big improvement. I like the default modifier actions - they match how drag and drop works on my other apps. I was worried having the modifiers independent of the Emacs modifiers might be a bit confusing with non-default bindings, but in practice it doesn't cause me any trouble. I also tried as many different dnd operations as I could think of. They all worked as expected except one - when I try to open a malformed URL Emacs creates a spurious buffer and freezes momentarily (C-g to clear). Specifically, I selected the text "file://~/test.txt" in TextEdit.app and dropped it into Emacs with Alt/Opt held down. Properly formed URLs work as expected and open the file. Thanks again for working on this. Nick = From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 10 14:24:07 2019 Received: (at 30929-done) by debbugs.gnu.org; 10 Jan 2019 19:24:08 +0000 Received: from localhost ([127.0.0.1]:54236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghfvw-0006iU-VX for submit@debbugs.gnu.org; Thu, 10 Jan 2019 14:24:07 -0500 Received: from mail-wr1-f42.google.com ([209.85.221.42]:42153) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ghfvu-0006hv-JC for 30929-done@debbugs.gnu.org; Thu, 10 Jan 2019 14:24:03 -0500 Received: by mail-wr1-f42.google.com with SMTP id q18so12664258wrx.9 for <30929-done@debbugs.gnu.org>; Thu, 10 Jan 2019 11:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=tHqUUSd5a8zgt7yA4xuITOBf4pKwGQeZolBDN3MGPG8=; b=dXHz33qlqtdnHTO9Y2Uo4pTJgaYeG2mE2GLbKqLVaZmaK8ExL9h4taNNStE4mQpeih UB7fDVvYEfHDG/t8kBM7dX6YmXRkKbwT6MzVRQx3uCU1MCE+6WFlCORztcy3a/40RdQJ uxJqQRFzuNrnnnFRedjLJw/Wtj6mcuZ8+05FRbOAg3uFIPGOY9tnaw2KiiFbwEJROlar uGqwGcL6Xhw7R77vvQT+CeqEPlnLRIq3dB8FJlHGnoqOKdf2HR9xsGiV8M4NaA2/qJlK R8rzbQaccBoXD2B6M8ZdxoIODROpjlJzfilnZLL8lcOqhDKRn5XfUkNzMJ8WrqWTupVz kNvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=tHqUUSd5a8zgt7yA4xuITOBf4pKwGQeZolBDN3MGPG8=; b=Qvtk0FEm6+BSoCwhld6E31X5gZA/wXMt12UJ2zxuq/HX36UOiD04WTQgNKdZqAqhm8 Qc7JCSjsp9v4pD92TzgOQUwJ2IzoMvs3LbNFJxd+g+BynbOaQHg+uc7k82FoTypbYNCK Qqbm0wBe8XMkEVpVFUnPvGuxVihE2d/IYIsC5ItA5QmAJxs+To2a58AQoQo/Ax+z+Abd l9qe0Z76XKcUPPLWC+6hyErBN5qwnlk1ZyGldfg3nhIqMaLPm4xQFMp/nW552tn+/N0j nSTQ3gKxI6YY18MANLjWb3L/wtD4F8K3wkINCyn3Pe70mzJc26+BoaxNaoYoL/kXh4W4 bPpg== X-Gm-Message-State: AJcUukezKDmAcNT6LOQJgqJ+IRcLSPax07qqu8Cm2IEULpAkfZV5l8EZ bN1+PaAGsJJ24ZbtjUW6igo8Cuxq X-Google-Smtp-Source: ALg8bN5TCPyGP4UAc0dk+KuqX7Zzu3q+kcQa4ZB8IIEmdEJxbxNW92ZRAmcP/eFWz6t7dNAQ0Qwj+w== X-Received: by 2002:adf:a211:: with SMTP id p17mr10518023wra.179.1547148236384; Thu, 10 Jan 2019 11:23:56 -0800 (PST) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-d9c5-a864-fb76-6cc9.holly.idiocy.org. [2001:8b0:3f8:8129:d9c5:a864:fb76:6cc9]) by smtp.gmail.com with ESMTPSA id g129sm16558655wmf.39.2019.01.10.11.23.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Jan 2019 11:23:55 -0800 (PST) Date: Thu, 10 Jan 2019 19:23:52 +0000 From: Alan Third To: Nick Helm Subject: Re: bug#30929: 26.0.91; Text drag and drop does not work Message-ID: <20190110192352.GA7111@breton.holly.idiocy.org> References: <20180413183334.GA39515@breton.holly.idiocy.org> <20180424181933.GA48133@breton.holly.idiocy.org> <20180426204442.GB48707@breton.holly.idiocy.org> <17f6792bc79ba45c3c3be0bc00288ebb452275ec.camel@tenpoint.co.nz> <20190105162020.GA52639@breton.holly.idiocy.org> <1546857513.15202.0@smtp.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1546857513.15202.0@smtp.fastmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30929-done Cc: 30929-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mon, Jan 07, 2019 at 11:38:33PM +1300, Nick Helm wrote: > > I like the default modifier actions - they match how drag and drop works > on my other apps. I was worried having the modifiers independent of the > Emacs modifiers might be a bit confusing with non-default bindings, but > in practice it doesn't cause me any trouble. Excellent. > I also tried as many different dnd operations as I could think of. They > all worked as expected except one - when I try to open a malformed URL > Emacs creates a spurious buffer and freezes momentarily (C-g to clear). > Specifically, I selected the text "file://~/test.txt" in TextEdit.app > and dropped it into Emacs with Alt/Opt held down. Properly formed URLs > work as expected and open the file. I’ve dug into this a bit and I think that’s actually a valid URL as far as Emacs is concerned. I’m not sure what protocol it’s trying to use, but it matches the form file://hostname/filename. I assume the freeze you see is it doing a lookup and if left long enough it will time out (although it’s an extraordinarily long timeout if true). I’ll push this to master now. -- Alan Third From unknown Mon Jun 16 23:41:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 08 Feb 2019 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator