From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#44217: bug#44216: 28.0.50; Incorret during delete in Tramp: Trashing...done Date: Mon, 26 Oct 2020 14:11:27 +0100 Message-ID: <87imaxuo74.fsf@gmx.de> References: <86mu0ayu2b.fsf@protected.rcdrun.com> <87eell2q96.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1498"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 44217@debbugs.gnu.org, Jean Louis To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 26 14:13:37 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kX2Jd-0000HH-Ek for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Oct 2020 14:13:37 +0100 Original-Received: from localhost ([::1]:40572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX2Jb-000765-GA for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Oct 2020 09:13:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX2J4-00075e-Eb for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 09:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55534) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kX2J4-0004Jl-4r for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 09:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kX2J4-0008B1-0U for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 09:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Oct 2020 13:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44217 X-GNU-PR-Package: emacs Original-Received: via spool by 44217-submit@debbugs.gnu.org id=B44217.160371792731348 (code B ref 44217); Mon, 26 Oct 2020 13:13:01 +0000 Original-Received: (at 44217) by debbugs.gnu.org; 26 Oct 2020 13:12:07 +0000 Original-Received: from localhost ([127.0.0.1]:38842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX2IA-00089Y-Mm for submit@debbugs.gnu.org; Mon, 26 Oct 2020 09:12:06 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:34099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX2I9-000892-L5 for 44217@debbugs.gnu.org; Mon, 26 Oct 2020 09:12:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1603717888; bh=LQ7f2IxEIu6MrezcQBPj/Bw7W6jBYybdfc+vD44oi2g=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=NoDiz4OWN5EB9f6OjZtIZ4EF1QkDTNmiq7r6/ulqIZ+bPdtY2XesdVtMWK7TUZJmI NdYRFyKzSqzFgolSP/DCN1XTTdC1c5QIedYHTqdij27n13nhnD5PhCfVot84O+/Pdf Rby48Kb4IiZhovjogZ2f+KQXBKRg2SweeST/14lY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([212.86.54.197]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M3lYB-1kWl2B224J-000wIp; Mon, 26 Oct 2020 14:11:28 +0100 In-Reply-To: <87eell2q96.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 26 Oct 2020 12:14:29 +0100") X-Provags-ID: V03:K1:TEZiRIsuGbqiyXfLdrlxWyg3bjSnJR/yt3/HR23jk51YYKH62Qk uNxT/tnKG3gJWt53aisbAzaE9tzVNUWLpky2yDe0hYRtvmrp6cpDCi9sW84977zZXuMbrRg fvZBG39L1rwt16MI8UNeepEohOgpkvXuX3cgV1ot7iuQEoTaHML8QhUKnqLBFQhCNHyy0fR twe1WvzbQ1sEzC8gsGwDg== X-UI-Out-Filterresults: notjunk:1;V03:K0:ipbN/UEsjMw=:zRxRyEI6rVoY3xxNlvklTY RaHomxNsLHQ5jQiJwa7+26vTjB7XHqJUorNgm/vMp1rqVO9PHNHM4t7feNaFgKcho6hgrOIaY 8PZ9D/VPj77g6F2HYrMSqzcfzadXzkJ5a6AqKeEyu0JsgibuQwIQoOi9ZCSpkqZ0rJ20pjcdP j9NGQHQAcK1diuC0c/sAlIxqA/e35LqyOrFq6wNT19o03+U3waVButB96xTinFSHs4WPtU2H8 XYj7QXF5nk/bcPlvwP64FElpHGxmm73Dd+YkY1waceOr825k1cAp5bONpT21YfvtWTcj0OLxE sGSk5jmRa7RYT4nJaD7+0jntRfKFJgmgiDkSDgZCm91vbeYRw1yKmn9zvZKfy1ExdhSLSbM6d UsNSVjiy6bUEyn0XJvGvG0CTLLqX9/rQxCpX/+BeeMrd7oS0Zbbm0whRtgGsN94JsDfHflLZJ 2Bu9JtEJC9LGnfLYdCXYndEC/9h7Ki7qDefjFrBxAsv+gHDErlNQqzVVfYb9zWO4R0KRU/oz5 1y1uaV5Q2W7+NpVOhv1GFWhsqH9cRUW0IJTDW/zVSnULSRKHmITTA58EFS7VAiuSpiS78AeVC Axwm9UBqST6dN9gYb3vTfEGqNYXAemnUp7xc32Iu7/Jke/Iy5Ge4cDoes4pTU68ELj59k/5TZ vzKWFFHyfXBAi+LNFSJfom5EUveU6H5SHKCMqlPM101y7tnhP4cSDIwrRJdH2H7wu9YLhfiVs ubkwbFhCIZmu+u0Lug27dW6kfxjSZ7h7apJOfCGFKcoOEFtWwgpqOXE0HFgT9cMRWiD0Un3W X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:191574 Archived-At: Lars Ingebrigtsen writes: Hi Lars, >> 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. The message "Trashing...done" comes from dired, just because of the rguments it calls delete-file with. This has nothing to do with what Tramp does. > 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. How did you delete the file? You must give the optional argument TRASH a non-nil value, as in (delete-file "/ssh:other-host:/tmp/file" t) > 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. Yep. Btw, the "trash" command is part of the trash-cli package, which exists for example for Ubuntu and Fedora. > Shouldn't Tramp then move the file to `trash-directory' instead of > giving up and just deleting the file? Why that? `trash-directory' is defined as target for `move_file_to_trash'; it has nothing to do with deleting of remote files. And it would be a security flaw, if remote files would be moved to the local "~/Trash" directory. > If this is working as designed, it should at least be mentioned in the > doc string(s) and the manual. I believe it is mentioned. See the docstrings of `trash-directory' and `move-file-to-trash'. Well, the latter might explicitly state that it is not intended for remote files, but this is another game. Best regards, Michael.