From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Jacobson Newsgroups: gmane.emacs.bugs Subject: can't delete symlinks if point to non empty dir Date: Sun, 19 Mar 2006 03:51:13 +0800 Message-ID: <87d5gjcz0u.fsf@jidanni.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1142717066 9228 80.91.229.2 (18 Mar 2006 21:24:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 18 Mar 2006 21:24:26 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 18 22:24:22 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 1FKiuM-0000HX-2V for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Mar 2006 22:24:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FKiuL-0005aH-H0 for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Mar 2006 16:24:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FKiuH-0005a3-7Z for bug-gnu-emacs@gnu.org; Sat, 18 Mar 2006 16:24:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FKiuG-0005Zo-1C for bug-gnu-emacs@gnu.org; Sat, 18 Mar 2006 16:24:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FKiuF-0005Zl-Nw for bug-gnu-emacs@gnu.org; Sat, 18 Mar 2006 16:24:15 -0500 Original-Received: from [204.74.68.40] (helo=frodo.hserus.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FKizR-0001pd-5a for bug-gnu-emacs@gnu.org; Sat, 18 Mar 2006 16:29:37 -0500 Original-Received: from tc218-187-24-167.dialup.dynamic.apol.com.tw ([218.187.24.167]:4927 helo=jidanni1) by frodo.hserus.net with esmtpsa (Cipher TLSv1:AES256-SHA:256) (Exim 4.60 #0) id 1FKiu6-000DWb-Cc by authid with plain for ; Sun, 19 Mar 2006 02:54:08 +0530 Original-To: bug-gnu-emacs@gnu.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:14968 Archived-At: 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" 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...