From: Jean Louis <bugs@gnu.support>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Michael Albinus <michael.albinus@gmx.de>, 44217@debbugs.gnu.org
Subject: bug#44217: bug#44216: 28.0.50; Incorret during delete in Tramp: Trashing...done
Date: Mon, 26 Oct 2020 14:51:48 +0300 [thread overview]
Message-ID: <X5a4VG4mqSufEEX9@protected.rcdrun.com> (raw)
In-Reply-To: <87eell2q96.fsf@gnus.org>
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 <larsi@gnus.org> [2020-10-26 14:15]:
> 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.
--
Jean Louis
next prev parent reply other threads:[~2020-10-26 11:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-25 19:38 bug#44217: 28.0.50; Incorret during delete in Tramp: Trashing...done Jean Louis
2020-10-26 11:14 ` bug#44217: bug#44216: " Lars Ingebrigtsen
2020-10-26 11:51 ` Jean Louis [this message]
2020-10-26 16:56 ` Michael Albinus
2020-10-26 17:01 ` Eli Zaretskii
2020-10-26 13:11 ` Michael Albinus
2020-10-26 13:17 ` Lars Ingebrigtsen
2020-10-26 15:35 ` Michael Albinus
2020-10-27 7:42 ` Lars Ingebrigtsen
2020-10-27 15:32 ` Michael Albinus
2020-10-27 17:17 ` Jean Louis
2020-10-27 20:12 ` Michael Albinus
2020-10-28 10:54 ` Jean Louis
2020-11-01 11:59 ` Michael Albinus
2020-11-01 12:36 ` Jean Louis
2020-11-01 13:03 ` bug#44217: " Michael Albinus
2020-11-01 13:33 ` Jean Louis
2020-11-01 14:48 ` Michael Albinus
2020-10-27 17:42 ` bug#44217: (no subject) Lars Ingebrigtsen
2020-10-27 20:20 ` bug#44217: none Michael Albinus
2020-10-28 9:27 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=X5a4VG4mqSufEEX9@protected.rcdrun.com \
--to=bugs@gnu.support \
--cc=44217@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=michael.albinus@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.