[Top][All Lists]

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

Re: delete-file to trash

From: Leo
Subject: Re: delete-file to trash
Date: Sun, 23 May 2010 09:57:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

On 2010-05-23 03:16 +0100, Chong Yidong wrote:
> Stefan Monnier <address@hidden> writes:
>> PS: And yes, for interactive calls to delete-file, the `allow-trash'
>> should be non-nil, I think.
> Yeah, but omitted means nil.  Hmm.

If the interactive-form is like the following:

 (interactive (list (read-file-name "Delete file: " nil default-directory
     (confirm-nonexistent-file-or-buffer)) 'allow-trash))

it is not omitted and the doc-string can say when called interactively
it always respects delete-by-moving-to-trash. Then

> Here's an idea: allow the variable `delete-by-moving-to-trash' to be a
> list of values of `this-command', for which to trash instead of
> delete. Then we could set the default value of this list to be
> `delete-file', `dired-do-flagged-delete', etc.

we can avoid maintaining a list of commands and make
delete-by-moving-to-trash a much easier to customise option since it
requires less information to customise. It looks to me delete-file is
almost exclusively used non-interactively.


reply via email to

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