bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

can't delete symlinks if point to non empty dir


From: Dan Jacobson
Subject: can't delete symlinks if point to non empty dir
Date: Sun, 19 Mar 2006 03:51:13 +0800

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...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]