bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#44217: bug#44216: 28.0.50; Incorret during delete in Tramp: Trashing


From: Lars Ingebrigtsen
Subject: bug#44217: bug#44216: 28.0.50; Incorret during delete in Tramp: Trashing...done
Date: Mon, 26 Oct 2020 12:14:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jean Louis <bugs@gnu.support> writes:

> I have the variable trash-directory set and files go to ~/tmp/Trash
>
> During Tramp ssh://example.com:~/ session I have delete a file and I can
> see the message: Trashing...done which should not be during Tramp
> session, as it gave me impression that file will be now transferred in
> background to my local Trash directory which not the case. Not that I
> have seen the file in Trash.

Please try to give more detailed bug reports with recipes starting from
"emacs -Q".

I reproduced this bug by setting:

(setq delete-by-moving-to-trash t
      trash-directory "~/Trash/")

and then going to "/ssh:other-host:/tmp/" and deleting a file.  As you
say, the file isn't moved to ~/Trash.

This is because:

(defun tramp-get-remote-trash (vec)
  "Determine remote `trash' command.
This command is returned only if `delete-by-moving-to-trash' is non-nil."
  (and delete-by-moving-to-trash
       (with-tramp-connection-property vec "trash"
         (tramp-message vec 5 "Finding a suitable `trash' command")
         (tramp-find-executable vec "trash" (tramp-get-remote-path vec)))))

Tramp is looking for an executable on the remote host called "trash"?
Which doesn't exist.

Shouldn't Tramp then move the file to `trash-directory' instead of
giving up and just deleting the file?

If this is working as designed, it should at least be mentioned in the
doc string(s) and the manual.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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