emacs-devel
[Top][All Lists]
Advanced

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

RE: delete-file default to buffer-file-name if non-nil


From: Drew Adams
Subject: RE: delete-file default to buffer-file-name if non-nil
Date: Sun, 16 May 2010 13:20:56 -0700

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




reply via email to

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