From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#1238: ido-write-file makes it easy to overwrite files unintentionally Date: Fri, 17 Dec 2010 18:56:21 +0800 Message-ID: <87oc8k3bxm.fsf@stupidchicken.com> References: <200810241053.m9OAr0P8026782@localhost.localdomain> <4CDEA766.50302@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1292585007 17212 80.91.229.12 (17 Dec 2010 11:23:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 17 Dec 2010 11:23:27 +0000 (UTC) Cc: 1238@debbugs.gnu.org, "andreas.amann" To: Ryan Twitchell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 17 12:23:23 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PTYPA-0001rl-H9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Dec 2010 12:23:20 +0100 Original-Received: from localhost ([127.0.0.1]:42393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTYP9-00061r-Q9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Dec 2010 06:23:19 -0500 Original-Received: from [140.186.70.92] (port=43375 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTYOh-0005mJ-HK for bug-gnu-emacs@gnu.org; Fri, 17 Dec 2010 06:22:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTYOf-0006RH-Tl for bug-gnu-emacs@gnu.org; Fri, 17 Dec 2010 06:22:51 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTYOf-0006RB-S5 for bug-gnu-emacs@gnu.org; Fri, 17 Dec 2010 06:22:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PTXtu-0005aL-65; Fri, 17 Dec 2010 05:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Dec 2010 10:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1238 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 1238-submit@debbugs.gnu.org id=B1238.129258300921393 (code B ref 1238); Fri, 17 Dec 2010 10:51:02 +0000 Original-Received: (at 1238) by debbugs.gnu.org; 17 Dec 2010 10:50:09 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PTXt3-0005Z0-Eo for submit@debbugs.gnu.org; Fri, 17 Dec 2010 05:50:09 -0500 Original-Received: from vm-emlprdomr-03.its.yale.edu ([130.132.50.144]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PTXt1-0005Yc-72 for 1238@debbugs.gnu.org; Fri, 17 Dec 2010 05:50:07 -0500 Original-Received: from furball (bb121-6-218-24.singnet.com.sg [121.6.218.24]) (authenticated bits=0) by vm-emlprdomr-03.its.yale.edu (8.14.4/8.14.4) with ESMTP id oBHAuOJO008274 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 17 Dec 2010 05:56:27 -0500 Original-Received: by furball (Postfix, from userid 1000) id F3166161F11; Fri, 17 Dec 2010 05:56:21 -0500 (EST) In-Reply-To: <4CDEA766.50302@gmail.com> (Ryan Twitchell's message of "Sat, 13 Nov 2010 09:57:42 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.144 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 17 Dec 2010 05:51:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:42578 Archived-At: Ryan Twitchell 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.