GNU bug report logs - #58721
28.2; dired with delete-by-moving-to-trash can't trash directory twice

Previous Next

Package: emacs;

Reported by: Gustavo Barros <gusbrs.2016 <at> gmail.com>

Date: Sat, 22 Oct 2022 18:24:01 UTC

Severity: normal

Found in version 28.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gustavo Barros <gusbrs.2016 <at> gmail.com>
Cc: 58721 <at> debbugs.gnu.org
Subject: bug#58721: 28.2; dired with delete-by-moving-to-trash can't trash directory twice
Date: Thu, 27 Oct 2022 19:09:17 +0300
> From: Gustavo Barros <gusbrs.2016 <at> gmail.com>
> Date: Sat, 22 Oct 2022 15:23:15 -0300
> 
> If one enables `delete-by-moving-to-trash' and tries to delete a
> directory with the same name twice from dired, dired won't let one do
> so, resulting in "file-already-exists: File exists: </path/>" error
> instead.
> 
> Start with `emacs -Q'.  Set:
> 
>     (setq delete-by-moving-to-trash t)
> 
> Open dired at "/tmp/" (or some other place of your choosing).  Clone
> the org repository there with `M-& git clone
> https://git.savannah.gnu.org/git/emacs/org-mode.git RET' (a comment on
> why this below), refresh with `g', navigate to the corresponding
> directory, and trash it with `D', confirm.  The operation succeeds.
> 
> Now, repeat it. Clone the repository and delete the directory again. I
> get here "file-already-exists: File exists:
> /home/<username>/.local/share/Trash/files/org-moderiQJ08", and the
> directory is not trashed.
> 
> Of course, this has nothing to do with Org.  But I've tried to create
> a simple file with `touch' or an empty directory with `mkdir' and the
> issue does not arise then.  And I haven't figured out what is the
> difference in the `org-mode' directory which triggers the problem, it
> just happens to be the last failing case of an issue which happens
> occasionally here.

Could you please set debug-on-error t, repeat the experiment, and post
the Lisp backtrace from the error?

Thanks.




This bug report was last modified 2 years and 182 days ago.

Previous Next


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