From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#54636: dired fails to update subdirs when files are created/deleted/renamed Date: Wed, 30 Mar 2022 16:56:38 +0300 Message-ID: <831qyj8rxl.fsf@gnu.org> References: <877d8b3d4w.fsf@igel.home> <87y20r1vys.fsf@igel.home> <87o81n1ue5.fsf@gnu.org> <835ynv8ti4.fsf@gnu.org> <87k0cb1rpa.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25820"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54636@debbugs.gnu.org, schwab@linux-m68k.org To: Tassilo Horn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 30 16:06:31 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 1nZYxy-0006Sz-60 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Mar 2022 16:06:30 +0200 Original-Received: from localhost ([::1]:37864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZYxw-00010R-Tc for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Mar 2022 10:06:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZYoo-0003na-94 for bug-gnu-emacs@gnu.org; Wed, 30 Mar 2022 09:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZYoo-0000Ir-0F for bug-gnu-emacs@gnu.org; Wed, 30 Mar 2022 09:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nZYon-0002O6-U2 for bug-gnu-emacs@gnu.org; Wed, 30 Mar 2022 09:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Mar 2022 13:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54636 X-GNU-PR-Package: emacs Original-Received: via spool by 54636-submit@debbugs.gnu.org id=B54636.16486486029151 (code B ref 54636); Wed, 30 Mar 2022 13:57:01 +0000 Original-Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 13:56:42 +0000 Original-Received: from localhost ([127.0.0.1]:36628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZYoT-0002NX-Qf for submit@debbugs.gnu.org; Wed, 30 Mar 2022 09:56:42 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZYoS-0002NL-Ll for 54636@debbugs.gnu.org; Wed, 30 Mar 2022 09:56:41 -0400 Original-Received: from [2001:470:142:3::e] (port=35118 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZYoN-0000Aw-5T; Wed, 30 Mar 2022 09:56:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=gNhTvNtTJDVpX6TsYWmglnaaT/T/KQ9h3wcVtNTXRIs=; b=k0LvTKEBIs6p I/LmAlXXBHvWOZyOicUU1ttyC6VBOvd+XK8T3hvdU9lOACmkoKGVSLF0VGml1bj1c987VRGRRf0TQ YT2isS1lArEZm0m9FnA/ZYHtnJipjVuH8Mk8nbbUFtvTi6u4WparJsYJeEsF+ty7SwlZGQxzfgQJO VmICu133B6hTB6mqb3kUY2nzdCuyf37SA0ORPvvxVTCrE6G+WiXwL/87RgCn2lPf0QkxQ+Ocrg/j/ vYjJ+xDIHlMG8DgbPCrw/ngp34g0ktch9/GZDndKEwmOZT9pQvcLq5VYkoK33yN1Y4asPaoh0bB1/ svMA2kwmjXyMnd46mbPxtQ==; Original-Received: from [87.69.77.57] (port=2647 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZYoJ-0001HH-KO; Wed, 30 Mar 2022 09:56:34 -0400 In-Reply-To: <87k0cb1rpa.fsf@gnu.org> (message from Tassilo Horn on Wed, 30 Mar 2022 15:29:36 +0200) 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" Xref: news.gmane.io gmane.emacs.bugs:229114 Archived-At: > From: Tassilo Horn > Cc: schwab@linux-m68k.org, 54636@debbugs.gnu.org > Date: Wed, 30 Mar 2022 15:29:36 +0200 > > Eli Zaretskii writes: > > >> Oh, sorry, I'll look into it ASAP. I guess this is to be corrected > >> in emacs-28? > > > > Yes. > > > > I think I just fixed it there, please take a look. > > That's what I was about to do, too, but that's not right, too. Well, it fixes the regression. > Say you have dired buffers for > > ~/ > ~/foo/ > ~/foo/bar/ > > and then delete ~/foo from inside the ~/ dired buffer. You'll be asked > if the buffers for foo should be delete, too, and when you confirm, what > is deleted are the buffers ~/ and ~/foo but ~/foo/bar persists. So the > buffers are deleted downwards (to the root) instead of upwards which is > wrong. This means your fix for the "ask" part is incomplete, and should be improved. But that is a new feature in Emacs 28, so it is not a catastrophe if it is imperfect. Regressions in previously correct behavior are much worse. Of course, if you can come up with a fix for the question-asking part that makes it delete all the relevant buffers, and if that fix is safe enough (a high bar at this late stage of the pretest), we can install that on the release branch. Failing that, the fix for that will have to wait till Emacs 28.2 at the very least. > I guess I recognized that in 7b50ed553f and switched the arguments for > that very reason. (file-in-directory-p has the same argument order as > dired-in-this-tree.) But reversing the arguments breaks dired-in-this-tree completely, because it doesn't treat the arguments symmetrically. In the scenario described by Andreas, dired-in-this-tree consistently returned nil for a subdirectory inserted into a Dired buffer of its parent with 'i'. Specifically, DIR will _never_ match DIR/FILE inside dired-in-this-tree, only the other way around.