GNU bug report logs - #47960
28.0.50; delete-by-moving-to-trash fails on directories?

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Protesilaos Stavrou <info@HIDDEN>; Keywords: patch; dated Thu, 22 Apr 2021 20:49:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) patch. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 47960 <at> debbugs.gnu.org:


Received: (at 47960) by debbugs.gnu.org; 23 Apr 2021 20:39:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 23 16:39:24 2021
Received: from localhost ([127.0.0.1]:39011 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1la2aC-0007qa-F1
	for submit <at> debbugs.gnu.org; Fri, 23 Apr 2021 16:39:24 -0400
Received: from heytings.org ([95.142.160.155]:50588)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1la2a9-0007qR-Vz
 for 47960 <at> debbugs.gnu.org; Fri, 23 Apr 2021 16:39:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1619210360;
 bh=Fsu3A19ZaxUTm5JyhPGwhH85tAolTJqITRKj2c5CF44=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=aANI0sgC0doORcAAPIJpONFHruADHigPg61Qug1aNyrCe4n9ofvG2AJ8sgTWtBexw
 sDGGEBP+l7I6Oj6vKmEIP0Lg2wQ6K5JMdQxu6FCj0UnjUNI5lOzwMRIB8Ook/RKf/z
 B6frlIQvfvyqy0VVRe7l7s5Ou+yn8GyQU4vpWNS+lDVdByMRouVTm023SwESYQdCQe
 MCxtFpVW/kt7ZFfGdDy2q5kGI8w5XOOZmsG5k/u+MIpohTtbAUKuu0aAkAGwgt2hN9
 ziE/DGY9/GE129oVctk64HnlI9zGn03ImxyHDAFIBV8LHlSCVMYvb01JKedEMD7JkS
 n6wHdPYyyjosQ==
Date: Fri, 23 Apr 2021 20:39:20 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Protesilaos Stavrou <info@HIDDEN>
Subject: Re: bug#47960: 28.0.50; delete-by-moving-to-trash fails on
 directories?
In-Reply-To: <87bla66lp3.fsf@HIDDEN>
Message-ID: <f2b9666c4a1c2c17c5f8@HIDDEN>
References: <87mttq6o6n.fsf@HIDDEN>
 <a87041afcbd886b5e3a1@HIDDEN> <87bla66lp3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="bh71MWLj8f"
Content-ID: <f2b9666c4abc7b0ac45d@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47960
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 47960 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--bh71MWLj8f
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-ID: <f2b9666c4a6ae4323712@HIDDEN>


>
> What seems to be the issue is when a deleted entry of the same name 
> already exists.  I emptied my trash and tried the above recipe: the 
> problem would not occur.  But upon immediate retry the problem appeared, 
> presumably because "test" already existed in the trash.
>

Indeed, this path of the code was recently changed (commit a5197e2240), 
and indeed, when a directory with the same name is trashed twice, it 
fails.  Patch attached.

(It can't be applied yet, I'm still waiting for the end of my paperwork.)
--bh71MWLj8f
Content-Type: text/x-diff; name=Fix-bug-when-moving-directories-to-trash.patch; charset=us-ascii
Content-Transfer-Encoding: base64
Content-ID: <f2b9666c4a0f6ea14e32@HIDDEN>
Content-Description: 
Content-Disposition: attachment; filename=Fix-bug-when-moving-directories-to-trash.patch

RnJvbSA2OGRlY2U4YzgxMDQ1YWFkOGM1ODk3NzdhN2RjNjZhN2UzOGU2Mzg1
IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0
aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBGcmksIDIzIEFw
ciAyMDIxIDIwOjMyOjAyICswMDAwDQpTdWJqZWN0OiBbUEFUQ0hdIEZpeCBi
dWcgd2hlbiBtb3ZpbmcgZGlyZWN0b3JpZXMgdG8gdHJhc2gNCg0KKiBsaXNw
L2ZpbGVzLmVsIChtb3ZlLWZpbGUtdG8tdHJhc2gpOiBQYXNzIHRoZSBjb3Jy
ZWN0IGRpci1mbGFnIHRvDQptYWtlLXRlbXAtZmlsZSBzbyB0aGF0IGEgZGly
ZWN0b3J5IGlzIGNyZWF0ZWQgd2hlbiBhIGRpcmVjdG9yeSBpcw0KYmVpbmcg
dHJhc2hlZCAoQnVnIzQ3OTYwKS4NCi0tLQ0KIGxpc3AvZmlsZXMuZWwgfCA0
ICsrKy0NCiAxIGZpbGUgY2hhbmdlZCwgMyBpbnNlcnRpb25zKCspLCAxIGRl
bGV0aW9uKC0pDQoNCmRpZmYgLS1naXQgYS9saXNwL2ZpbGVzLmVsIGIvbGlz
cC9maWxlcy5lbA0KaW5kZXggNzQ0MGMxMWEyMS4uMjcyODJmMDlmYyAxMDA2
NDQNCi0tLSBhL2xpc3AvZmlsZXMuZWwNCisrKyBiL2xpc3AvZmlsZXMuZWwN
CkBAIC03ODc4LDYgKzc4NzgsNyBAQCBtb3ZlLWZpbGUtdG8tdHJhc2gNCiAN
CiAJICAgICAgIDs7IE1ha2UgYSAudHJhc2hpbmZvIGZpbGUuICBVc2UgT19F
WENMLCBhcyBwZXIgdHJhc2gtc3BlYyAxLjAuDQogCSAgICAgICAobGV0KiAo
KGZpbGVzLWJhc2UgKGZpbGUtbmFtZS1ub25kaXJlY3RvcnkgZm4pKQ0KKyAg
ICAgICAgICAgICAgICAgICAgICAoaXMtZGlyZWN0b3J5IChmaWxlLWRpcmVj
dG9yeS1wIGZuKSkNCiAgICAgICAgICAgICAgICAgICAgICAgKG92ZXJ3cml0
ZSBuaWwpDQogICAgICAgICAgICAgICAgICAgICAgIGluZm8tZm4pDQogICAg
ICAgICAgICAgICAgICA7OyBXZSdyZSBjaGVja2luZyBmdXJ0aGVyIGRvd24g
d2hldGhlciB0aGUgaW5mbyBmaWxlDQpAQCAtNzg4OSw3ICs3ODkwLDggQEAg
bW92ZS1maWxlLXRvLXRyYXNoDQogICAgICAgICAgICAgICAgICAgICAgICAg
IGZpbGVzLWJhc2UgKGZpbGUtbmFtZS1ub25kaXJlY3RvcnkNCiAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG1ha2UtdGVtcC1maWxl
DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZXhw
YW5kLWZpbGUtbmFtZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIGZpbGVzLWJhc2UgdHJhc2gtZmlsZXMtZGlyKSkpKSkNCisg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxlcy1i
YXNlIHRyYXNoLWZpbGVzLWRpcikNCisgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgIGlzLWRpcmVjdG9yeSkpKSkNCiAJCSAoc2V0cSBp
bmZvLWZuIChleHBhbmQtZmlsZS1uYW1lDQogCQkJCShjb25jYXQgZmlsZXMt
YmFzZSAiLnRyYXNoaW5mbyIpDQogCQkJCXRyYXNoLWluZm8tZGlyKSkNCi0t
IA0KMi4zMC4yDQoNCg==

--bh71MWLj8f--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47960; Package emacs. Full text available.

Message received at 47960 <at> debbugs.gnu.org:


Received: (at 47960) by debbugs.gnu.org; 22 Apr 2021 21:42:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 22 17:42:12 2021
Received: from localhost ([127.0.0.1]:35709 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lZh5P-0007AO-VE
	for submit <at> debbugs.gnu.org; Thu, 22 Apr 2021 17:42:12 -0400
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:60035)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <info@HIDDEN>) id 1lZh5N-0007A8-Ib
 for 47960 <at> debbugs.gnu.org; Thu, 22 Apr 2021 17:42:10 -0400
