From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#3468: drag and drop text Date: Thu, 24 Oct 2024 10:37:22 +0300 Message-ID: <861q06dk99.fsf@gnu.org> References: <20090604070321.177690@gmx.net> <8ba4e567-550e-4ac2-96f4-c6f7bacd78d0@imayhem.com> <86wmiv3p0r.fsf@gnu.org> <9bef55ae-e0aa-40d0-af77-7e7eac309b3a@imayhem.com> <86msjq4rp5.fsf@gnu.org> <55f3d9b3-4a46-4ca1-9f84-c3bf99d1c403@imayhem.com> <86ed4ux0xj.fsf@gnu.org> <86a5fiwx3e.fsf@gnu.org> <867camwwx8.fsf@gnu.org> <258ce0b8-95b3-4e39-ba52-fc007326c891@imayhem.com> <86msjhvk1n.fsf@gnu.org> <39db8246-18f9-44ea-8678-925af995549f@imayhem.com> <86msjgt96l.fsf@gnu.org> <86o73uspkk.fsf@gnu.org> <3adf9bbb-5c6a-4e6d-83f5-c1d2c6a059d6@imayhem.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27389"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 3468@debbugs.gnu.org To: Cecilio Pardo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 24 09:39:06 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t3sQz-0006yf-E9 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Oct 2024 09:39:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3sQY-0005Uw-Sg; Thu, 24 Oct 2024 03:38:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t3sQU-0005UE-3r for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2024 03:38:35 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3sQT-0002ld-BA for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2024 03:38:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=6vv8iK5ZzTCaR1vP/AQzJV9V38mFNPZW1b0Evw1LjJw=; b=T0Ocg3pTnKzVHS0Bs3bLNsu6y6eeQkLfEGVMwG0G3kuxaeXAZpGB/xxPNAlr+RFmDeBhMHIMRRiZMzThjqAvcufbOyhfvtEhKgX2SHCOM3gOaVKq+mYfG85lD9TiyGhw+exzrRxnRSq3Kpo3nvS9sntcIZTtXXCJsdCHculSv+YaFj/YajobvUBkXxU3aMTFrs59Ub2tDmQShC2oJaTdR10evtv69E4TpBjLXFWiZRPgiYJAtwY3td7k9JGbJ8086+OCjpu8JZK1FDkszXuuCm1WrJw1vz8MG/Qczjg2pgrzbHMJmizCKHqZ5RSDKb6f8q68fAB3kq6QxExIp8ex0Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t3sQx-0003vR-JX for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2024 03:39:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Oct 2024 07:39:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3468 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: help Original-Received: via spool by 3468-submit@debbugs.gnu.org id=B3468.172975549715009 (code B ref 3468); Thu, 24 Oct 2024 07:39:03 +0000 Original-Received: (at 3468) by debbugs.gnu.org; 24 Oct 2024 07:38:17 +0000 Original-Received: from localhost ([127.0.0.1]:33453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3sQC-0003u0-IB for submit@debbugs.gnu.org; Thu, 24 Oct 2024 03:38:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t3sQA-0003tm-7S for 3468@debbugs.gnu.org; Thu, 24 Oct 2024 03:38:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t3sPZ-0002hF-Bb; Thu, 24 Oct 2024 03:37:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=6vv8iK5ZzTCaR1vP/AQzJV9V38mFNPZW1b0Evw1LjJw=; b=mPZvp506L0Ff xV1E9Kb+QIT1op9NNy7NTQB3jk9zQX2ufMXx1typ5UfhhBZmom50N8+9SeOP4qigpLiYVa87yvk7d wPSD9gGxLkXyPyVCkF8/CZCgZonaSNwxxZgeY6eUIcw8mM+Y6djyAme+aJWfA9T41skOIds75bgNj SDzPccx2oXPK0Cah1RwfmNnEXYFLPdW+jJaQbd6z+iXPoBrgPyZ1uR6YOt+TUabdZ/We2ywzko0EL A7ET6i8UI015TPqXN94Zu+B+XjImUSaKlrALcV/7F3YfQwQCvC0PvQf+Z6r5FWTIzLDANS/AIPjBw wCyDVOf8BQtSpl1FSear0A==; In-Reply-To: <3adf9bbb-5c6a-4e6d-83f5-c1d2c6a059d6@imayhem.com> (message from Cecilio Pardo on Wed, 23 Oct 2024 19:16:51 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294168 Archived-At: > Date: Wed, 23 Oct 2024 19:16:51 +0200 > Cc: 3468@debbugs.gnu.org > From: Cecilio Pardo > > This add support for dnd-scroll-margin and dnd-indicate-insertion-point > on MS-Windows. Thanks. I guess I'm missing some higher-level understanding of how this work, because I don't think I understand why you needed to add a special message WM_EMACS_DRAGOVER for this. Can you explain? > BTW, I think this variables should be enabled by default. I'd say that > is the expected behaviour for drag and drop. Maybe. But that is a separate issue. > * lisp/term/w32-win.el (w32-drag-n-drop): Call dnd-handle-movement > when applicable. > * src/w32fns.c (w32_handle_drag_movement): New function, sends a > WM_EMACS_DRAGOVER message. > (w32_drop_target_DragEnter): Call w32_handle_drag_movement. > (w32_drop_target_DragOver): Call w32_handle_drag_movement. > * src/w32term.c: (w32_read_socket): Handle WM_EMACS_DRAGOVER, > sending an drag-n-drop event. Please quote symbols 'like this'. > * src/w32term.h (): Define new WM_EMACS_DRAGOVER message. ^^^ Please remove these parentheses. > --- a/lisp/term/w32-win.el > +++ b/lisp/term/w32-win.el > @@ -137,35 +137,39 @@ w32-drag-n-drop > If EVENT is for text, insert that text at point into the buffer > shown in the window that is the target of the drop; if that buffer is > read-only, add the dropped text to kill-ring. > +If EVENT payload is nil, then this is a drag event. > If the optional argument NEW-FRAME is non-nil, perform the > drag-n-drop action in a newly-created frame using its selected-window > and that window's buffer." > (interactive "e") > - (save-excursion What are the reasons for removing save-excursion? I guess this also needs a NEWS entry, to announce support for these two variables on MS-Windows?