From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#28792: 26.0.60; Deleting to a custom trash directory in Dired gives error Date: Thu, 12 Oct 2017 13:02:31 +0000 Message-ID: References: <831sm8mskc.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114188aa5affaa055b5929eb" X-Trace: blaine.gmane.org 1507813470 28570 195.159.176.226 (12 Oct 2017 13:04:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 12 Oct 2017 13:04:30 +0000 (UTC) Cc: eggert@cs.ucla.edu, 28792@debbugs.gnu.org To: Eli Zaretskii , =?UTF-8?Q?G=C3=B6ktu=C4=9F?= Kayaalp Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 12 15:04:19 2017 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 1e2d9q-0005nu-4t for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Oct 2017 15:04:14 +0200 Original-Received: from localhost ([::1]:45407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2d9x-0008Si-BU for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Oct 2017 09:04:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2d9k-0008Qs-Fa for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2017 09:04:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2d9e-0002XV-Hz for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2017 09:04:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54554) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e2d9e-0002Wq-F6 for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2017 09:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e2d9e-0006nY-1W for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2017 09:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Oct 2017 13:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28792 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28792-submit@debbugs.gnu.org id=B28792.150781339626065 (code B ref 28792); Thu, 12 Oct 2017 13:04:01 +0000 Original-Received: (at 28792) by debbugs.gnu.org; 12 Oct 2017 13:03:16 +0000 Original-Received: from localhost ([127.0.0.1]:35002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2d8t-0006mL-LO for submit@debbugs.gnu.org; Thu, 12 Oct 2017 09:03:15 -0400 Original-Received: from mail-lf0-f41.google.com ([209.85.215.41]:52129) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2d8r-0006m1-IK for 28792@debbugs.gnu.org; Thu, 12 Oct 2017 09:03:13 -0400 Original-Received: by mail-lf0-f41.google.com with SMTP id r129so5857688lff.8 for <28792@debbugs.gnu.org>; Thu, 12 Oct 2017 06:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=L2Nwvx+KTJpD1gM4t6IjVUmAwYVxnKe/XWezI23HpSc=; b=ultJf/qGxC3nMnv1FPeg3mOrS6FzwN9FO/bPwic/pAb00TG8225zWnHaZ+RZOwSyMh 2PVDfa2AqxPBKcdMFd7cQ5myE20HwxzzpP/KLpATOU+AwYcNCckhakdsvSm2oqaNDILF VFMgGXWZQB9JJeE7ad5lmBx9SwsaYDR63az3Mkg2u5PyKLu8rR4hqN8xi5qcxBvsKbAQ R5gzNHGEacR8BL1iTnsY5/Let+FztTUqmAU/33U6zKrLinqBzVZrtrMkAm5v1AfQ9vQ7 FkLt5bx/peMFhuDHy1IqyYgSClFFXdfiIkA5CFxj6w+0F8quDpbXxJga94f3GGh8qsOh HxLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L2Nwvx+KTJpD1gM4t6IjVUmAwYVxnKe/XWezI23HpSc=; b=UfVn86ERS0QOKeDgdA95jWXLRnvfT+oZ8wX1L+uhAD/He2AdoloIv8469HFF6twWzN 7TLj154oLK6I+gBnfI1+vyJe3wu7hOpt+M65AqrfKY9lOeTFAJzMwPihZzfFocwXfhmN zhqWP3ODmzLN0SaKdJszs51I2NPumyihrrS7xgEptugS4KgQN4l5ZOr+lhF+rKg87XHF yA4dRPAVqTgVEoHBXV5zyyCFUjvld3ui1S5ze3LKyWr3Pwh4JWOfN7g6YLkzyxmykMZM DUHV/DRMSvHHxVeO9Zq2RhcbYUVG+/DbOxQU/4d1iXLuUrszWxYmTTlXxB2Ix3VcH2Jw 50ig== X-Gm-Message-State: AMCzsaUr6ut9wBXuDPZ7S5plUgTWvPDnjGsndWy06ovK4OMgMhCyhzUb IXPIwfzFtW92qOS63qprr/sr5Q163WMGJWg9sdE= X-Google-Smtp-Source: ABhQp+Qiz7Krk6j5Vim3rZFjeasRh+abc2gJZqfP373uwMqGhU2GddJgqPbMLTtGAN6VhOMEoZvLac528OgbfJdMzBk= X-Received: by 10.25.211.73 with SMTP id k70mr844426lfg.51.1507813387597; Thu, 12 Oct 2017 06:03:07 -0700 (PDT) In-Reply-To: <831sm8mskc.fsf@gnu.org> 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:138271 Archived-At: --001a114188aa5affaa055b5929eb Content-Type: text/plain; charset="UTF-8" On Thu, Oct 12, 2017 at 8:58 AM Eli Zaretskii wrote: > This use case raises an interesting question: what should be the > behavior of delete-by-moving-to-trash when the Trash directory already > includes a directory by the same name as the non-directory file being > deleted? Are files in the Trash directory generally unimportant > enough to disregard these situations, or does this use case run afoul > of the ability to restore the trashed files later? > The fact that the user deleted the files means that the files were not important. If the user deleted them by mistake, then the trash serves as a last-resort to restore the files from. Trash is not a "backup".. so unlike the Emacs backup, there shouldn't be a need to store multiple revisions of trash. IMO, if a file or a directory exists by the same name in trash, the move-file-to-trash should just overwrite that.. if a foo file already exists and a foo/ dir is being trashed, then just delete the old trashed foo file and replace with the newly trashed foo/ dir. -- Kaushal Modi --001a114188aa5affaa055b5929eb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Oct 12= , 2017 at 8:58 AM Eli Zaretskii <eliz@gn= u.org> wrote:
This use case = raises an interesting question: what should be the
behavior of delete-by-moving-to-trash when the Trash directory already
includes a directory by the same name as the non-directory file being
deleted?=C2=A0 Are files in the Trash directory generally unimportant
enough to disregard these situations, or does this use case run afoul
of the ability to restore the trashed files later?
The fact that the user deleted the files means that the files w= ere not important. If the user deleted them by mistake, then the trash serv= es as a last-resort to restore the files from. Trash is not a "backup&= quot;.. so unlike the Emacs backup, there shouldn't be a need to store = multiple revisions of trash.

IMO, if a file or a d= irectory exists by the same name in trash, the move-file-to-trash should ju= st overwrite that.. if a foo file already exists and a foo/ dir is being tr= ashed, then just delete the old trashed foo file and replace with the newly= trashed foo/ dir.
--

Kau= shal Modi

--001a114188aa5affaa055b5929eb--