Subject: RE: [External] : bug#60460: 30.0.50; [FR] avoid putting remote files to local trash

From: Drew Adams <[email-masked]>
Date: Sun, 1 Jan 2023 16:41:17 +0000

> In response to this, I want to propose a change to the logic under which
> trashing is performed rather than deletion.  However, I am not sure
> which one of my following two ideas is more appropriate.
> 
> 1. Allow the user to disable "moving to local trash" only for remote
> files....
> 2. Use a dedicated local trash directory for each remote, optionally
> behind a toggle.  

(Caveat: I'm not knowledgeable about sending
files to trash.)

I would have thought that we already have a way
for users to customize which files and dirs get
sent to trash.

Now I see that option `delete-by-moving-to-trash'
is just a simple nil/t Boolean, as opposed to
being nil (for don't trash) and non-nil for the
possibility of filtering.

Not trashing remote files is just one kind of
filtering.  And you say that you want to do that
in particular because some of your remote files
are large.  Filtering out large files (local or
remote) is another possibility (logically not
the same as filtering out remote files).

Users could have any number of criteria they
want to use, to filter inclusion/exclusion of
files to move to trash.

Why not use a mechanism similar to what we use
with `recentf.el'?  There, we have user option
`recentf-exclude'.  That lets you use multiple
regexps and predicates to specify the files
you want to exclude from inclusion in the list
of recent files.