From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#33336: 26; Document how to restore trashed files Date: Sun, 11 Nov 2018 08:47:28 -0800 (PST) Message-ID: References: <<38efc245-0b99-483a-9f3a-01e89c822eca@default> <83tvkoaejz.fsf@gnu.org>> <> <<83pnvc9thl.fsf@gnu.org>> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1541954773 12012 195.159.176.226 (11 Nov 2018 16:46:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2018 16:46:13 +0000 (UTC) Cc: 33336@debbugs.gnu.org To: Eli Zaretskii , Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 11 17:46:08 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLssB-0002xh-JW for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Nov 2018 17:46:07 +0100 Original-Received: from localhost ([::1]:42889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLsuI-0002Ku-6q for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Nov 2018 11:48:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLsu5-0002Am-Od for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2018 11:48:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLsu2-0005y6-H0 for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2018 11:48:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42373) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gLsu2-0005xv-BG for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2018 11:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gLsu2-0004oe-9B for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2018 11:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Nov 2018 16:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33336 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33336-submit@debbugs.gnu.org id=B33336.154195485918472 (code B ref 33336); Sun, 11 Nov 2018 16:48:02 +0000 Original-Received: (at 33336) by debbugs.gnu.org; 11 Nov 2018 16:47:39 +0000 Original-Received: from localhost ([127.0.0.1]:46630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLste-0004ns-VM for submit@debbugs.gnu.org; Sun, 11 Nov 2018 11:47:39 -0500 Original-Received: from userp2130.oracle.com ([156.151.31.86]:40890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gLstc-0004ne-Tf for 33336@debbugs.gnu.org; Sun, 11 Nov 2018 11:47:38 -0500 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wABGhqo2090391; Sun, 11 Nov 2018 16:47:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=1DLxDw42WqdThWMtBTffk85Iyd+4eWuCFHBM8efYdlE=; b=Dgs1Vo2p+6Cg6GdXHCc2jrnKe9K4VJnAs9LDepGRpiaDZljje4cN/tJUIu7wsB+v6VXq MujQVIq1z9uFvIaP7UkihQiWrOq9OUc2+FIkuQmG13Mo/pjgM7puO+cz/28dvFklnq38 lw8aCEluEMcRz421BsdVTthZv4L3RWNdE+y8cN0qE+SQYuyUCmxD0HgJ4Y+vo4bpyb/K 6AzOh1eEcmsdOdnV4o86A6uyMVV1bjE1blbcNOZZBE80AEbkMMXdwB7sy2Ayie7N4lhY LJy0aRf4OZv2wwUMwnDoDBMc1c8MevFEDAIyAHVQNUAU7HfU4CN3aiRQOOjerFEdmfug /g== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2nnwg127qm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 11 Nov 2018 16:47:30 +0000 Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wABGlTnf023237 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 11 Nov 2018 16:47:30 GMT Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wABGlTZ7024344; Sun, 11 Nov 2018 16:47:29 GMT In-Reply-To: <<83pnvc9thl.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4756.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9074 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811110159 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:152300 Archived-At: > > > 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. >=20 > Where trash is just another directory, you are right. But that's just > one variety. >=20 > > 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. >=20 > 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.=20 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?