unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Cecilio Pardo <cpardo@imayhem.com>
Cc: 3468@debbugs.gnu.org
Subject: bug#3468: drag and drop text
Date: Thu, 24 Oct 2024 10:37:22 +0300	[thread overview]
Message-ID: <861q06dk99.fsf@gnu.org> (raw)
In-Reply-To: <3adf9bbb-5c6a-4e6d-83f5-c1d2c6a059d6@imayhem.com> (message from Cecilio Pardo on Wed, 23 Oct 2024 19:16:51 +0200)

> Date: Wed, 23 Oct 2024 19:16:51 +0200
> Cc: 3468@debbugs.gnu.org
> From: Cecilio Pardo <cpardo@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?





  reply	other threads:[~2024-10-24  7:37 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04  7:03 bug#3468: drag and drop text Erdkern Erdkern
2019-09-30 15:29 ` Lars Ingebrigtsen
2019-09-30 15:49   ` Eli Zaretskii
2024-09-28 21:52 ` Cecilio Pardo
2024-09-29  7:19   ` Eli Zaretskii
2024-09-29 11:17     ` Cecilio Pardo
2024-09-29 11:36       ` Eli Zaretskii
2024-09-29 11:45         ` Cecilio Pardo
2024-09-30 21:20           ` Cecilio Pardo
2024-10-05 11:07             ` Eli Zaretskii
2024-10-05 12:07               ` Cecilio Pardo
2024-10-05 12:30                 ` Eli Zaretskii
2024-10-05 12:34                   ` Eli Zaretskii
2024-10-05 21:41                     ` Cecilio Pardo
2024-10-05 21:43                       ` Cecilio Pardo
2024-10-06  6:10                       ` Eli Zaretskii
2024-10-07 10:28                         ` Cecilio Pardo
2024-10-07 12:00                           ` Eli Zaretskii
2024-10-08 13:15                             ` Eli Zaretskii
2024-10-08 18:51                               ` Cecilio Pardo
2024-10-23 17:16                               ` Cecilio Pardo
2024-10-24  7:37                                 ` Eli Zaretskii [this message]
2024-10-24  7:56                                   ` Cecilio Pardo
2024-10-24  8:16                                     ` Eli Zaretskii
2024-10-24  8:46                                       ` Cecilio Pardo
2024-10-24  9:40                                         ` Eli Zaretskii
2024-10-24 16:52                                   ` Cecilio Pardo
2024-10-25 10:43                                     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=861q06dk99.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=3468@debbugs.gnu.org \
    --cc=cpardo@imayhem.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).