From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gustavo Barros Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <83r0ytl042.fsf@gnu.org> <83bkpxkwcd.fsf@gnu.org> <838rl1ku1b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7182"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58721@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 27 21:29:53 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oo8Zd-0001lp-5L for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Oct 2022 21:29:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oo8EZ-00068t-Hg; Thu, 27 Oct 2022 15:08:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo8EW-00064e-5s for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 15:08:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oo8EV-0008BI-Dj for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 15:08:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oo8EV-00068m-8G for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 15:08:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gustavo Barros Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Oct 2022 19:08:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58721 X-GNU-PR-Package: emacs Original-Received: via spool by 58721-submit@debbugs.gnu.org id=B58721.166689765723560 (code B ref 58721); Thu, 27 Oct 2022 19:08:03 +0000 Original-Received: (at 58721) by debbugs.gnu.org; 27 Oct 2022 19:07:37 +0000 Original-Received: from localhost ([127.0.0.1]:59358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo8E5-00067w-2f for submit@debbugs.gnu.org; Thu, 27 Oct 2022 15:07:37 -0400 Original-Received: from mail-pj1-f46.google.com ([209.85.216.46]:55203) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo8E0-00067g-5x for 58721@debbugs.gnu.org; Thu, 27 Oct 2022 15:07:35 -0400 Original-Received: by mail-pj1-f46.google.com with SMTP id h14so2480155pjv.4 for <58721@debbugs.gnu.org>; Thu, 27 Oct 2022 12:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VxVmRAnMig5PKukgWhuSXttd1Gcq2ONrXWE0CoFAxd8=; b=KuXRvnw8gQc8FzqJaXAUV8b+97OmH0dnkDfKR+knkIIhJH55IHxQ5UigcPY5foGwVP iDRZqPdpFS4QZGk31cILa6NXjX0Q/HJ34gDqewDXMsfyhaCJAzKMrVWhUXkwWfcUMvC2 Mxw0vpO2ykxuin3IFpvJCCiITdZq8sMTYbWkJWQxmER6KtOGsP0CcmXeTycwyX3+8bs9 wHYWVShspxM+HyQe1MNC1+yAHf4sITu6v5AQDWGwuf1HQ2hzClM5ahkGYfFOqtDK78Cz X+GQn5hY7AuqNmMYIQdveYjNQqugCrpyWrMK3GtvUM3Maef7yf+nk5cMD36ls5gmWkkb TQaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VxVmRAnMig5PKukgWhuSXttd1Gcq2ONrXWE0CoFAxd8=; b=5w1g996pSBg/Pw6TzV3TRWE9LxpbQ0CkSPhcuYgMKXQ/4/BWw2KPh9AKJQpaqgL8Qm y+48YY06Qj1XsAI9dWU/OE9/5z2P+fnMMO3ZuxXq6R+DNTaKz4oNspG9kH4ENif8Xfw1 vansJ+te9YKD20AIMTQADOvsEM558P3h8OucvwCtmmrMn4UQeNnupiamHwYljFlibvPD AyOHT7j3w/ophtFNpsIA4BIVQPS/ySMS3REdyhrK15xwt3dEhl23ahdeG2GwXtQwnxAb 03lsNppq4YIqcv9IrUlfKsh+tWhH5Mu4q/fzHk2kGMGtWYd6at0uESXq3ppwnr7IqLuH pVAg== X-Gm-Message-State: ACrzQf27UC78+8YonbB84RUKPfPsoyl+arIeMUaCPkKpLvxw2OYJBIAo sgVLfKZqqMQxoj7sSQFwbm7nA1JseoUlyDP28EsPOULEgKZmNQ== X-Google-Smtp-Source: AMsMyM4gpl0W18ViP5wIh0TsK4Z/cgysxMhhZBny9+4T0oLNu7uOcZQVcAWuNPoqTUpghue4rd+3vXIfXnpzgdJFOLA= X-Received: by 2002:a17:90b:4b90:b0:213:6a84:b4e9 with SMTP id lr16-20020a17090b4b9000b002136a84b4e9mr6551744pjb.212.1666897646245; Thu, 27 Oct 2022 12:07:26 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246361 Archived-At: On Thu, 27 Oct 2022 at 15:41, Gustavo Barros 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.