From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70593: 30.0.50; Dired: buffers of renamed dirs are broken Date: Fri, 26 Apr 2024 13:59:16 +0200 Message-ID: <87a5lguygb.fsf@web.de> Reply-To: Michael Heerdegen Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11009"; mail-complaints-to="usenet@ciao.gmane.io" To: 70593@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 26 14:04:16 2024 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 1s0KJK-0002hX-SS for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Apr 2024 14:04:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0KJ2-0004EG-AM; Fri, 26 Apr 2024 08:03:56 -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 1s0KIz-0004DY-L3 for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2024 08:03:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s0KIx-0007Kk-U9 for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2024 08:03:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s0KJF-00037N-U2 for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2024 08:04:09 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Apr 2024 12:04:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70593 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171413303411759 (code B ref -1); Fri, 26 Apr 2024 12:04:06 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Apr 2024 12:03:54 +0000 Original-Received: from localhost ([127.0.0.1]:34239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0KIx-000331-5p for submit@debbugs.gnu.org; Fri, 26 Apr 2024 08:03:53 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:34910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0KEM-00028B-Rj for submit@debbugs.gnu.org; Fri, 26 Apr 2024 07:59:11 -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 1s0KDx-0000T5-G0 for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2024 07:58:41 -0400 Original-Received: from mout.web.de ([212.227.15.4]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s0KDv-00065l-6X for bug-gnu-emacs@gnu.org; Fri, 26 Apr 2024 07:58:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1714132717; x=1714737517; i=michael_heerdegen@web.de; bh=Cw6LTPdphWEQ6F37xj5uqjot6FND4VESuDHbbdiJBuU=; h=X-UI-Sender-Class:From:To:Subject:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=iLxBTnZa6pmMmotNbh2pEtcjQy/Dq1mNRu9TI2HsesK2wZ8yMhqjDORj42Ipi7gR mLn6QSntG+sRb9QP9Ea70m6h7aKhJBDdBDTDZHGfA6lgC2dQuT/5eJWVQ/vw43FOB xU40sXtKD86hVT5T2csYFmwEgF82XHZqeshkruLFuJ9nW/owf6TJbV/CK0p2w74mE A4kdjNNuI1oyPa357CfbGs4P5qW6cc50BGnoJPk6qiQ6a/rlBjcj7bqyDyTbOWMyD 9sfrIMBqeJ3yhLHwqoPgLOr8cJJJpkXDP/tiRH6IRGH4cNqEjaFzkl5QI8UTztNVE BgtENyzfskXn6eZi3w== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([84.57.248.23]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MYclj-1sCmfG0SjT-00ViVq for ; Fri, 26 Apr 2024 13:58:37 +0200 X-Provags-ID: V03:K1:5MjEL89HJcEq6tYOcnIxgejbIrw9omFPpoI/UWhwpemI7tsE8xH 4EHmvq4K/QH7deA3AxcjP50Je5QJusW8SGVPkXDiz6IZiocO7pkWIbQ/+9BuNY3PV0j9soY DTmqGJR5Rq7JcxvpdJYjXZYRLQJj7KY07evNN6zPY+Jp+lqUs9cyaeWk/VfH1EdzoYmpHc9 QeIcsSK0FhP3Ldz6b9xvg== UI-OutboundReport: notjunk:1;M01:P0:2+c9NiN1Kak=;/LqAr0ydSNenGzg7s/wFa59zAbZ epA3TVT95g6nrPpeNX5Vnp9XlMq9lJdMG9Iehdab7uj6HsGpqeDn23HeOsr5e7sRhQBsEQcup x3Xgb9CNhsI+cpjLTOfKR8PTJgYr5/tNnWgGBeU0Pzwpo12j97IdYdjWmAOaLks47UnFAWMg2 rGMlqv5G78NZAhEuNaxdIdTc3OL46U54y5yDeTz0x4e+L5rowrl7LoLxGVDGuYfUOqQn+NtX2 dhBi+U8FBS0LDtIsEA2GECjSdb7Q+uEPQO3lKUCRWPm86rFSZtHafg3Z+rd83BTF0tSXwPVZK i6Gv1HYbxPQGMDyJaLiM4EXCpMqeYTodeaE/bH65q6ZTP48Jyd5G//q53jLwBTI68qwIUS7tB DckOVavz1s84da8nhH8PjHpqFtZDFyGMuCQxk4EUg7KsVj3/AzjRAqEnU6P6f7OWoRfh4qDkJ CGZ7nP1wTKKfeH9bL8UPSIWfIjEkC9UE1/85dJyCMlFs1mFXp14xnX4QWfgRdn6tVkv8ZbCcM O+QRnzCxFZ6fd766/V+7IJ1wCzsTqUEJCqhpBv6Rz7h01bMmZxzBIUb3bc518mfLv4mXRehmI pLjhPa/+i9NmnFI4QFkhydufMZYoKVfV8S1vR8hY/NemIWPJ5PLmMesNffFUyuAcNaqpSIK7i xr444/nMKVIalCDjgr7FB057OBNLCx+j4zHWY5O8PCfIUwQlz9l6T2u74pL1PFJaJoF0aPAoN kqo1amZPkL8JwjLz/qCBYp3t5fh8ZmiqBIdWOkWE2rvkTjPvDrN5vQq7ihrgXeb1g2eYgRP6 Received-SPF: pass client-ip=212.227.15.4; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283985 Archived-At: Hello, I'm really, really happy that I finally nailed down this not insignificant dired problem: When you revert a dired buffer whose default-directory has been renamed, the buffer is erased and an error message is displayed. Marks and stuff are permanently lost. This even happens when the directory had been renamed with means of dired. It follows a recipe for emacs -Q; feel free to skip to the following analysis of the problem... (we care about this case, but the code is broken - see below) [ Recipe: I have two dired buffers, one showing "~", the other one a subdirectory "~/test" in the other window. You can put some trash files into that directory and mark some of them. Now I select the "~" dired buffer and enable wdired. I rename "test" to, say, "test1", and confirm. Now select the other dired buffer. The directory name in the first line has even been updated. But when I hit g, the buffer is erased and an error is raised: | insert-directory: Setting current directory: No such file or directory, | /home/micha/test2/ Recipe end ] The problem is that we partially fail to update the affected buffers. The code wants to do this in `dired-rename-subdir-1': (if (equal dir default-directory) ;; if top level directory was renamed, lots of things have to be ;; updated: DIR is the old directory name. But the `equality' test fails simply because default-directory is "~/test/" but DIR has the tilde expanded. TIA, Michael.