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 15:41:43 -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="11870"; 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:30:41 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 1oo8aO-0002wN-Nd for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Oct 2022 21:30:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oo7qZ-000505-T2; Thu, 27 Oct 2022 14:43:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo7qT-0004v4-Gq for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 14:43:13 -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 1oo7qI-0004Ro-8r for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 14:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oo7qH-0005RM-Rq for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 14:43:01 -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 18:43:01 +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.166689612520849 (code B ref 58721); Thu, 27 Oct 2022 18:43:01 +0000 Original-Received: (at 58721) by debbugs.gnu.org; 27 Oct 2022 18:42:05 +0000 Original-Received: from localhost ([127.0.0.1]:59298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo7pN-0005QB-Cm for submit@debbugs.gnu.org; Thu, 27 Oct 2022 14:42:05 -0400 Original-Received: from mail-pl1-f170.google.com ([209.85.214.170]:37469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo7pJ-0005Pd-4P for 58721@debbugs.gnu.org; Thu, 27 Oct 2022 14:42:04 -0400 Original-Received: by mail-pl1-f170.google.com with SMTP id d24so2468301pls.4 for <58721@debbugs.gnu.org>; Thu, 27 Oct 2022 11:42:01 -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=CaEPBJ4+ksGPZ6IZ20oPp5hTnDUlG+s6vOBfkT+CNmA=; b=oumdVid4fx84K8ZjQFckBfBHHYl/b9tTtiPOnY9NcSo/ZiFVEDPq7FOOaXd5LFpl4O wPZg/LIwUnRtZxY0bxQzyJBt5jRiISzXRwAGCpPcGdp84KK9IvvyNsT5Fe634b4LUZx+ aQeI5cD3q9wJXl3+cZwJ29C6rdbWr5xPwks6EXEj2lcspxl1QkosXb3UZPEq3GNzWD61 o1hWjFU0BzCFVHZn4wt3h3qGzVftaNHEERdXpmKIYN3QKtBBbFw6J3L6wFX2jbL83g49 zimMYIjIuMp0W3U8ihY3igzCGn934V/cVLkvVn96yn5HmhPZveh+hyBnjPQ4P5REA7yB X8jQ== 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=CaEPBJ4+ksGPZ6IZ20oPp5hTnDUlG+s6vOBfkT+CNmA=; b=QOL0x3P7in5SZ1QEGmADb0uRQVhjlpzWmn28Dv0ZlarUrXO4Wufo3iNgTG8yCuW/a+ TAEC64xSogKP25eSNQHzHxzE3FMZ3gsMZtC5GJ9bBx/gW5DYzkmjP7BBEc1OXA1naX3Z 3/+GLzqjn+KtfBtlc+PQPSn7LZ0Epqta8MH/nbbOUBzwc58MGFqz1W6/eLzS6YTi/3rQ e9i3fBqN44R+LYoJ/o2olk3nDHO8NwDMTWc/86zxvAkyKqwPMMEjg2dd2o0akKk9lTJa +v+Ko1KP30rZuttcSb/wY+SON2iACCmBbA/9I69IFi5CY/JDWR/3n0a0T/favfDQhNhU TBbQ== X-Gm-Message-State: ACrzQf2B5fKRXlnjmABmiV8eDdnrFXhUIaaY78XmmtKUNKOwiMWjOFwf Ihq8Nm34BZepmrSqa1bSzEcMY/gqcyvIiGe2xRG5HVMRpRtZNg== X-Google-Smtp-Source: AMsMyM6N2VL9Mttwcrb4AKMkMiT6qQdUkUMll+ZM9eD4McjROTyVm/Ec6ZU2GB9+++D5AQuRcJlW4hJ4y2wdPuSA8CI= X-Received: by 2002:a17:90b:4b90:b0:213:6a84:b4e9 with SMTP id lr16-20020a17090b4b9000b002136a84b4e9mr6445288pjb.212.1666896115114; Thu, 27 Oct 2022 11:41:55 -0700 (PDT) In-Reply-To: <838rl1ku1b.fsf@gnu.org> 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:246362 Archived-At: On Thu, 27 Oct 2022 at 15:20, Eli Zaretskii wrote: > We need to understand when was org-mode7AVOuq created, and why does > Emacs tries to create it again. Agreed. > AFAIU from your description, > org-mode7AVOuq was not created by the first move to trash [...] That is correct. After the first move to trash, only "org-mode" exists in "~/.local/share/Trash/files". Indeed, at this point there's no need for the name to be uniquified, since there was no other directory with the same name there before the first move to trash. > [...] 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.