[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33336: 26; Document how to restore trashed files

From: Drew Adams
Subject: bug#33336: 26; Document how to restore trashed files
Date: Sun, 11 Nov 2018 08:47:28 -0800 (PST)

> > > 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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]