X-Originating-IP: 94.46.225.161
Received: from kronos (unknown [94.46.225.161])
 (Authenticated sender: public@HIDDEN)
 by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 761AF1BF203;
 Thu, 22 Apr 2021 21:42:01 +0000 (UTC)
From: Protesilaos Stavrou <info@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#47960: 28.0.50; delete-by-moving-to-trash fails on
 directories?
References: <87mttq6o6n.fsf@HIDDEN>
 <a87041afcbd886b5e3a1@HIDDEN>
Date: Fri, 23 Apr 2021 00:42:00 +0300
In-Reply-To: <a87041afcbd886b5e3a1@HIDDEN> (Gregory Heytings's message
 of "Thu, 22 Apr 2021 21:11:19 +0000")
Message-ID: <87bla66lp3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47960
Cc: 47960 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 2021-04-22, 21:11 +0000, Gregory Heytings <gregory@HIDDEN> wrote:

>>
>> On trunk the (setq delete-by-moving-to-trash t) no longer works in
>> Dired and Eshell when trying to delete a directory.
>>
>> Steps to reproduce with emacs -Q:
>>
>> + Evaluate (setq delete-by-moving-to-trash t).
>> + Use 'C-x C-j' to jump to a dired buffer.
>> + Then type '+' and create a new directory named "test" or whatever.
>> + With point over the newly created directory ,type "D", and confirm.
>>
>> You get an error: "file-error: Renaming: Not a directory [...]"
>>
>> Same if you try to delete the directory with the 'rm -r' command from
>> inside eshell (though 'rmdir' works in this case).
>>
>> For completeness, M-x shell works with either 'rm -r' and 'rmdir'.
>>
>
> Are you sure this bug is not due to something going wrong on your
> machine? I'm unable to reproduce this bug here, both Dired and Eshell
> seem to work as expected.

