unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Gustavo Barros <gusbrs.2016@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 58721@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 16:07:14 -0300	[thread overview]
Message-ID: <CAM9ALR8CQL5fgb+pT2bQdpu=9Y2OQuza5viKBbXjvmLvRp+GAQ@mail.gmail.com> (raw)
In-Reply-To: <CAM9ALR8=-QZuNsFgbngx1Y5awbME5ObrcUxeZHp1nxb_UMnCgQ@mail.gmail.com>

On Thu, 27 Oct 2022 at 15:41, Gustavo Barros <gusbrs.2016@gmail.com> wrote:

> > [...] so why does
> > only the second move to trash cause the error?
>
> As far as I can tell, the existence of
> "~/.local/share/Trash/files/org-mode" triggers it. I'd presume that
> its existence takes the execution path to some code branch (the one
> which tries to uniquify the file name/calls make-temp-file) which
> tries to somehow create the directory twice.
>
> But there's more to it. In the original report I explained why I ended
> up "cloning the org repo" for this. Indeed, when creating the
> reproduction recipe, I've tried first to create a simple empty file
> with `touch' and a simple empty dir with `mkdir', but those did not
> trigger the error. This is utterly mysterious to me. Perhaps something
> like "size induced delay with some asynchronous process"? But that's
> just a (very) wild guess. Truth is, I'm at a loss. And I did go
> through the rabbit role to some extent, which resulted in that other
> report about `move-file-to-trash', but I could not understand what's
> going on here.

I just had an idea here to test the "delay" hypothesis, and it paid off.

All of my tests so far were being done from one of two places, the
"/tmp/" dir, or the place in my user files where I keep Emacs cloned
libraries. And they share a characteristic in my system, neither is in
the same filesystem as "~/.local/share/Trash/". "/tmp/" is a tmpfs
mount, and my personal files are in a separate encrypted partition.

Hence, what I did now, was to follow the recipe, but instead cloning
to "~", which is in the same partition as the Trash. And, guess what?
The error does not occur!

So it seems indeed a delay is at play. And that this one is related to
bug#58781, after all. A "fix" there would "fix" here too. But by luck,
because it would make the move "quick enough". However, the behavior
does suggest there's really some double attempt to create the
directory somewhere in the code.





      parent reply	other threads:[~2022-10-27 19:07 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-22 18:23 bug#58721: 28.2; dired with delete-by-moving-to-trash can't trash directory twice Gustavo Barros
2022-10-27 16:09 ` Eli Zaretskii
2022-10-27 17:07   ` Gustavo Barros
2022-10-27 17:22     ` Gustavo Barros
2022-10-27 17:30     ` Eli Zaretskii
2022-10-27 17:51       ` Gustavo Barros
2022-10-27 18:20         ` Eli Zaretskii
2022-10-27 18:41           ` Gustavo Barros
2022-10-27 19:04             ` Eli Zaretskii
2022-10-27 19:13               ` Gustavo Barros
2022-10-27 22:01               ` Gustavo Barros
2022-10-28  7:46                 ` Eli Zaretskii
2022-10-28 10:43                   ` Gustavo Barros
2022-10-28 11:44                     ` Eli Zaretskii
2022-10-28 12:35                       ` Gustavo Barros
2022-10-28 15:26                         ` Stefan Kangas
2022-10-28 16:06                           ` Gustavo Barros
2022-10-28 19:07                             ` Gustavo Barros
2022-10-29  5:25                       ` Mike Kupfer
2022-10-29 10:35                         ` Gustavo Barros
2022-10-29 15:24                         ` Mike Kupfer
2022-10-29 15:48                           ` Eli Zaretskii
2022-10-29 16:32                             ` Mike Kupfer
2022-10-29 16:56                               ` Eli Zaretskii
2022-10-30  0:09                                 ` Mike Kupfer
2022-10-30  6:41                                   ` Eli Zaretskii
2022-10-30 17:40                                     ` Mike Kupfer
2022-10-30 18:02                                       ` Eli Zaretskii
2022-10-30 18:18                                         ` Mike Kupfer
2022-10-30 19:51                                           ` Eli Zaretskii
2022-10-30 22:20                                             ` Mike Kupfer
2022-10-30 23:10                                               ` Gustavo Barros
2022-10-31  0:01                                                 ` Mike Kupfer
2022-10-31  0:23                                                   ` Gustavo Barros
2022-10-31 12:49                                                   ` Eli Zaretskii
2022-10-31 13:16                                                     ` Gustavo Barros
2022-11-21  1:08                                                       ` Mike Kupfer
2022-11-21  1:45                                                         ` Gustavo Barros
2022-11-21  1:52                                                           ` Mike Kupfer
2022-11-24 11:19                                                         ` Eli Zaretskii
2022-11-24 11:28                                                           ` Gustavo Barros
2022-10-27 19:07             ` Gustavo Barros [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM9ALR8CQL5fgb+pT2bQdpu=9Y2OQuza5viKBbXjvmLvRp+GAQ@mail.gmail.com' \
    --to=gusbrs.2016@gmail.com \
    --cc=58721@debbugs.gnu.org \
    --cc=eliz@gnu.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).