[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Friendlier dired experience [CODE INCLUDED]
From: |
Michael Albinus |
Subject: |
Re: Friendlier dired experience [CODE INCLUDED] |
Date: |
Wed, 04 Nov 2020 20:57:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Boruch Baum <boruch_baum@gmx.com> writes:
Hi Boruch,
>> Since recently, remote files are trashed to the local trash can. Are you
>> able to restore them, if the trash can is derived from XDG spec?
>
> Oooh. Nice point. I never tested the software with tramp / smb / ssh.
> What the software does is respect the XDG metadata stored in the
> trash/info directory and performs a file move to the location identified
> by that metadata. The software is agnostic to the location, so if emacs
> requires any extra processing to reach the "remote", I don't know if the
> operation would succeed. It's reasonable to expect the file move to be
> handled at a 'level below' the dired function call and so succeed, but I
> don't know.
>
>> Test with recent master branch.
>
> I'm not set up for that just now. Can you try and report back?
When I'm working in a remote buffer, "diredc-trash-info" does not
work. This is because you call shell-command, which runs the command on
the remote host.
When I have trashed a file, say "/ssh:ford:/tmp/xxx", it appears as
"/home/albinus/.local/share/Trash/files/xxx", in the local trash can.
"/home/albinus/.local/share/Trash/info/xxx.trashinfo" contains the line
Path=/ssh%3aford%3a/tmp/xxx
as expected. However, "M-x diredc-trash-restore" returns with the error
dired-rename-file: Renaming: No such file or directory,
/home/albinus/.local/share/Trash/files/xxx, /ssh%3aford%3a/tmp/xxx
I believe you must unhexlify the path in the .trashinfo. This is not
only because of Tramp. A local file "/tmp/file with space", trashed via
"M-x move-file-to-trash", has the entry
Path=/tmp/file%20with%20space
Calling "M-x diredc-trash-restore" restores it to "/tmp/file%20with%20space".
Best regards, Michael.
- Re: Friendlier dired experience [CODE INCLUDED], (continued)
- Re: Friendlier dired experience [CODE INCLUDED], Stefan Kangas, 2020/11/03
- Re: Friendlier dired experience [CODE INCLUDED], Jean Louis, 2020/11/03
- Re: Friendlier dired experience [CODE INCLUDED], Boruch Baum, 2020/11/03
- Re: Friendlier dired experience [CODE INCLUDED], Michael Albinus, 2020/11/03
- Re: Friendlier dired experience [CODE INCLUDED], Boruch Baum, 2020/11/03
- Re: Friendlier dired experience [CODE INCLUDED], Jean Louis, 2020/11/03
- Re: Friendlier dired experience [CODE INCLUDED], Pankaj Jangid, 2020/11/04
- Re: Friendlier dired experience [CODE INCLUDED],
Michael Albinus <=
- Re: Friendlier dired experience [CODE INCLUDED], Yuri Khan, 2020/11/04
- Re: Friendlier dired experience [CODE INCLUDED], Michael Albinus, 2020/11/04
- Re: Friendlier dired experience [CODE INCLUDED], Boruch Baum, 2020/11/05
- Re: Friendlier dired experience [CODE INCLUDED], Eli Zaretskii, 2020/11/05
- Re: Friendlier dired experience [CODE INCLUDED], Jean Louis, 2020/11/05
- Re: Friendlier dired experience [CODE INCLUDED], Stefan Kangas, 2020/11/04
- Re: Friendlier dired experience [CODE INCLUDED], Boruch Baum, 2020/11/04
- Re: Friendlier dired experience [CODE INCLUDED], Stefan Kangas, 2020/11/05
- Re: Friendlier dired experience [CODE INCLUDED], Boruch Baum, 2020/11/06
Re: Friendlier dired experience [CODE INCLUDED], Stefan Monnier, 2020/11/04