It could be, though I have only updated Emacs in the last ~10 days.

What seems to be the issue is when a deleted entry of the same name
already exists.  I emptied my trash and tried the above recipe: the
problem would not occur.  But upon immediate retry the problem appeared,
presumably because "test" already existed in the trash.

> Did you by any chance define a 'system-move-file-to-trash' function?

No

> Does it work when you (setq trash-directory <something>)?

Yes, it does.  Both for my original recipe and with the other case I
mentioned above.

I have always set this to nil, which makes it use the trash of
freedesktop.org.

-- 
Protesilaos Stavrou
https://protesilaos.com




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47960; Package emacs. Full text available.

Message received at 47960 <at> debbugs.gnu.org:


Received: (at 47960) by debbugs.gnu.org; 22 Apr 2021 21:11:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 22 17:11:21 2021
Received: from localhost ([127.0.0.1]:35678 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lZgbZ-0006Qx-OF
	for submit <at> debbugs.gnu.org; Thu, 22 Apr 2021 17:11:21 -0400
Received: from heytings.org ([95.142.160.155]:49360)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1lZgbY-0006Qq-Lz
 for 47960 <at> debbugs.gnu.org; Thu, 22 Apr 2021 17:11:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20210101; t=1619125879;
 bh=YZtQ0IJlo2gaG2Lv1lLIS5Y843if/PAb7wW4NtAMiGY=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=nSirWBl3ElhS4lFgRNnfSxG1cBUTVvz6wtWaguN3xtsiyFc/AkmAnt3ngjv75Gam4
 a6HUazfw0e8d7/dr0+D7dk9GI0c12IWOoz+Wqrm/lWVZe+Aqf3dwLHvqgT4lbsNEAj
 IvVYuzy6wva0HH2lPIRL3rM9vvd6pnXNIvjY9h4ab6wCp3MoW9G7C/LNiB9DcDK0Mb
 +DUCrZJ0tQSGZDuOw8mItwRmKg86NzREIm8zV35aXRh0uyq7+CdsJQUzwudjxuiY8w
 LekS/ClzErUu1PPFwQlre+jlr5T8U0z5Zs+OtP/ISeDJXolJ1oM2wzUTo/1NQ3M+n+
 j9qLBSFgr69Pw==
Date: Thu, 22 Apr 2021 21:11:19 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Protesilaos Stavrou <info@HIDDEN>
Subject: Re: bug#47960: 28.0.50; delete-by-moving-to-trash fails on
 directories?
In-Reply-To: <87mttq6o6n.fsf@HIDDEN>
Message-ID: <a87041afcbd886b5e3a1@HIDDEN>
References: <87mttq6o6n.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47960
Cc: 47960 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> On trunk the (setq delete-by-moving-to-trash t) no longer works in Dired 
> and Eshell when trying to delete a directory.
>
> Steps to reproduce with emacs -Q:
>
> + Evaluate (setq delete-by-moving-to-trash t).
> + Use 'C-x C-j' to jump to a dired buffer.
> + Then type '+' and create a new directory named "test" or whatever.
> + With point over the newly created directory ,type "D", and confirm.
>
> You get an error: "file-error: Renaming: Not a directory [...]"
>
> Same if you try to delete the directory with the 'rm -r' command from 
> inside eshell (though 'rmdir' works in this case).
>
> For completeness, M-x shell works with either 'rm -r' and 'rmdir'.
>

Are you sure this bug is not due to something going wrong on your machine? 
I'm unable to reproduce this bug here, both Dired and Eshell seem to work 
as expected.

Did you by any chance define a 'system-move-file-to-trash' function?

Does it work when you (setq trash-directory <something>)?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47960; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 Apr 2021 20:48:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 22 16:48:28 2021
Received: from localhost ([127.0.0.1]:35659 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lZgFQ-0005qK-Kc
	for submit <at> debbugs.gnu.org; Thu, 22 Apr 2021 16:48:28 -0400
Received: from lists.gnu.org ([209.51.188.17]:57042)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <info@HIDDEN>) id 1lZgFO-0005qB-OH
 for submit <at> debbugs.gnu.org; Thu, 22 Apr 2021 16:48:26 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45514)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <info@HIDDEN>)
 id 1lZgFO-00089N-GH
 for bug-gnu-emacs@HIDDEN; Thu, 22 Apr 2021 16:48:26 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:49339)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <info@HIDDEN>)
 id 1lZgFK-0003BX-PC
 for bug-gnu-emacs@HIDDEN; Thu, 22 Apr 2021 16:48:25 -0400
