Subject: bug#44217: none

From: Michael Albinus <[email-masked]>
Date: Tue, 27 Oct 2020 21:20:32 +0100

Lars Ingebrigtsen <[email-masked]> writes:

>> However, in "~/.local/share/Trash/info/aaa.trashinfo" there is
>>
>> Path=/ssh%3aford%3a/tmp/aaa
>>
>> This will be unexpected, at least for tools which try to restore trashed
>> files.
>
> Yes, perhaps the .trashinfo file shouldn't be created in these
> instances...

It is created according to the XDG spec. We shouldn't fail to do it. And
maybe, Emacs will add an own trash recovery function, which would be
able to handle such remote paths?

>> However, perhaps Tramp shall call move-file-to-trash when deleting
>> remote files, argument TRASH and variable delete-by-moving-to-trash are
>> non-nil? Instead of calling the remote trash command?
>
> Yes, I think that would make sense.
>
> But if trash-directory is nil, and there is a remote trash command...
> perhaps Tramp should call the remote trash command anyway?  (Many
> permutations of possibly correct behaviour here.  :-/)

We must be consistent. A remote trash command will move the file to the
remote trash can. Tramp, using move-file-to-trash, will move the file to
the local trash can. A user couldn't know, whether a trash can for a
remote file will be located locally or remotely. So we shall use either
a remote or a local trash can, and not mixed.

The local trash can can be used always. The remote trash can can be used
only, when the remote system offers the "trash" command. This doesn't
happen by default.

Best regards, Michael.