GNU bug report logs - #73258
31.0.50; w32 drag-n-dropping multiple files is broken

Previous Next

Package: emacs;

Reported by: Cecilio Pardo <cpardo <at> imayhem.com>

Date: Sat, 14 Sep 2024 19:34:01 UTC

Severity: normal

Found in version 31.0.50

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73258 in the body.
You can then email your comments to 73258 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#73258; Package emacs. (Sat, 14 Sep 2024 19:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cecilio Pardo <cpardo <at> imayhem.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 14 Sep 2024 19:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Cecilio Pardo <cpardo <at> imayhem.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; w32 drag-n-dropping multiple files is broken
Date: Sat, 14 Sep 2024 21:33:00 +0200
[Message part 1 (text/plain, inline)]
dnd-handle-multiple-urls is called once for each file. This brings 
problems, such that when dropping two directories, emacs open the first 
one on dired, then tries to copy the contents of the second to the 
first. The attached patch fixes this. -- Cecilio Pardo
[patch.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73258; Package emacs. (Sun, 15 Sep 2024 08:26:01 GMT) Full text and rfc822 format available.

Message #8 received at 73258 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Cecilio Pardo <cpardo <at> imayhem.com>
Cc: 73258 <at> debbugs.gnu.org
Subject: Re: bug#73258: 31.0.50; w32 drag-n-dropping multiple files is broken
Date: Sun, 15 Sep 2024 11:25:18 +0300
> Date: Sat, 14 Sep 2024 21:33:00 +0200
> From: Cecilio Pardo <cpardo <at> imayhem.com>
> 
> dnd-handle-multiple-urls is called once for each file. This brings 
> problems, such that when dropping two directories, emacs open the first 
> one on dired, then tries to copy the contents of the second to the 
> first. The attached patch fixes this. -- Cecilio Pardo

Thanks.

We cannot remove or make backward-incompatible changes in a public
API.  So removing/renaming w32-handle-dropped-file and/or changing its
signature is out of the question.  Can you rewrite the patch such that
it keeps this function and its arguments, and just change the
implementation to fix the problem?

Also, please accompany your changes with a ChangeLog-style description
(see CONTRIBUTE for the details), to make the job of installing the
changes easier.

Thanks again for working on this.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73258; Package emacs. (Sun, 15 Sep 2024 19:23:02 GMT) Full text and rfc822 format available.

Message #11 received at 73258 <at> debbugs.gnu.org (full text, mbox):

From: Cecilio Pardo <cpardo <at> imayhem.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73258 <at> debbugs.gnu.org
Subject: Re: bug#73258: 31.0.50; w32 drag-n-dropping multiple files is broken
Date: Sun, 15 Sep 2024 21:22:32 +0200
[Message part 1 (text/plain, inline)]
On 15/09/2024 10:25, Eli Zaretskii wrote:
> We cannot remove or make backward-incompatible changes in a public
> API.  So removing/renaming w32-handle-dropped-file and/or changing its
> signature is out of the question.  Can you rewrite the patch such that
> it keeps this function and its arguments, and just change the
> implementation to fix the problem?
>
> Also, please accompany your changes with a ChangeLog-style description
> (see CONTRIBUTE for the details), to make the job of installing the
> changes easier.

See the attached patch. Hope I did it right, let me know.

Thanks.
[0001-Fix-multifile-drag-n-drop-on-win32.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73258; Package emacs. (Fri, 20 Sep 2024 11:21:02 GMT) Full text and rfc822 format available.

Message #14 received at 73258 <at> debbugs.gnu.org (full text, mbox):

From: Cecilio Pardo <cpardo <at> imayhem.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73258 <at> debbugs.gnu.org
Subject: Re: bug#73258: 31.0.50; w32 drag-n-dropping multiple files is broken
Date: Fri, 20 Sep 2024 13:20:05 +0200
[Message part 1 (text/plain, inline)]
Did you get a chance to review this?

On 15/09/2024 21:22, Cecilio Pardo wrote:
>
> On 15/09/2024 10:25, Eli Zaretskii wrote:
>> We cannot remove or make backward-incompatible changes in a public
>> API.  So removing/renaming w32-handle-dropped-file and/or changing its
>> signature is out of the question.  Can you rewrite the patch such that
>> it keeps this function and its arguments, and just change the
>> implementation to fix the problem?
>>
>> Also, please accompany your changes with a ChangeLog-style description
>> (see CONTRIBUTE for the details), to make the job of installing the
>> changes easier.
>
> See the attached patch. Hope I did it right, let me know.
>
> Thanks.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73258; Package emacs. (Fri, 20 Sep 2024 13:27:02 GMT) Full text and rfc822 format available.

Message #17 received at 73258 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Cecilio Pardo <cpardo <at> imayhem.com>
Cc: 73258 <at> debbugs.gnu.org
Subject: Re: bug#73258: 31.0.50; w32 drag-n-dropping multiple files is broken
Date: Fri, 20 Sep 2024 16:26:03 +0300
> Date: Fri, 20 Sep 2024 13:20:05 +0200
> From: Cecilio Pardo <cpardo <at> imayhem.com>
> Cc: 73258 <at> debbugs.gnu.org
> 
> Did you get a chance to review this? 

Not yet.  Will do soon.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73258; Package emacs. (Sat, 21 Sep 2024 10:13:01 GMT) Full text and rfc822 format available.

Message #20 received at 73258 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Cecilio Pardo <cpardo <at> imayhem.com>
Cc: 73258 <at> debbugs.gnu.org
Subject: Re: bug#73258: 31.0.50; w32 drag-n-dropping multiple files is broken
Date: Sat, 21 Sep 2024 13:11:26 +0300
> Date: Sun, 15 Sep 2024 21:22:32 +0200
> Cc: 73258 <at> debbugs.gnu.org
> From: Cecilio Pardo <cpardo <at> imayhem.com>
> 
> On 15/09/2024 10:25, Eli Zaretskii wrote:
> > We cannot remove or make backward-incompatible changes in a public
> > API.  So removing/renaming w32-handle-dropped-file and/or changing its
> > signature is out of the question.  Can you rewrite the patch such that
> > it keeps this function and its arguments, and just change the
> > implementation to fix the problem?
> >
> > Also, please accompany your changes with a ChangeLog-style description
> > (see CONTRIBUTE for the details), to make the job of installing the
> > changes easier.
> 
> See the attached patch. Hope I did it right, let me know.

This causes the following warning while byte-compiling:

  In w32-dropped-file-to-url:
  term/w32-win.el:129:29: Warning: reference to free variable `window'

And indeed, 'window' is not bound to any value here, and
dnd-handle-multiple-urls does need it to be a valid window.  If I try
drag-and-drop with your patch installed, Emacs signals an error about
'window' being void.  I don't understand how it worked for you.

Also, what about this comment:

  ;; FIXME: is the W32 build capable only of receiving a single file
  ;; from each drop?

I guess it is no longer pertinent and should be deleted?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73258; Package emacs. (Sat, 21 Sep 2024 13:42:01 GMT) Full text and rfc822 format available.

Message #23 received at 73258 <at> debbugs.gnu.org (full text, mbox):

From: Cecilio Pardo <cpardo <at> imayhem.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73258 <at> debbugs.gnu.org
Subject: Re: bug#73258: 31.0.50; w32 drag-n-dropping multiple files is broken
Date: Sat, 21 Sep 2024 15:41:03 +0200
[Message part 1 (text/plain, inline)]
On 21/09/2024 12:11, Eli Zaretskii wrote:
> This causes the following warning while byte-compiling:
>
>    In w32-dropped-file-to-url:
>    term/w32-win.el:129:29: Warning: reference to free variable `window'
>
> And indeed, 'window' is not bound to any value here, and
> dnd-handle-multiple-urls does need it to be a valid window.  If I try
> drag-and-drop with your patch installed, Emacs signals an error about
> 'window' being void.  I don't understand how it worked for you.
>
> Also, what about this comment:
>
>    ;; FIXME: is the W32 build capable only of receiving a single file
>    ;; from each drop?
>
> I guess it is no longer pertinent and should be deleted?

I messed up when preparing the patch file, I'm sorry.

Here is the correct one.
[0001-Fix-multifile-drag-n-drop-on-win32.patch (text/plain, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 22 Sep 2024 09:51:01 GMT) Full text and rfc822 format available.

Notification sent to Cecilio Pardo <cpardo <at> imayhem.com>:
bug acknowledged by developer. (Sun, 22 Sep 2024 09:51:02 GMT) Full text and rfc822 format available.

Message #28 received at 73258-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Cecilio Pardo <cpardo <at> imayhem.com>
Cc: 73258-done <at> debbugs.gnu.org
Subject: Re: bug#73258: 31.0.50; w32 drag-n-dropping multiple files is broken
Date: Sun, 22 Sep 2024 12:49:31 +0300
> Date: Sat, 21 Sep 2024 15:41:03 +0200
> Cc: 73258 <at> debbugs.gnu.org
> From: Cecilio Pardo <cpardo <at> imayhem.com>
> 
> I messed up when preparing the patch file, I'm sorry.
> 
> Here is the correct one.

Thanks, installed on the master branch, and closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 20 Oct 2024 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 245 days ago.

Previous Next


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