X-Originating-IP: 94.46.225.161
Received: from kronos (unknown [94.46.225.161])
 (Authenticated sender: public@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 8E9941C000B
 for <bug-gnu-emacs@HIDDEN>; Thu, 22 Apr 2021 20:48:18 +0000 (UTC)
From: Protesilaos Stavrou <info@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; delete-by-moving-to-trash fails on directories?
Date: Thu, 22 Apr 2021 23:48:16 +0300
Message-ID: <87mttq6o6n.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: none client-ip=217.70.183.197; envelope-from=info@HIDDEN;
 helo=relay5-d.mail.gandi.net
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7,
 SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On trunk the (setq delete-by-moving-to-trash t) no longer works in Dired
and Eshell when trying to delete a directory.

Steps to reproduce with emacs -Q:

+ Evaluate (setq delete-by-moving-to-trash t).
+ Use 'C-x C-j' to jump to a dired buffer.
+ Then type '+' and create a new directory named "test" or whatever.
+ With point over the newly created directory ,type "D", and confirm.

You get an error: "file-error: Renaming: Not a directory [...]"

Same if you try to delete the directory with the 'rm -r' command from
inside eshell (though 'rmdir' works in this case).

For completeness, M-x shell works with either 'rm -r' and 'rmdir'.

-- 
Protesilaos Stavrou
https://protesilaos.com




Acknowledgement sent to Protesilaos Stavrou <info@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#47960; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 25 Apr 2021 11:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.