From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis 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:51:48 +0300 Organization: GNU.Support Message-ID: References: <86mu0ayu2b.fsf@protected.rcdrun.com> <87eell2q96.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13601"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/+ (1036f0e) (2020-10-18) Cc: Michael Albinus , 44217@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 26 16:50:11 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 1kX4l9-0003QG-P8 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Oct 2020 16:50:11 +0100 Original-Received: from localhost ([::1]:33396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX4l8-00068P-67 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Oct 2020 11:50:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX4k2-0004gU-PA for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 11:49:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57600) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kX4k2-0003ar-Aa for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 11:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kX4k2-0008Om-9d for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 11:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jean Louis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Oct 2020 15:49:02 +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.160372729332202 (code B ref 44217); Mon, 26 Oct 2020 15:49:02 +0000 Original-Received: (at 44217) by debbugs.gnu.org; 26 Oct 2020 15:48:13 +0000 Original-Received: from localhost ([127.0.0.1]:40907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX4jB-0008NF-Jd for submit@debbugs.gnu.org; Mon, 26 Oct 2020 11:48:13 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:53095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX4j9-0008Mz-CK for 44217@debbugs.gnu.org; Mon, 26 Oct 2020 11:48:08 -0400 Original-Received: from localhost ([::ffff:197.157.0.60]) (AUTH: PLAIN securesender, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001214D.000000005F96EFB5.00007DF3; Mon, 26 Oct 2020 08:48:04 -0700 Content-Disposition: inline In-Reply-To: <87eell2q96.fsf@gnus.org> 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:191591 Archived-At: That is great if the Tramp is looking for remote `trash' command, as there is software `trash-cli' it is named `trash' and it is compatible with GNU rm. It is convenient. That feature is not using the specified variable, so it is using Freedesktop.org specified Trash location, at first invokation it was ~/.local/share/Trash and it may be configured. In that case, when trash-directory variable is configured that is separate from remote Trash and from Freedesktop.org and I rather prefer specifying the trash directory myself. The description of this variable is vague as I cannot know is it in the context of Freedesktop.org "system's trash", as now the remote `trash' command is actually using such, though users could have remote trash command to use anything; or is it in the context of being configured through Emacs Hide Delete By Moving To Trash: Toggle on (non-nil) State : SAVED and set. Specifies whether to use the system’s trash can. Hide When non-nil, certain file deletion commands use the function ‘move-file-to-trash’ instead of deleting files outright. This includes interactive calls to ‘delete-file’ and ‘delete-directory’ and the Dired deletion commands. Groups: Auto Save As then this settings clarify the first description. Hide Trash Directory: Value Menu Directory: /home/data1/protected/tmp/Trash/ State : SAVED and set. Directory for ‘move-file-to-trash’ to move files and directories to. More Groups: Auto Save In my opinion "system's trash" should be clarified. So far I understand how it is now, it is Emacs's system's trash, it is not OS system's trash as variable is set via Emacs. * Lars Ingebrigtsen [2020-10-26 14:15]: > Jean Louis 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. -- Jean Louis