* can't delete symlinks if point to non empty dir
@ 2006-03-18 19:51 Dan Jacobson
2006-03-20 16:11 ` Kevin Rodgers
0 siblings, 1 reply; 2+ messages in thread
From: Dan Jacobson @ 2006-03-18 19:51 UTC (permalink / raw)
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...
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: can't delete symlinks if point to non empty dir
2006-03-18 19:51 can't delete symlinks if point to non empty dir Dan Jacobson
@ 2006-03-20 16:11 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2006-03-20 16:11 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-20 16:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-18 19:51 can't delete symlinks if point to non empty dir Dan Jacobson
2006-03-20 16:11 ` Kevin Rodgers
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.