[Top][All Lists]

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

Re: delete-file to trash

From: Chong Yidong
Subject: Re: delete-file to trash
Date: Sat, 22 May 2010 20:09:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> I still maintain a more suitable approach is to have delete-file not
>> move to trash bin unless explicitly called for. For example, it can be
>> implemented similarly to handle-shift-selection.
> I agree.  Instead of a `force' arg to opt-out, we should either use
> a new function for "move-to-trash" or use an opt-in arg like
> `move-to-trash'.

Yes, the situation is unsatisfactory.

It's now clear that the majority of calls to `delete-file' in Emacs need
the FORCE argument.  Even if we successfully audit all calls to
`delete-file' in our tree, third-party code will still be doing spurious
trashing.  This is probably more annoying to Emacs users than spurious

So, it seems better to flip the new FORCE argument to delete-file.  We
could change it to an argument ALLOW-TRASH, and change the doc of
delete-by-moving-to-trash to say that it will only take effect on calls
to `delete-file' that use the ALLOW-TRASH argument.  This is backward
incompatible but I don't see any better solution.

If we do this, I'd also like to turn the trash on by default, on systems
where there is a trash (i.e. on Windows, and on machines where a
Freedesktop trash is detected).

(It was probably a mistake to include the trashing feature, the first
time, without turning it on by default.  If we'd done that, the problems
would have been clarified much more quickly, and we could have figured
out something more appropriate.)

reply via email to

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