From: Protesilaos Stavrou <info@protesilaos.com>
To: Gregory Heytings <gregory@heytings.org>
Cc: 47960@debbugs.gnu.org
Subject: bug#47960: 28.0.50; delete-by-moving-to-trash fails on directories?
Date: Fri, 23 Apr 2021 00:42:00 +0300 [thread overview]
Message-ID: <87bla66lp3.fsf@protesilaos.com> (raw)
In-Reply-To: <a87041afcbd886b5e3a1@heytings.org> (Gregory Heytings's message of "Thu, 22 Apr 2021 21:11:19 +0000")
On 2021-04-22, 21:11 +0000, Gregory Heytings <gregory@heytings.org> 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
next prev parent reply other threads:[~2021-04-22 21:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 20:48 bug#47960: 28.0.50; delete-by-moving-to-trash fails on directories? Protesilaos Stavrou
2021-04-22 21:11 ` Gregory Heytings
2021-04-22 21:42 ` Protesilaos Stavrou [this message]
2021-04-23 20:39 ` Gregory Heytings
2021-05-07 20:41 ` Gregory Heytings
2021-05-24 22: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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bla66lp3.fsf@protesilaos.com \
--to=info@protesilaos.com \
--cc=47960@debbugs.gnu.org \
--cc=gregory@heytings.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.