From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: delete-file default to buffer-file-name if non-nil Date: Sun, 16 May 2010 13:20:56 -0700 Message-ID: References: <56210.128.165.0.81.1273948225.squirrel@webmail.lanl.gov> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274041271 7044 80.91.229.12 (16 May 2010 20:21:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 16 May 2010 20:21:11 +0000 (UTC) Cc: deniz.a.m.dogan@gmail.com, emacs-devel@gnu.org To: , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 16 22:21:07 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@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 1ODkKe-0003Og-Gi for ged-emacs-devel@m.gmane.org; Sun, 16 May 2010 22:21:04 +0200 Original-Received: from localhost ([127.0.0.1]:55564 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODkKd-0002fp-SH for ged-emacs-devel@m.gmane.org; Sun, 16 May 2010 16:21:03 -0400 Original-Received: from [140.186.70.92] (port=38123 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODkKX-0002fX-VK for emacs-devel@gnu.org; Sun, 16 May 2010 16:20:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODkKX-0000Mi-0S for emacs-devel@gnu.org; Sun, 16 May 2010 16:20:57 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:61398) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODkKS-0000Lg-HH; Sun, 16 May 2010 16:20:52 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o4GKKk7U025027 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 16 May 2010 20:20:48 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o4GK02JK016330; Sun, 16 May 2010 20:20:46 GMT Original-Received: from abhmt004.oracle.com by acsmt353.oracle.com with ESMTP id 268860461274041245; Sun, 16 May 2010 13:20:45 -0700 Original-Received: from dradamslap1 (/10.175.216.104) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 16 May 2010 13:20:45 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Acr1MvYgpQ1VTlRdT2ytkIn5dOxZOgAAVQ2A X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090206.4BF053A0.009B:SCFMA922111,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124829 Archived-At: > Doesn't it already do that? M-x delete-file RET does > attempt to delete the current buffer's file or its directory > if it has no file. Personally, I find this default sort of > dangerous, although at least C-x C-w often fixes it. > > It seems dangerous to me too. But it seems the most appropriate default value, in terms of what one might want to delete. Don't you think so? If it is also dangerous, then some reasonable way should be found to deal with the danger - as opposed to simply changing the default value. Two (alternative) solutions that come to mind: 1. Insert the default value in the minibuffer. This assumes that the greatest danger is hitting RET without seeing what the file to be deleted is. 2. Require confirmation if RET is hit with no file name in the minibuffer. Perhaps there are other, better alternatives. Of these two, I think #1 is preferable.