bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#1238: ido-write-file makes it easy to overwrite files unintentionall


From: Chong Yidong
Subject: bug#1238: ido-write-file makes it easy to overwrite files unintentionally
Date: Fri, 17 Dec 2010 18:56:21 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Ryan Twitchell <metatheorem@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]