Subject: bug#394 closed by Stefan Monnier <[email-masked]> (Re: bug#394: wdired-change-to-wdired-mode can cause file deletion)

From: [email-masked] (Emacs bug Tracking System)

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#394: wdired-change-to-wdired-mode can cause file deletion

It has been closed by Stefan Monnier <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Stefan Monnier <[email-masked]> by
replying to this email.

-- 
394: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=394
Emacs Bug Tracking System
Contact [email-masked] with problems
>From [email-masked] Sat Jun 14 10:02:04 2008
From: Stefan Monnier <[email-masked]>
To: [email-masked]
Subject: Re: bug#394: wdired-change-to-wdired-mode can cause file deletion
Date: Sat, 14 Jun 2008 13:01:52 -0400

> In dired, do M-x wdired-change-to-wdired-mode.
> Then, swap 2 files's names.
> Emacs will ask if the first file should be overwritten. If answer yes, it'll
> be deleted, and it wont be renamed. i.e. you lose a file.

Indeed, dired's rename is a "parallel" rename, whereas our underlying
C primitives only offer sequential renaming, so we need to de more work
to handle those cases.

I've installed a patch into the CVS trunk which should fix it (or at
least catch the problem before it's too late).

        Stefan

>From [email-masked] Thu Jun 12 01:39:47 2008
To: [email-masked]
From: xah lee <[email-masked]>
Subject: wdired-change-to-wdired-mode can cause file deletion
Date: Thu, 12 Jun 2008 01:39:07 -0700

In dired, do M-x wdired-change-to-wdired-mode.

Then, swap 2 files's names.

Emacs will ask if the first file should be overwritten. If answer =20
yes, it'll be deleted, and it wont be renamed. i.e. you lose a file.

This can be reproduced if you created 2 files, one named A and other =20
B. Then renamed them to B and A. (Possibly you will need to create 3 =20
files and rename in particular cycle depending on how emacs choose =20
the order to rename... The key is to get emacs to prompte for the =20
overwrite of a file that should be renamed to something else later.)

This behavior is slightly unexpected and caused me to retrieve from =20
my backup disk. (the files are images and never edited, so it isn't =20
in emacs's backup)

   Xah
=E2=88=91 http://xahlee.org/

=E2=98=84