GNU bug report logs - #1238
23.0.60; ido-write-file makes it easy to overwrite files unintentionally

Previous Next

Package: emacs;

Reported by: "andreas.amann" <andreas.amann <at> tyndall.ie>

Date: Fri, 24 Oct 2008 11:00:02 UTC

Severity: wishlist

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Ryan Twitchell <metatheorem <at> gmail.com>
Cc: 1238 <at> debbugs.gnu.org, "andreas.amann" <andreas.amann <at> tyndall.ie>
Subject: Re: bug#1238: ido-write-file makes it easy to overwrite files
	unintentionally
Date: Fri, 17 Dec 2010 18:56:21 +0800
Ryan Twitchell <metatheorem <at> gmail.com> writes:

> I encountered this problem independently in version 23.2.1, and think
> I have a very simple fix.
>
> As a drop in replacement for write-file, ido-write-file does not
> prompt the user for confirmation when overwriting an existing file:
>
> The function ido-file-internal uses plain old write-file to carry out
> this action:
>
> ido functions are primarily for interactive use, so it seems safe to
> pass a true value to write-file's CONFIRM arg (on the last line above)
> to always enable prompting:
>
> (write-file filename t)
>
> A quick test confirmed this change added the expected behavior.

Sounds reasonable.  I've committed a fix following your suggestion;
thanks.




This bug report was last modified 14 years and 164 days ago.

Previous Next


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