GNU bug report logs - #3468
Support drag and drop of text on MS Windows

Previous Next

Package: emacs;

Reported by: "Erdkern Erdkern" <Erdkern2000 <at> gmx.de>

Date: Fri, 5 Jun 2009 00:00:04 UTC

Severity: wishlist

Tags: help

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Cecilio Pardo <cpardo <at> imayhem.com>
Cc: 3468 <at> debbugs.gnu.org
Subject: bug#3468: drag and drop text
Date: Thu, 24 Oct 2024 10:37:22 +0300
> Date: Wed, 23 Oct 2024 19:16:51 +0200
> Cc: 3468 <at> debbugs.gnu.org
> From: Cecilio Pardo <cpardo <at> imayhem.com>
> 
> 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?




This bug report was last modified 266 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.