From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "andreas.amann" Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#1238: 23.0.60; ido-write-file makes it easy to overwrite files unintentionally Date: Fri, 24 Oct 2008 11:53:00 +0100 Message-ID: <200810241053.m9OAr0P8026782@localhost.localdomain> Reply-To: "andreas.amann" , 1238@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1224855642 16284 80.91.229.12 (24 Oct 2008 13:40:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2008 13:40:42 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 24 15:41:39 2008 connect(): Connection refused 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.50) id 1KtMux-0007Zs-A5 for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Oct 2008 15:41:31 +0200 Original-Received: from localhost ([127.0.0.1]:48314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtMtr-00077T-GP for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Oct 2008 09:40:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KtKYS-0003oj-Rb for bug-gnu-emacs@gnu.org; Fri, 24 Oct 2008 07:10:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KtKYS-0003oV-8L for bug-gnu-emacs@gnu.org; Fri, 24 Oct 2008 07:10:08 -0400 Original-Received: from [199.232.76.173] (port=53500 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtKYR-0003oS-Ud for bug-gnu-emacs@gnu.org; Fri, 24 Oct 2008 07:10:07 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:44965) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KtKYR-0000JS-Ee for bug-gnu-emacs@gnu.org; Fri, 24 Oct 2008 07:10:07 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9OBA2pa003804; Fri, 24 Oct 2008 04:10:02 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9OB02IO000689; Fri, 24 Oct 2008 04:00:02 -0700 X-Loop: don@donarmstrong.com Resent-From: "andreas.amann" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 24 Oct 2008 11:00:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1238 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122484563031926 (code B ref -1); Fri, 24 Oct 2008 11:00:02 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 24 Oct 2008 10:53:50 +0000 Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9OArjsl031920 for ; Fri, 24 Oct 2008 03:53:47 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:37986 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KtKFx-0005ig-7s for emacs-pretest-bug@gnu.org; Fri, 24 Oct 2008 06:51:01 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KtKIX-0003AW-07 for emacs-pretest-bug@gnu.org; Fri, 24 Oct 2008 06:53:43 -0400 Original-Received: from nmrc.ucc.ie ([143.239.64.1]:51248) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KtKIW-00032W-H4 for emacs-pretest-bug@gnu.org; Fri, 24 Oct 2008 06:53:40 -0400 Original-Received: from unixmail.tyndall.ie (unixmail.tyndall.ie [10.1.64.22]) by nmrc.ucc.ie (Postfix) with ESMTP id 31BBCEF for ; Fri, 24 Oct 2008 11:54:23 +0100 (IST) Original-Received: from localhost (localhost [127.0.0.1]) by unixmail.tyndall.ie (Postfix) with ESMTP id 01FE54E8EC for ; Fri, 24 Oct 2008 11:53:15 +0100 (IST) X-Virus-Scanned: amavisd-new at tyndall.ie Original-Received: from unixmail.tyndall.ie ([127.0.0.1]) by localhost (unixmail.tyndall.ie [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KivLvIN4+XI7 for ; Fri, 24 Oct 2008 11:53:04 +0100 (IST) Original-Received: from localhost.localdomain (lnx0015f2465ec6.tyndall.ie [10.1.65.107]) by unixmail.tyndall.ie (Postfix) with ESMTP id 8C9384E8E4 for ; Fri, 24 Oct 2008 11:53:04 +0100 (IST) Original-Received: from localhost.localdomain (lnx0015f2465ec6 [127.0.0.1]) by localhost.localdomain (8.14.2/8.14.2) with ESMTP id m9OAr4IO026783 for ; Fri, 24 Oct 2008 11:53:04 +0100 X-detected-operating-system: by monty-python.gnu.org: Solaris 9 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 24 Oct 2008 07:10:08 -0400 X-Mailman-Approved-At: Fri, 24 Oct 2008 09:36:30 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:21865 gmane.emacs.pretest.bugs:23296 Archived-At: I am often using the C-x C-w shortcut to save a buffer into a different directory, usually without changing it's name. The standard write-file works well for this, since after selecting the appropriate directory, I simply hit return, and the file gets saved where I want it, without a change in the name by default. However, since I switched to ido-mode and ido-write-file I found that after navigating to a directory, which does not contain any subdirectories, the first filename in that directory gets selected as the filename, into which to write the contents of the active buffer. This has several times already caused me to overwrite a file with the current buffer by accident, since after selecting the appropriate directory, I was not noticing the selection and wrongly assumed that emacs would simply write the file into this directory with the old filename. After hitting return however the active buffer would be written into this first file of the directory. I know I can simply work around this by binding C-x C-w to write-file, but in my opinion, ido-write-file should be changed in a way which makes it more difficult to overwrite a file. I would expect that C-x C-w is used for more often to create a new file, than to overwrite an existing one. Therefore in my opinion the current behaviour of ido-write-file to select the first file in the directory only serves a minority of use-cases. In GNU Emacs 23.0.60.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars) of 2008-10-20 on lnx0015f2465ec6 Windowing system distributor `The X.Org Foundation', version 11.0.10300000 configured using `configure '--prefix=/home/aamann/local/emacs-cvs' 'LDFLAGS=-L/home/aamann/local/lib64' 'CPPFLAGS=-I/home/aamann/local/include'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_IE.utf8 value of $XMODIFIERS: @im=none locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x i d o - m o d C-x C-w C-g M-x w r i t e - f C-g M-x i d o - w r i C-g C-x C-w C-g C-h C-b C-h b C-x o C-s w r i t e C-x o M-x w e m e m a c s b b u g r e p o r Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Ido mode enabled Quit [4 times] Type C-x 1 to delete the help window, C-M-v to scroll help. Mark saved where search started Making completion list... [2 times]