From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: can't delete symlinks if point to non empty dir Date: Mon, 20 Mar 2006 09:11:06 -0700 Message-ID: References: <87d5gjcz0u.fsf@jidanni.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1142871186 18252 80.91.229.2 (20 Mar 2006 16:13:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 20 Mar 2006 16:13:06 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 20 17:13:03 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FLMzz-0005L9-5P for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Mar 2006 17:12:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FLMzy-0004pq-5N for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Mar 2006 11:12:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FLMzu-0004nW-LN for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2006 11:12:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FLMzr-0004kX-F5 for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2006 11:12:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FLMzr-0004k5-A1 for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2006 11:12:43 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FLN5R-0005Kf-Bm for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2006 11:18:29 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FLMzY-0005FJ-Ac for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2006 17:12:24 +0100 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Mar 2006 17:12:24 +0100 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 20 Mar 2006 17:12:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Lines: 39 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: <87d5gjcz0u.fsf@jidanni.org> 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:14973 Archived-At: Dan Jacobson wrote: > Gentlemen, > delete-file is an interactive built-in function. > (delete-file FILENAME) > Delete file named FILENAME. If it is a symlink, remove the symlink. > Well bad news. If it is a symlink to a non-empty directory, then I'm > afraid the user will have to call in real rm(1). > Already we see that "If it is a symlink, remove the symlink." doesn't > describe what is really happening: certainly wrongly checking > first about other things than being a symlink, as seen by the > Lisp error: (file-error "Removing old name: is a directory" "/tmp/w/etc") > > Go ahead, > ls -s some_non_empty_directory target, e.g., "ln -s /etc ." > Now try dired-flag-file-deletion, dired-do-flagged-delete (d,x) on it. > emacs-version"21.4.1" Confirmed, in GNU Emacs 21.4.1 (i386-pc-solaris2.8, X toolkit, Xaw3d scroll bars) of 2005-09-21 on daedal dired-delete-file correctly determines that /tmp/etc is a symbolic link to /etc, so it calls delete-file. But delete-file apparently gets confused and signals the error because /etc is a directory. > P.S.,(describe-function (quote car)) > car is a built-in function. > (car LIST) > Return the car of LIST. If arg is nil, return nil. > Error if arg is not nil and not a cons cell. See also `car-safe'. > > What a perfect place to say what "car" means, instead of the snide > recursive definition. Yes, there also is a lisp manual, still... There was a lengthy discussion about this recently, and if I remember correctly it was decided to leave it mostly alone. -- Kevin Rodgers