From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, Glenn Morris <rgm@gnu.org>
Cc: 33336@debbugs.gnu.org
Subject: bug#33336: 26; Document how to restore trashed files
Date: Sun, 11 Nov 2018 08:47:28 -0800 (PST) [thread overview]
Message-ID: <ef62bc42-6bda-4bba-9642-350fd4115490@default> (raw)
In-Reply-To: <<83pnvc9thl.fsf@gnu.org>>
> > > This is a system facility, Emacs just uses it. Restoring files
> from
> > > there is something specific to each system, and is not for Emacs to
> > > provide or document.
> >
> > I don't see how moving something out of trash is different to moving
> it
> > in this regard.
>
> Where trash is just another directory, you are right. But that's just
> one variety.
>
> > On GNU systems, the only relevant mechanism is the freedesktop trash
> > spec that move-file-to-trash implements. It looks like it would be
> > straightforward for someone who wanted to to write a
> > move-file-from-trash that restores files according to the trashinfo
> > file, and this could be hooked into dired.
>
> This won't work on MS-Windows, where trash is a special directory, and
> restoring files from there is a special operation, not just moving a
> file.
I addressed this possibility at the outset:
I can understand that if files are trashed to the system
recycle bin then perhaps Emacs cannot help users much in
telling them how to restore trashed files (or can it?).
The bug report asks that we do what we can to help users
in the cases where we can.
But if `trash-directory' is non-nil then can't (and shouldn't)
Emacs tell users how to restore files trashed there?
Presumably (?) `trash-directory' is "just another directory".
That's the case (at least) where I was thinking that Emacs
should be able to help. I was thinking that in this case, at
least, restoring a file from there should be "just moving a file".
But this would presumably require recording the original
directory, to where each file should be restored (by default).
And the "restoring" code would need to, e.g., prompt the user
for some alternative directory if the recorded directory no
longer existed.
The Emacs doc for this can make clear that Emacs may not
be able to help in some cases where the system trash bin
is used, and in such cases users should consult their
system doc for how to restore a file.
To repeat the last line of the bug report:
In sum, is there something that Emacs can offer users,
^^^^^^^^^
in terms of helping them restore trashed files?
next prev parent reply other threads:[~2018-11-11 16:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-10 19:31 bug#33336: 26; Document how to restore trashed files Drew Adams
2018-11-10 20:00 ` Eli Zaretskii
2018-11-10 21:26 ` Glenn Morris
2018-11-11 3:35 ` Eli Zaretskii
2018-11-11 15:28 ` Eli Zaretskii
[not found] ` <<83o9avab16.fsf@gnu.org>
2018-11-11 16:52 ` Drew Adams
2018-11-11 17:22 ` Eli Zaretskii
[not found] ` <<pzr2fs39qo.fsf@fencepost.gnu.org>
[not found] ` <<83pnvc9thl.fsf@gnu.org>
2018-11-11 16:47 ` Drew Adams [this message]
2018-11-11 17:24 ` Eli Zaretskii
2019-10-12 21:26 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef62bc42-6bda-4bba-9642-350fd4115490@default \
--to=drew.adams@oracle.com \
--cc=33336@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=rgm@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).