GNU bug report logs - #54636
dired fails to update subdirs when files are created/deleted/renamed

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Andreas Schwab <schwab@HIDDEN>; merged with #51486; dated Wed, 30 Mar 2022 11:16:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 5 Apr 2022 11:30:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 05 07:30:54 2022
Received: from localhost ([127.0.0.1]:53874 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nbhOg-0008Qg-HD
	for submit <at> debbugs.gnu.org; Tue, 05 Apr 2022 07:30:54 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50498)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1nbhOe-0008J5-QC
 for 54636 <at> debbugs.gnu.org; Tue, 05 Apr 2022 07:30:53 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:57410)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nbhOY-0006EG-Jg; Tue, 05 Apr 2022 07:30:46 -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=A0C+7HQ0DOrZkFy4q2/deARXr1hg40whWsXdxOBw938=; b=Ozbcobgr+56y
 nh4/hoGlyqQVGZHt/ftV4zswc04VBTz2LyA67iddxvjl+E0I3iIPhLiZScgV6QY8qViyPaJQq9tc6
 WbMdPBlOlWJteDtBvh3v1C/WO2rmPD+VUb1iuMnbAwm6Vuws0OA9mmaMkCzOLeXmmuxycDIIscHQU
 IIFxXpbPXSz1BaSomR2wPZqZQcIGweip1Mbo4vnqgZCAFYfsVuQ0C8gO8LgCBMQuhR1Ee/0fC1HrQ
 N3U5VqiIexhT1HWM9q5+6vEpaWJkOUo2jYurOATsqTQbf4yz5gXu3qi5gGSx72wzzPbjJYw+xF3qA
 5Ax+6Wh7+Yol+8Ms9JoBwA==;
Received: from [87.69.77.57] (port=3828 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nbhOU-0007b9-JX; Tue, 05 Apr 2022 07:30:43 -0400
Date: Tue, 05 Apr 2022 14:30:46 +0300
Message-Id: <83ilrnepi1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Tassilo Horn <tsdh@HIDDEN>
In-Reply-To: <87lewkca31.fsf@HIDDEN> (message from Tassilo Horn on Wed, 30
 Mar 2022 19:51:48 +0200)
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN> <835ynv8ti4.fsf@HIDDEN> <87k0cb1rpa.fsf@HIDDEN>
 <831qyj8rxl.fsf@HIDDEN> <87czi31p1l.fsf@HIDDEN> <83zgl7780z.fsf@HIDDEN>
 <878rsr1kss.fsf@HIDDEN> <874k3f1jxb.fsf@HIDDEN> <83wngb75o5.fsf@HIDDEN>
 <8369e675-2d82-42aa-9b13-29524c6a4ac6@HIDDEN> <83tubf753d.fsf@HIDDEN>
 <87lewkca31.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Tassilo Horn <tsdh@HIDDEN>
> Cc: schwab@HIDDEN, 54636 <at> debbugs.gnu.org
> Date: Wed, 30 Mar 2022 19:51:48 +0200
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> Hi all,
> 
> sorry, this message has sit in my drafts folder since March, 30th but
> apparently wasn't sent.  The fix was committed to emacs-28 on that day.

Yes, thanks.  (I wouldn't have released Emacs 28.1 if I wasn't aware
of your commit that day.)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 5 Apr 2022 06:34:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 05 02:34:39 2022
Received: from localhost ([127.0.0.1]:53629 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nbclz-0006vs-Mj
	for submit <at> debbugs.gnu.org; Tue, 05 Apr 2022 02:34:39 -0400
Received: from eggs.gnu.org ([209.51.188.92]:38282)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tsdh@HIDDEN>) id 1nbcly-0006vf-77
 for 54636 <at> debbugs.gnu.org; Tue, 05 Apr 2022 02:34:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:53654)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <tsdh@HIDDEN>)
 id 1nbcls-0003G1-HH; Tue, 05 Apr 2022 02:34:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From:
 References; bh=MwZNNnuXcO+WLCaDDOFWw9hQqVB3yYulkb0t9LxMhHQ=; b=Nb/GrjXsIsDUbt
 WsExXYN6ZQDWlDj5kTeqDLttY20UEo2DQ/yuQJ/86psK8kVD28ccu4pWH1Xh1IC8gAcO6W4Tb4no1
 jox8UHGJ/z4a9yTnKIZyPeUf7brvayY3QTAbRGApk/Pgi9Pg+ge5wpXruss7CdJ+vq69wzrRxBriU
 wWbWoGAA5o/fwvqfw8Zfs9Sbm9E5+gFkqQCs3pwFYPuOV+gKATR66k+aaFH1NCiSKYixNPF+ey6M/
 RnQiw0JAQC7zdyGkKMDqU/Nu4DUNl36FL+TksTmbUXziLiHfMnhqo4Up4RjnXVVl+iAzGSPHfSmfN
 p+K7lBrjAQPCsgQdeWkQ==;
Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:59265)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <tsdh@HIDDEN>)
 id 1nbclq-00070I-BN; Tue, 05 Apr 2022 02:34:30 -0400
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailauth.nyi.internal (Postfix) with ESMTP id E988C27C005A;
 Tue,  5 Apr 2022 02:34:29 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Tue, 05 Apr 2022 02:34:29 -0400
X-ME-Sender: <xms:9eJLYro6gPoM4pdqiAAhmMxfauy9UPNwZQ8CZcY88NMatJrRMUFqog>
 <xme:9eJLYlo5ypQNwX_hWZVfpvJKnlBOSMAUyQNOa4Wx3HUdu91L0ARxPdB9ghPu2cecK
 ZAgFycBQKXsMA>
X-ME-Received: <xmr:9eJLYoOf-eu9Q3hAF9mMsZVCb9ABJd_uLtrrJCKt-gYYigrfBQANMjqSJeD1ku0h4dMjhzb72v383AjJ9PZSCDkQwfZc5bpH>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudejfedguddtlecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpehffgfhvffuffgjkfggtgfgsehtqhertddtreejnecuhfhrohhmpefvrghs
 shhilhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnh
 epiedugffhhfejveevvdfhffegteelleejffefgefgueeggeelheefieeujefhheegnecu
 vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnh
 domhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeeh
 vdelkedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh
X-ME-Proxy: <xmx:9eJLYu4IQKpkb4CIhQe0E_PwEMfD1aFF7UIIFa8H0lXIenp3BKTFcQ>
 <xmx:9eJLYq5l9eClQWNgBGaa9o-3qAb1zMDjbOJUKQAa9txWKncmE8USKA>
 <xmx:9eJLYmg7JWMx9f-3Zai9lD3Fr3E7ZuO94ZX62VibPWAyTx2_z_ylrQ>
 <xmx:9eJLYgQEiu_0M5QL7HqhvG8rwDSU98bPdtRelRpzIvyrWsYrYZga7Q>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 5 Apr 2022 02:34:28 -0400 (EDT)
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN> <835ynv8ti4.fsf@HIDDEN> <87k0cb1rpa.fsf@HIDDEN>
 <831qyj8rxl.fsf@HIDDEN> <87czi31p1l.fsf@HIDDEN> <83zgl7780z.fsf@HIDDEN>
 <878rsr1kss.fsf@HIDDEN> <874k3f1jxb.fsf@HIDDEN> <83wngb75o5.fsf@HIDDEN>
 <8369e675-2d82-42aa-9b13-29524c6a4ac6@HIDDEN> <83tubf753d.fsf@HIDDEN>
User-agent: mu4e 1.7.12; emacs 29.0.50
From: Tassilo Horn <tsdh@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
Date: Wed, 30 Mar 2022 19:51:48 +0200
In-reply-to: <83tubf753d.fsf@HIDDEN>
Message-ID: <87lewkca31.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.2 (/)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.2 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

Hi all,

sorry, this message has sit in my drafts folder since March, 30th but
apparently wasn't sent.  The fix was committed to emacs-28 on that day.

>> > If so, can we restore dired-buffers-for-dir to what it was in Emacs
>> > 27?=C2=A0 AFAICT, the only difference now is that you use 'when' inste=
ad
>> > of just 'and' -- is there a reason for that?
>>=20
>> No reason except stylistic preference.
>> I can change that if you want.
>
> Yes, please.  And then please install on the emacs-28 branch.

Done, thank you.

Andreas, could you please test if the bug it fixed for you (not that I
did't try myself) and close the report if it is?

Bye,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 16:55:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 12:55:47 2022
Received: from localhost ([127.0.0.1]:36808 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZbbn-0002vE-Hi
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:55:47 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39182)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1nZbbl-0002v0-TU
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:55:46 -0400
Received: from [2001:470:142:3::e] (port=39370 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 <eliz@HIDDEN>)
 id 1nZbbf-0001XN-TE; Wed, 30 Mar 2022 12:55:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=wAmRQhWJvvuPJmpRpiXr9X42p2SHeEeSo0a5eh0AaeU=; b=XNxp4TV6/4hrmHD7lDV1
 e64l0jF8epgWt5MfBzsauGB90AqVwZgT4BLlBVHKNH56WVz33khy1BLg4R67tqfIF+BMj/oWKinB9
 MXuOy1OzMY60QwvANaOgW1lkkgAhWQjK4v0eLs8ILggec4kf8+tqEYYOzojg6cg5/Z8knZmlvtd/+
 VWDKobxpD166FYeSWWmjhYrXmy/PW2bSO4GEmOuiK3F2pdbux2Y/Rj9JH1GIUWLpiDGvFqs9JviMX
 C8zW6wHGr+ioXNV6fRS4yY8RuKcc/lx05LpvHsEtnDshbIdi/+wO8JBYwiSwK6S33Vin1KIcVEXH+
 lNN7deZHr1EYfw==;
Received: from [87.69.77.57] (port=2767 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nZbbG-0003ym-GY; Wed, 30 Mar 2022 12:55:35 -0400
Date: Wed, 30 Mar 2022 19:55:18 +0300
Message-Id: <83tubf753d.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Tassilo Horn <tsdh@HIDDEN>
In-Reply-To: <8369e675-2d82-42aa-9b13-29524c6a4ac6@HIDDEN> (message from
 Tassilo Horn on Wed, 30 Mar 2022 18:47:49 +0200 (GMT+02:00))
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN> <835ynv8ti4.fsf@HIDDEN> <87k0cb1rpa.fsf@HIDDEN>
 <831qyj8rxl.fsf@HIDDEN> <87czi31p1l.fsf@HIDDEN> <83zgl7780z.fsf@HIDDEN>
 <878rsr1kss.fsf@HIDDEN> <874k3f1jxb.fsf@HIDDEN> <83wngb75o5.fsf@HIDDEN>
 <8369e675-2d82-42aa-9b13-29524c6a4ac6@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Wed, 30 Mar 2022 18:47:49 +0200 (GMT+02:00)
> From: Tassilo Horn <tsdh@HIDDEN>
> Cc: schwab@HIDDEN, 54636 <at> debbugs.gnu.org
> 
> 
> 30.03.2022 18:42:48 Eli Zaretskii <eliz@HIDDEN>:
> 
> >> From: Tassilo Horn <tsdh@HIDDEN>
> >> Cc: schwab@HIDDEN, 54636 <at> debbugs.gnu.org
> >> Date: Wed, 30 Mar 2022 18:29:29 +0200
> >>
> >>> I'll prepare a patch in that direction later.
> >>
> >> Here it is:
> >> [...]
> >> I think that's a better approach than changing dired-buffers-for-dir
> >> which I shouldn't have done in the first place.
> >
> > If so, can we restore dired-buffers-for-dir to what it was in Emacs
> > 27?  AFAICT, the only difference now is that you use 'when' instead of
> > just 'and' -- is there a reason for that?
> 
> No reason except stylistic preference.
> I can change that if you want.

Yes, please.  And then please install on the emacs-28 branch.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 16:48:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 12:48:02 2022
Received: from localhost ([127.0.0.1]:36798 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZbUI-0002jo-Iy
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:48:02 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37598)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tsdh@HIDDEN>) id 1nZbUG-0002j7-QL
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:48:01 -0400
Received: from [2001:470:142:3::e] (port=39248 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 <tsdh@HIDDEN>)
 id 1nZbUB-000625-6E; Wed, 30 Mar 2022 12:47:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Subject:References:In-Reply-To:To:From:
 Date; bh=yEraACM6S2UsZ9uszKjWCdvQQoBfwRm4PKF11N1zspI=; b=BRKl1q6U/jif+gOTxLWM
 DfuytNc9NSqSgCmSyHvj+Wf1hFRg7tSepZF7B5hz8dXBSY2GBg7RPrOBGa4DeGmAJ5Juw4EWm0SKW
 zE8XHcFudF6runam4vBzSnKD2EE6BMPoUHWmzL6z/6FfR7Av0SBfxGLz1WlnMX3My3fiZ+8npahfo
 lPTnrHVG+VXsD05h/xS/TPOvclvVwh7Odb89Pnfgx36oT2iOKrhlxzWb3TKUKFuXnwKmin3fkLYYi
 ypPaYLXB6h84fZLvWVQmO4V+DGgdOGoGRPQiOzU2iK8uZbIuPkN8RJgxF+DPuWTJkA0wBB1wtvfu8
 B2+jRlm/c6DETg==;
Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:58977)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <tsdh@HIDDEN>)
 id 1nZbUA-0003OO-Rc; Wed, 30 Mar 2022 12:47:54 -0400
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailauth.nyi.internal (Postfix) with ESMTP id A08CF27C005B;
 Wed, 30 Mar 2022 12:47:52 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Wed, 30 Mar 2022 12:47:52 -0400
X-ME-Sender: <xms:uIlEYpC0juOvZ6kufGg0X5dVaCSYRs9z139SQm5xuu-xq60fuX_Jsw>
 <xme:uIlEYnhdsrY5g1-qfuKYF9tSRCLPoKLf9QqYtHuuNyjAOk8SyyTsL_N-_7rhpbL5A
 GqNuTigjgEVvg>
X-ME-Received: <xmr:uIlEYkn06zsppkj7-XSuU4QM1J88rJZdWrvvTTxIrvw0_gPVo1EWAjlRSPs1OlP51ojbZ6FNA1_tTXirYIBE2bwxvv3V>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeivddguddthecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpeffhffvkfgjfhfugggtgfesthhqredttddtjeenucfhrhhomhepvfgrshhs
 ihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpe
 duffelhfduhfekfeetgfefueegledvheethedugeefjefgudejkefhieetfeevtdenucev
 lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnod
 hmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedv
 leekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm
X-ME-Proxy: <xmx:uIlEYjwFIEdaAyLnA0AJBojWLj0_xEuH1es7Qd0ufoh3hQ04mER3vg>
 <xmx:uIlEYuTm6SRYVEJj8O2wssdJUpAo6hb7JDmWhAoZrkGvFoqCmuat9Q>
 <xmx:uIlEYmbDHvBnQWGCub49E-YfL4eAoE6U9OMa717DGdz1sR3VOe1LSg>
 <xmx:uIlEYhL8Yy88VCN5UmoKIE2__INmjhx0thw2pqagQv0cp5An14EEEg>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 30 Mar 2022 12:47:51 -0400 (EDT)
Date: Wed, 30 Mar 2022 18:47:49 +0200 (GMT+02:00)
From: Tassilo Horn <tsdh@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Message-ID: <8369e675-2d82-42aa-9b13-29524c6a4ac6@HIDDEN>
In-Reply-To: <83wngb75o5.fsf@HIDDEN>
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN> <835ynv8ti4.fsf@HIDDEN> <87k0cb1rpa.fsf@HIDDEN>
 <831qyj8rxl.fsf@HIDDEN> <87czi31p1l.fsf@HIDDEN> <83zgl7780z.fsf@HIDDEN>
 <878rsr1kss.fsf@HIDDEN> <874k3f1jxb.fsf@HIDDEN> <83wngb75o5.fsf@HIDDEN>
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Correlation-ID: <8369e675-2d82-42aa-9b13-29524c6a4ac6@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


30.03.2022 18:42:48 Eli Zaretskii <eliz@HIDDEN>:

>> From: Tassilo Horn <tsdh@HIDDEN>
>> Cc: schwab@HIDDEN, 54636 <at> debbugs.gnu.org
>> Date: Wed, 30 Mar 2022 18:29:29 +0200
>>
>>> I'll prepare a patch in that direction later.
>>
>> Here it is:
>> [...]
>> I think that's a better approach than changing dired-buffers-for-dir
>> which I shouldn't have done in the first place.
>
> If so, can we restore dired-buffers-for-dir to what it was in Emacs
> 27?=C2=A0 AFAICT, the only difference now is that you use 'when' instead =
of
> just 'and' -- is there a reason for that?

No reason except stylistic preference.
I can change that if you want.

Bye,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 16:42:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 12:42:52 2022
Received: from localhost ([127.0.0.1]:36793 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZbPH-0000P6-W6
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:42:52 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36388)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1nZbPG-0000Ou-LI
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:42:51 -0400
Received: from [2001:470:142:3::e] (port=39186 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 <eliz@HIDDEN>)
 id 1nZbPA-0003AW-OR; Wed, 30 Mar 2022 12:42:44 -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=odI6M8BkBO3+Q++y3oyvcDofplhr+Ivdu0CSAKbfrOQ=; b=GMilsxzpkE8V
 0AHA03RzOtAaLEQdU3b4bexZHvPkPE6x0Sny4zkQZWigMMxvHr4B7kOD9C5LqgJSMzov2SVah3JVU
 CErizaofWNd6xGPbNpcsQzeZ/37zZNeScZuFABIW0NqNj21ur3v91+9VmCnfq89KwlU+ygX1o71Bq
 aAR7F4JOuTeH7NewQyzZtVnZxmBbBfEDHA6+x/tVsXzLZXaGvE+S+RRfrom7KUEMoLaKjRECpCTOG
 K6CaTbAuqDkTghgQwOvpv35fWm6VRmTFu8KzBYDfsrT8yQPmJNXnQR0toxUbVc9Ex/woVUDByliHF
 7CEiZUpyddMNky6LlK0gpw==;
Received: from [87.69.77.57] (port=1463 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nZbP9-0002rw-Tt; Wed, 30 Mar 2022 12:42:44 -0400
Date: Wed, 30 Mar 2022 19:42:50 +0300
Message-Id: <83wngb75o5.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Tassilo Horn <tsdh@HIDDEN>
In-Reply-To: <874k3f1jxb.fsf@HIDDEN> (message from Tassilo Horn on Wed, 30
 Mar 2022 18:29:29 +0200)
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN> <835ynv8ti4.fsf@HIDDEN> <87k0cb1rpa.fsf@HIDDEN>
 <831qyj8rxl.fsf@HIDDEN> <87czi31p1l.fsf@HIDDEN> <83zgl7780z.fsf@HIDDEN>
 <878rsr1kss.fsf@HIDDEN> <874k3f1jxb.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Tassilo Horn <tsdh@HIDDEN>
> Cc: schwab@HIDDEN, 54636 <at> debbugs.gnu.org
> Date: Wed, 30 Mar 2022 18:29:29 +0200
> 
> > I'll prepare a patch in that direction later.
> 
> Here it is:
> [...]
> I think that's a better approach than changing dired-buffers-for-dir
> which I shouldn't have done in the first place.

If so, can we restore dired-buffers-for-dir to what it was in Emacs
27?  AFAICT, the only difference now is that you use 'when' instead of
just 'and' -- is there a reason for that?

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 16:37:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 12:37:48 2022
Received: from localhost ([127.0.0.1]:36784 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZbKO-0000H1-Az
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:37:48 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35456)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tsdh@HIDDEN>) id 1nZbKN-0000Gp-A7
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:37:47 -0400
Received: from [2001:470:142:3::e] (port=39086 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 <tsdh@HIDDEN>)
 id 1nZbKH-0002ND-PG; Wed, 30 Mar 2022 12:37:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From:
 References; bh=vDPDUQPGbUqbuXN1YvsxqZYibAlHQZ7p0okgr8/puus=; b=SMTOxrfeWxQerw
 ojG2IAWFK/WAyWlH4G+t2kum4HLbguZzCak8WgoO7BJ0aHFkMhlVowRjQWVUkmb7Ig9crnr68Edac
 UGWSfoPlCgJ73d06TY6SeN7g5OZqJDOIU6UCJC9wGb0yuEEyF+Yd/fbxTqyFSjktNJqTqBK/kp4b0
 im4v8NdIHmawVqkE7fS3k0kEa6AhD1fI3Rppq7+wKDAzho3Cs0zqYhh/rzW6Gzk/XbVyZvndxiJrB
 FuXuzAMWZDrLjLqwj+CNRLHy9NESmV8vj9KSDvExj6F40fxDj21L8DhhE1oWspZuQwUES+vyCtVj3
 KiE8mBZiDZNO0Bz4T6Vg==;
Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:60297)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <tsdh@HIDDEN>)
 id 1nZbKE-0002MT-1N; Wed, 30 Mar 2022 12:37:41 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailauth.nyi.internal (Postfix) with ESMTP id 9AC4127C005B;
 Wed, 30 Mar 2022 12:37:37 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Wed, 30 Mar 2022 12:37:37 -0400
X-ME-Sender: <xms:UYdEYnT2VWZZwRojMdsHK5rrZNpGcV7SewHDphTcYR4wQxeHcF75zg>
 <xme:UYdEYoxD7OCKZj-BNVIbHB2Y8dzGO4ODsIjaCll5DDipClbMEDuYHdv7lg_Q4vhl_
 Zv382boo0pmUA>
X-ME-Received: <xmr:UYdEYs3iuK3Zxt5ci_BT_VZkRzZl5e6aoHC7vDVy07hoQFeqC3EBjoXrbiG7-KGSagig0SC1pmTt6hFnxLI03owXJIrUDGnQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeivddguddtfecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpehffgfhvffuffgjkfggtgesthdtredttdertdenucfhrhhomhepvfgrshhs
 ihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpe
 evveeikeetkeeviefgfeffiedvteeguddvffeuueduveegtddthedvhfeuveffhfenucev
 lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnod
 hmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedv
 leekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm
X-ME-Proxy: <xmx:UYdEYnArXDNco7tMhuNuUfdP_SW5AdBxY0mNBb9mVqzoWTrW1NaLfg>
 <xmx:UYdEYgjjyBRdWIrRWPn4U8A_299QBYw__tpyCO7OQwwAq8sJoZpS4g>
 <xmx:UYdEYrp2yBFwe-1rD9XlBpiZHvzn_65yZKowEiFZBZPgNq-tfdruHQ>
 <xmx:UYdEYsY0Y9D6KP1XBgDttRQIrKdm1gX2QcJ63EndafB8rwiKjogeeQ>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 30 Mar 2022 12:37:36 -0400 (EDT)
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN> <835ynv8ti4.fsf@HIDDEN> <87k0cb1rpa.fsf@HIDDEN>
 <831qyj8rxl.fsf@HIDDEN> <87czi31p1l.fsf@HIDDEN> <83zgl7780z.fsf@HIDDEN>
 <878rsr1kss.fsf@HIDDEN> <83y20r768z.fsf@HIDDEN>
User-agent: mu4e 1.7.12; emacs 29.0.50
From: Tassilo Horn <tsdh@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
Date: Wed, 30 Mar 2022 18:32:41 +0200
In-reply-to: <83y20r768z.fsf@HIDDEN>
Message-ID: <87zgl7z99s.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Tassilo Horn <tsdh@HIDDEN>
>> Cc: schwab@HIDDEN, 54636 <at> debbugs.gnu.org
>> Date: Wed, 30 Mar 2022 18:02:15 +0200
>> 
>> Eli Zaretskii <eliz@HIDDEN> writes:
>> 
>> > So when will SUBDIRS be non-nil?  dired-clean-up-after-deletion is
>> > called not only when a directory is deleted, I think.
>> 
>> Yes, it's also called when deleting a file but in that case
>> dired-buffers-for-dir will return nil, so no buffer will be deleted.
>
> What about moving/renaming a directory?

No, it's only called from dired-delete-entry which is only called from
dired-internal-do-deletions which is only called from dired-do-delete
and dired-do-flagged-delete.  So only real deletions.

>> I think my patch is valid but now I think I should just create a
>> separate function dired-buffers-for-cleanup and use that from
>> dired-clean-up-after-deletion (or just collect the buffers in that
>> function) and remove the SUBDIRS argument from dired-buffers-for-dir as
>> it changes its logic too drastically.
>> 
>> I'll prepare a patch in that direction later.
>
> At this point, I'd prefer the safest, simplest patch for the release
> branch, because I intend to release Emacs 28.1 VSN.  We can make a
> cleaner fix on master later.

The other patch with the separate function only called by
dired-clean-up-after-deletion is equivalent and safer than the
modification of dired-buffers-for-dir which is called in many places.
In the worst case, we have a cleanup problem after directory deletion.

> Do you think this patch you posted is safe enough for Emacs 28.1?

Yes, but I'd very much prefer to use the newer patch from my mail some
minutes ago for the reasons explained above.

Bye,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 16:31:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 12:31:41 2022
Received: from localhost ([127.0.0.1]:36766 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZbET-0007v6-1y
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:31:41 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33452)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tsdh@HIDDEN>) id 1nZbER-0007pa-0O
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:31:39 -0400
Received: from [2001:470:142:3::e] (port=39016 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 <tsdh@HIDDEN>)
 id 1nZbEL-0001FQ-Jo; Wed, 30 Mar 2022 12:31:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From:
 References; bh=8/qydUdW0okOcFHHbXz40s0LYKrYHXcrnL++TGB9sJs=; b=KYqF0J3NLS9yJ4
 GRTkSIG1m/Smnn6ltLSDRHF6Hxin6LcfHUlH9rbRJkeCNxpJcp/Y2yg+PWOBrh+J6sL6W1uLTiVnE
 KR/1uiMI64s41PcoTlkj/JkfVTs2vV2AlbihqDtqQzcAXgVRQH+grTCmDgRgFyGmW0wQwlOXDUUCb
 XxfX7o5817fdkxBQ091YVk6oatKqgPdqzfkczBsYC99tVxILyE5p21X8OKoWrqBoLSFrnc88AO3Oz
 cHbKpwim0ZejxnsxusHkn5+yJjXBKXIpP+5RPrKqLksM+kOqtqdvc/1KXUcvZRmDkQCjwjVPT9SEd
 ukZ0RaPfGbiqe2Cz6igg==;
Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:48811)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <tsdh@HIDDEN>)
 id 1nZbEL-0000gu-95; Wed, 30 Mar 2022 12:31:33 -0400
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailauth.nyi.internal (Postfix) with ESMTP id 1945627C0054;
 Wed, 30 Mar 2022 12:31:31 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Wed, 30 Mar 2022 12:31:31 -0400
X-ME-Sender: <xms:4oVEYkczTP1tamJMF9vqQw9ME-1WrBPR-F2-nWg6_FsysZpXb-sZNQ>
 <xme:4oVEYmO77W4FLEUpi4cKn23gX78YJX9Ott_WBBhvGjkB_zZ8meAuGZM2Ln22XI9xL
 jEGGtrQMuv-OA>
X-ME-Received: <xmr:4oVEYlgTOGKPe9eWTZ_WRclpPi6uSLrhkPNtnKDjJhnyrYNc1VMPFZtQY-7dAQ23-1XW0OB9HimWUQVigFltMehWYtHMKxAK>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeivddguddtudcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpehffgfhvffuffgjkfggtgesmhdtreertdertdenucfhrhhomhepvfgrshhs
 ihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpe
 evfeevhfejkeeikeeuleejveejgffhffdtffdutdevtddtueefveffvdefudfhheenucev
 lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnod
 hmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedv
 leekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm
X-ME-Proxy: <xmx:4oVEYp-4RJ1igGwRc00cA3aAkuU181oLm6qy-2y1oNSjfZjCiaFaCA>
 <xmx:4oVEYgs6-QSspWY81G4qdP0b47Nj84N8Yss3nk8mn8059rpDXmDEvg>
 <xmx:4oVEYgE1TpXP34-KhtJgh5YSAtcqi7pj2oXyFEE0eqkUTKGGkfJAIw>
 <xmx:44VEYtWY2H9a6xASGmQ4ghYYoL2btE5KKe-Y-H6fEFJMqVNTSHyagw>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 30 Mar 2022 12:31:29 -0400 (EDT)
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN> <835ynv8ti4.fsf@HIDDEN> <87k0cb1rpa.fsf@HIDDEN>
 <831qyj8rxl.fsf@HIDDEN> <87czi31p1l.fsf@HIDDEN> <83zgl7780z.fsf@HIDDEN>
 <878rsr1kss.fsf@HIDDEN>
User-agent: mu4e 1.7.12; emacs 29.0.50
From: Tassilo Horn <tsdh@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
Date: Wed, 30 Mar 2022 18:29:29 +0200
In-reply-to: <878rsr1kss.fsf@HIDDEN>
Message-ID: <874k3f1jxb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Tassilo Horn <tsdh@HIDDEN> writes:

> I think my patch is valid but now I think I should just create a
> separate function dired-buffers-for-cleanup and use that from
> dired-clean-up-after-deletion (or just collect the buffers in that
> function) and remove the SUBDIRS argument from dired-buffers-for-dir
> as it changes its logic too drastically.
>
> I'll prepare a patch in that direction later.

Here it is:


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=dired2.patch

diff --git a/lisp/dired.el b/lisp/dired.el
index 75dcd33e67..89b81ca0db 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2870,12 +2870,10 @@ dired-copy-filename-as-kill
 
 ;;; Keeping Dired buffers in sync with the filesystem and with each other
 
-(defun dired-buffers-for-dir (dir &optional file subdirs)
+(defun dired-buffers-for-dir (dir &optional file)
   "Return a list of buffers for DIR (top level or in-situ subdir).
 If FILE is non-nil, include only those whose wildcard pattern (if any)
 matches FILE.
-If SUBDIRS is non-nil, also include the dired buffers of
-directories below DIR.
 The list is in reverse order of buffer creation, most recent last.
 As a side effect, killed dired buffers for DIR are removed from
 `dired-buffers'."
@@ -2889,8 +2887,7 @@ dired-buffers-for-dir
 	(setq dired-buffers (delq elt dired-buffers)))
        ((dired-in-this-tree-p dir (car elt))
 	(with-current-buffer buf
-          (when (and (or subdirs
-                         (assoc dir dired-subdir-alist))
+          (when (and (assoc dir dired-subdir-alist)
 	             (or (null file)
 		         (if (stringp dired-directory)
 		             (let ((wildcards (file-name-nondirectory
@@ -2903,6 +2900,22 @@ dired-buffers-for-dir
             (setq result (cons buf result)))))))
     result))
 
+(defun dired-buffers-for-dir-or-subdir (dir)
+  "Return a list of buffers for DIR or a subdirectory thereof.
+As a side effect, killed dired buffers for DIR are removed from
+`dired-buffers'."
+  (setq dir (file-name-as-directory dir))
+  (let (result buf)
+    (dolist (elt dired-buffers)
+      (setq buf (cdr elt))
+      (cond
+       ((null (buffer-name buf))
+	;; Buffer is killed - clean up:
+	(setq dired-buffers (delq elt dired-buffers)))
+       ((dired-in-this-tree-p (car elt) dir)
+        (setq result (cons buf result)))))
+    result))
+
 (defun dired-glob-regexp (pattern)
   "Convert glob-pattern PATTERN to a regular expression."
   (let ((matched-in-pattern 0)  ;; How many chars of PATTERN we've handled.
@@ -3479,15 +3492,16 @@ dired-clean-up-after-deletion
                                      (file-name-nondirectory fn))))
                (not dired-clean-confirm-killing-deleted-buffers))
            (kill-buffer buf)))
-    (let ((buf-list (dired-buffers-for-dir (expand-file-name fn)
-                                           nil 'subdirs)))
+    (let ((buf-list (dired-buffers-for-dir-or-subdir
+                     (expand-file-name fn))))
       (and buf-list
            (or (and dired-clean-confirm-killing-deleted-buffers
                     (y-or-n-p
                      (format
-                      (ngettext "Kill Dired buffer of %s, too? "
-                                "Kill Dired buffers of %s, too? "
-                                (length buf-list))
+                      (ngettext
+                       "Kill Dired buffer of %s, too? "
+                       "Kill Dired buffers of %s and its sub-directories, too? "
+                       (length buf-list))
                       (file-name-nondirectory
                        ;; FN may end in a / if `dired-listing-switches'
                        ;; contains -p, so we need to strip that

--=-=-=
Content-Type: text/plain


I think that's a better approach than changing dired-buffers-for-dir
which I shouldn't have done in the first place.

Bye,
Tassilo

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.
Merged 51486 54636. Request was from Filipp Gunbin <fgunbin@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 16:30:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 12:30:46 2022
Received: from localhost ([127.0.0.1]:36754 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZbDa-00077M-8H
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:30:46 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33086)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1nZbDX-0006yj-OH
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:30:44 -0400
Received: from [2001:470:142:3::e] (port=38986 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 <eliz@HIDDEN>)
 id 1nZbDR-00015J-VM; Wed, 30 Mar 2022 12:30:37 -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=ed5iVdqrYNQEi08xYej/hu7aIcyMKkvd95uij+yvyxQ=; b=G3UEwTm/dTKJ
 Dijt33zmFVC826Pi4nlJ1/Yupqjpmwyauq7g8MoYMKmARk0Y0gG/j0b3sN9yGJtYoUFWOKfERqaCe
 n8vzGYYnqmKvLyMLb/+dx9IZrslZBA2JDWfmesZKC+M71UfCUA18veXPGtuwEEns1EsC/uPSgARFM
 kkA30Yjr/XZCdlCgXJEAognXKyLTmlVDKvTXZmObfHms0DhCfzmYBXjW4stTeSGTlqjHLCKg//imJ
 t1gTpTbnk85lNg2kP4+dyKDmk9efJR76wAs9l3BPfrhDIn93cczgIy+96TuRksc417suWfyLfi17w
 F4UlHkH3YHJySyAkjCl9cw==;
Received: from [87.69.77.57] (port=4659 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nZbD2-0005JD-PZ; Wed, 30 Mar 2022 12:30:34 -0400
Date: Wed, 30 Mar 2022 19:30:20 +0300
Message-Id: <83y20r768z.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Tassilo Horn <tsdh@HIDDEN>
In-Reply-To: <878rsr1kss.fsf@HIDDEN> (message from Tassilo Horn on Wed, 30
 Mar 2022 18:02:15 +0200)
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN> <835ynv8ti4.fsf@HIDDEN> <87k0cb1rpa.fsf@HIDDEN>
 <831qyj8rxl.fsf@HIDDEN> <87czi31p1l.fsf@HIDDEN> <83zgl7780z.fsf@HIDDEN>
 <878rsr1kss.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Tassilo Horn <tsdh@HIDDEN>
> Cc: schwab@HIDDEN, 54636 <at> debbugs.gnu.org
> Date: Wed, 30 Mar 2022 18:02:15 +0200
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > So when will SUBDIRS be non-nil?  dired-clean-up-after-deletion is
> > called not only when a directory is deleted, I think.
> 
> Yes, it's also called when deleting a file but in that case
> dired-buffers-for-dir will return nil, so no buffer will be deleted.

What about moving/renaming a directory?

> I think my patch is valid but now I think I should just create a
> separate function dired-buffers-for-cleanup and use that from
> dired-clean-up-after-deletion (or just collect the buffers in that
> function) and remove the SUBDIRS argument from dired-buffers-for-dir as
> it changes its logic too drastically.
> 
> I'll prepare a patch in that direction later.

At this point, I'd prefer the safest, simplest patch for the release
branch, because I intend to release Emacs 28.1 VSN.  We can make a
cleaner fix on master later.

Do you think this patch you posted is safe enough for Emacs 28.1?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.
Disconnected #54636 from all other report(s). Request was from Filipp Gunbin <fgunbin@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 51486 54636. Request was from Filipp Gunbin <fgunbin@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 16:12:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 12:12:49 2022
Received: from localhost ([127.0.0.1]:36714 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZawC-0005rz-Py
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:12:49 -0400
Received: from eggs.gnu.org ([209.51.188.92]:56092)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tsdh@HIDDEN>) id 1nZawB-0005rm-4Y
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 12:12:47 -0400
Received: from [2001:470:142:3::e] (port=38534 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 <tsdh@HIDDEN>)
 id 1nZaw4-00019l-RL; Wed, 30 Mar 2022 12:12:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From:
 References; bh=BGy8zmdrT2hi6IfMRFF6SIyIeO0svpdLc4VEP7ENzSM=; b=V3GF0ZwpS8PDPt
 IY4aGxvfVzf2wD13HG8Bp0XfTtxgUjicr5lz95443XhxyrCCFxwGo6dl1t4xM9FQ+3jiqnbg88oao
 4NcfqywcElWvapP8160lUurEfbfW73ZjyMUkiEYyUo4mM38IkSsvnzDN0xJIqWhMadUUvUbwV/zD9
 eeMAoCjX06UMUooNL+XOWFLizto1bAtFeEdIDGpW5EVClEbn0NHPLe4qBb891ircSjV0XrBxliP8t
 uCA8+n0JQ2q0bMvG4oooPEvNSA9NwCzf+2EB3bATvpmTKb/gHOSWFfsoNuCrqg3PBTB0J+C+MM8YE
 3+hhJAKfzrf4/MwgiM6Q==;
Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:56907)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <tsdh@HIDDEN>)
 id 1nZaw3-000576-82; Wed, 30 Mar 2022 12:12:40 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailauth.nyi.internal (Postfix) with ESMTP id 96A4727C005B;
 Wed, 30 Mar 2022 12:12:38 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Wed, 30 Mar 2022 12:12:38 -0400
X-ME-Sender: <xms:doFEYs9erxNH2TrLhF1ey2TfYcb_80653hZw0nbPVjB9JTU7nThPRQ>
 <xme:doFEYkt0oyHaXQjfQiVFUq6gDkN1tEnHGuD5aqj6KrCdhaEQl-K6CLuG1pSVw2qKn
 WP-xJAvshKFpA>
X-ME-Received: <xmr:doFEYiA-mGMPHod-mQsTIIQ4RRtVu__CQs9tBH1GtfognFtfbLv5pu76cSklCWpxmOh8O4NxEAgzpgyKgbpSOt-PAsOpYNTn>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeivddgleekucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepfhgfhffvufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi
 lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepve
 evieekteekveeigfefffeivdetgeduvdffueeuudevgedttdehvdfhueevfffhnecuvehl
 uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomh
 gvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdel
 kedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh
X-ME-Proxy: <xmx:doFEYsefBnqWcY4ZQ3nd1M8LsX7l6CX9JQVnnqAHNfDo50BkG0fK1g>
 <xmx:doFEYhOWFgIHw9GS_nKjrIIBQQ3Q9VF8IY3qcnnUI0ixsn_BUR3X-A>
 <xmx:doFEYmmU3YKER18QXUfj1EhFUlakEOk1b9ianP-7QhAw94KfEY9DDQ>
 <xmx:doFEYv08MaR7JFpEiGVN_O2G0h3DW0A_fbEzwVCdMtvqtTyzkHksDA>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 30 Mar 2022 12:12:37 -0400 (EDT)
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN> <835ynv8ti4.fsf@HIDDEN> <87k0cb1rpa.fsf@HIDDEN>
 <831qyj8rxl.fsf@HIDDEN> <87czi31p1l.fsf@HIDDEN> <83zgl7780z.fsf@HIDDEN>
User-agent: mu4e 1.7.12; emacs 29.0.50
From: Tassilo Horn <tsdh@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
Date: Wed, 30 Mar 2022 18:02:15 +0200
In-reply-to: <83zgl7780z.fsf@HIDDEN>
Message-ID: <878rsr1kss.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Tassilo Horn <tsdh@HIDDEN>
>> Cc: schwab@HIDDEN, 54636 <at> debbugs.gnu.org
>> Date: Wed, 30 Mar 2022 16:30:22 +0200
>> 
>> Here's a patch.  I've created a separate cond-arm for the SUBDIRS case,
>> so any callers which are not dired-clean-up-after-deletion (the only one
>> setting SUBDIRS) are not affected.
>
> Thanks.
>
> So when will SUBDIRS be non-nil?  dired-clean-up-after-deletion is
> called not only when a directory is deleted, I think.

Yes, it's also called when deleting a file but in that case
dired-buffers-for-dir will return nil, so no buffer will be deleted.
Probably, I shouldn't even bother to call it if a file has been deleted.

I think my patch is valid but now I think I should just create a
separate function dired-buffers-for-cleanup and use that from
dired-clean-up-after-deletion (or just collect the buffers in that
function) and remove the SUBDIRS argument from dired-buffers-for-dir as
it changes its logic too drastically.

I'll prepare a patch in that direction later.

Bye,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 15:51:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 11:51:58 2022
Received: from localhost ([127.0.0.1]:36695 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZac2-0005MP-07
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 11:51:58 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50826)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1nZac0-0005M8-Id
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 11:51:57 -0400
Received: from [2001:470:142:3::e] (port=37678 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 <eliz@HIDDEN>)
 id 1nZabt-00064l-O7; Wed, 30 Mar 2022 11:51:50 -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=cyrpBEE0qE91HtmDCcfkcrdUStJ/hn/tqOhZOJ1nTK8=; b=gOy5yC19vHLz
 nAGZ6mDNg8SrMmey58BA1UUW7vafRuJyW99poE2c+Q4chaI0rLcdUdc9SrcNDJmXPk6hcLfLsv0Zm
 Tpz8axlzHprQTxUAb+XIj2Ch049aj2sIX5MOvPAWx1J9e2OtTZIuRBP5uiie6SoCg8Y8oVSFVHEne
 QHBQT0IHKnm5d0hmW41ru3Xe5I5GCgG1O3BObJPCipJ8tlBipC7VLISenR6hm4C9AV/7qVysnX9i8
 J1Gis5/g+7Voba+EKKtYFpcPYKIQQrstZQkqjS3HQnoJopnUeat5DTmQet/7mCnMiCo3exCIy3TF0
 T8zLbedbV5tCSObyc4tQew==;
Received: from [87.69.77.57] (port=1893 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nZabs-0008HA-Qv; Wed, 30 Mar 2022 11:51:49 -0400
Date: Wed, 30 Mar 2022 18:51:56 +0300
Message-Id: <83zgl7780z.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Tassilo Horn <tsdh@HIDDEN>
In-Reply-To: <87czi31p1l.fsf@HIDDEN> (message from Tassilo Horn on Wed, 30
 Mar 2022 16:30:22 +0200)
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN> <835ynv8ti4.fsf@HIDDEN> <87k0cb1rpa.fsf@HIDDEN>
 <831qyj8rxl.fsf@HIDDEN> <87czi31p1l.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Tassilo Horn <tsdh@HIDDEN>
> Cc: schwab@HIDDEN, 54636 <at> debbugs.gnu.org
> Date: Wed, 30 Mar 2022 16:30:22 +0200
> 
> Here's a patch.  I've created a separate cond-arm for the SUBDIRS case,
> so any callers which are not dired-clean-up-after-deletion (the only one
> setting SUBDIRS) are not affected.

Thanks.

So when will SUBDIRS be non-nil?  dired-clean-up-after-deletion is
called not only when a directory is deleted, I think.

Andreas, could you perhaps also try this patch and see if you have any
problems in your use cases?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 14:41:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 10:41:07 2022
Received: from localhost ([127.0.0.1]:36665 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZZVS-0003W8-Pr
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 10:41:07 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60322)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tsdh@HIDDEN>) id 1nZZVQ-0003VX-Sz
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 10:41:05 -0400
Received: from [2001:470:142:3::e] (port=36216 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 <tsdh@HIDDEN>)
 id 1nZZVL-0004Ql-26; Wed, 30 Mar 2022 10:40:59 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From:
 References; bh=1QkqeuY+SA08WYSmYzQLP2KSNl1JyhvOY4PBUSqujSg=; b=S55vbbaxrGjRNJ
 zy7aZoR9xJOZFmwsPS/aOIO/mnXmu0UhOSp+zOPFWsLaY/V/l9tqv4CsrdYl0/xePeoSYoZ6golId
 0lj3FgqxoSWQYehlPema07zqodUchvgZbgRGdPtcb8TzTzfJYFcqD6GniN3/bpT7b6RoyV0uMBfkf
 WbWMmCLwN7XefoZyN+WZcVmD/9+s4muNzLoeSjCBPxjnnXX9h9lqqV3iu0h5/VErmY9A3Tmm+GS/i
 dZZoCLWx2PGJVp5ntBBKN3fUCOpUVDlesZfd1T7ciU4RVL1nJsSD2UB2IYtjSLHs3LkiwZ77pI7wg
 rUfvijYBMYrc9KmpS+8w==;
Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:51363)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <tsdh@HIDDEN>)
 id 1nZZVK-0003UN-H7; Wed, 30 Mar 2022 10:40:58 -0400
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailauth.nyi.internal (Postfix) with ESMTP id E712D27C005A;
 Wed, 30 Mar 2022 10:40:56 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute5.internal (MEProxy); Wed, 30 Mar 2022 10:40:56 -0400
X-ME-Sender: <xms:-GtEYgJY6Jxiu7YCmb7000rvOryhBywoLRCNgDgHt3TnvHK3aRV2dw>
 <xme:-GtEYgJhzbNkP7ZgVFhsjfAGa-BwK21OffcARWPVw46e9FIJRUb8mwHVSM7B4Wk_8
 wQsmU9dRLKXbg>
X-ME-Received: <xmr:-GtEYgty0jSoA0stvtILVW-Uhc_f5mme92rXJKaZCUzyi5I1QUPd4MD01aRuyEGxuCFzd4S2AXsUdXZt1OVVq9hABCsUdjw9>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeivddgjeelucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepfhgfhffvufffjgfkgggtsehmtderredtredtnecuhfhrohhmpefvrghsshhi
 lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepve
 efvefhjeekieekueeljeevjefghffftdffuddtvedttdeufeevffdvfeduhfehnecuvehl
 uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomh
 gvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdel
 kedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh
X-ME-Proxy: <xmx:-GtEYtbcF4GAU2lApcNViAT4jopvgV5FGzgPBcTrqo5SGfjB3Kq6Ww>
 <xmx:-GtEYnYPHc07-u8Ycxt9le5ljTYX9ytJmBoH9YtqtIO4sTRo4NnPOQ>
 <xmx:-GtEYpA18oarCStolGNyeh-ad_0ByN0mRlp2fpaz-jXmhinUZpevHQ>
 <xmx:-GtEYuxsgWawKAKlUQUUcQaZd03CZFIDGniGBiEnmGJZtXDOFVYx7w>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 30 Mar 2022 10:40:56 -0400 (EDT)
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN> <835ynv8ti4.fsf@HIDDEN> <87k0cb1rpa.fsf@HIDDEN>
 <831qyj8rxl.fsf@HIDDEN>
User-agent: mu4e 1.7.12; emacs 29.0.50
From: Tassilo Horn <tsdh@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
Date: Wed, 30 Mar 2022 16:30:22 +0200
In-reply-to: <831qyj8rxl.fsf@HIDDEN>
Message-ID: <87czi31p1l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Eli Zaretskii <eliz@HIDDEN> writes:

Hi Eli,

>> > 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.

That's true.

>> 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.

It's still a major annoyance since the feature is not opt-in.

> Regressions in previously correct behavior are much worse.

Of course.

> 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.

Here's a patch.  I've created a separate cond-arm for the SUBDIRS case,
so any callers which are not dired-clean-up-after-deletion (the only one
setting SUBDIRS) are not affected.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=dired.patch

diff --git a/lisp/dired.el b/lisp/dired.el
index 75dcd33e67..972a0865f4 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2874,8 +2874,9 @@ dired-buffers-for-dir
   "Return a list of buffers for DIR (top level or in-situ subdir).
 If FILE is non-nil, include only those whose wildcard pattern (if any)
 matches FILE.
-If SUBDIRS is non-nil, also include the dired buffers of
-directories below DIR.
+If SUBDIRS is non-nil, include the dired buffers of DIR and the
+directories below DIR instead (but no dired buffers with in-situ
+subdir DIR).
 The list is in reverse order of buffer creation, most recent last.
 As a side effect, killed dired buffers for DIR are removed from
 `dired-buffers'."
@@ -2887,10 +2888,9 @@ dired-buffers-for-dir
        ((null (buffer-name buf))
 	;; Buffer is killed - clean up:
 	(setq dired-buffers (delq elt dired-buffers)))
-       ((dired-in-this-tree-p dir (car elt))
+       ((and (null subdirs) (dired-in-this-tree-p dir (car elt)))
 	(with-current-buffer buf
-          (when (and (or subdirs
-                         (assoc dir dired-subdir-alist))
+          (when (and (assoc dir dired-subdir-alist)
 	             (or (null file)
 		         (if (stringp dired-directory)
 		             (let ((wildcards (file-name-nondirectory
@@ -2900,7 +2900,9 @@ dired-buffers-for-dir
                                                    file)))
 		           (member (expand-file-name file dir)
 			           (cdr dired-directory)))))
-            (setq result (cons buf result)))))))
+            (setq result (cons buf result)))))
+       ((and subdirs (dired-in-this-tree-p (car elt) dir))
+        (setq result (cons buf result)))))
     result))
 
 (defun dired-glob-regexp (pattern)

--=-=-=
Content-Type: text/plain


Can we agree it is safe enough?

Bye,
Tassilo

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 13:56:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 09:56:42 2022
Received: from localhost ([127.0.0.1]:36628 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZYoT-0002NX-Qf
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 09:56:42 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49250)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1nZYoS-0002NL-Ll
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 09:56:41 -0400
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 <eliz@HIDDEN>)
 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==;
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 <eliz@HIDDEN>)
 id 1nZYoJ-0001HH-KO; Wed, 30 Mar 2022 09:56:34 -0400
Date: Wed, 30 Mar 2022 16:56:38 +0300
Message-Id: <831qyj8rxl.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Tassilo Horn <tsdh@HIDDEN>
In-Reply-To: <87k0cb1rpa.fsf@HIDDEN> (message from Tassilo Horn on Wed, 30
 Mar 2022 15:29:36 +0200)
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN> <835ynv8ti4.fsf@HIDDEN> <87k0cb1rpa.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Tassilo Horn <tsdh@HIDDEN>
> Cc: schwab@HIDDEN, 54636 <at> debbugs.gnu.org
> Date: Wed, 30 Mar 2022 15:29:36 +0200
> 
> Eli Zaretskii <eliz@HIDDEN> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 13:43:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 09:43:42 2022
Received: from localhost ([127.0.0.1]:34828 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZYbt-0001ZD-W2
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 09:43:42 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45672)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tsdh@HIDDEN>) id 1nZYbr-0001Z1-RF
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 09:43:40 -0400
Received: from [2001:470:142:3::e] (port=34554 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 <tsdh@HIDDEN>)
 id 1nZYbl-000138-N7; Wed, 30 Mar 2022 09:43:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From:
 References; bh=ZdZCpcUSz8BNGPRNa5NqsFOabg/afmIrul8rpDWKxcU=; b=IyIXg7Itf/3vsT
 3yHtpy3316nVS5RcYpRWAQ3B/ccV8E3xVRlV70f8DvqInU78exXU9JvnWwpdad2XlDsAkApPikpAj
 ZcqJmZ+3sCNeA87g+vr+kcl56f4CWVAhuoE5PSICX21skfGCRF3X7J6R6gxkyvHDa8nuSBALb7789
 xZ7Zi3h8g+5qSMKObtgBlAwJdc65f2+JDYl4vCYUGObl4iRVIxhTX7Y5vV6qgiugNVdXu8w2Wa2M/
 eSnFpaDsrI+3XzTfL8IyX1qrA2hlJoa0wuf3NKsC7nYBzmFXjz4lvOuDWBKGzto/WCJc05rJkMlK3
 TxOwg0OypzNasU0qUK/A==;
Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:52665)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <tsdh@HIDDEN>)
 id 1nZYbk-00086G-DN; Wed, 30 Mar 2022 09:43:33 -0400
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailauth.nyi.internal (Postfix) with ESMTP id 10BD627C0054;
 Wed, 30 Mar 2022 09:43:32 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Wed, 30 Mar 2022 09:43:32 -0400
X-ME-Sender: <xms:g15EYqKavfwz0mzclNRWg7d62K6lpnUwkkPQoNOfM4F_bt9-zFmNzQ>
 <xme:g15EYiJ_9kbeqPCTN6JOIafVb5DBBupZQZ9ONjEmSuHe9VojOeqZOnv_3_Hjv26fP
 bjmQd_OPd1L8g>
X-ME-Received: <xmr:g15EYqsF5VMjKPMel3d18tngKlwUOF-7WT7C2vBZqPlY_FDHikwKEB1WqTxfs_mUjSWtKFuP-1sopcOWD0LZ_LBJrRmkdX40>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeivddgieekucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepfhgfhffvufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi
 lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepve
 evieekteekveeigfefffeivdetgeduvdffueeuudevgedttdehvdfhueevfffhnecuvehl
 uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomh
 gvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdel
 kedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh
X-ME-Proxy: <xmx:g15EYvZ3IkQhVsp7aOmMTVSlYoaTSeiOiO7bccVYApalliwb-0rSKg>
 <xmx:g15EYhbcfyEoRn7alVLQKVRlBB6uU4qLArRvJCttIjL0w-KrR0BF6w>
 <xmx:g15EYrAVW5yte_C3lDqNy7Gulrim8VNtuM5QqN0z3k_ooMcof8u17g>
 <xmx:hF5EYgxM2GwSkwK1rak2w5lgrEi0gUdON5BZBQiiVE7QmWRSlzBZOw>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 30 Mar 2022 09:43:31 -0400 (EDT)
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN> <835ynv8ti4.fsf@HIDDEN>
User-agent: mu4e 1.7.12; emacs 29.0.50
From: Tassilo Horn <tsdh@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
Date: Wed, 30 Mar 2022 15:29:36 +0200
In-reply-to: <835ynv8ti4.fsf@HIDDEN>
Message-ID: <87k0cb1rpa.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> 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.  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.

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.)

Bye,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 13:22:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 09:22:45 2022
Received: from localhost ([127.0.0.1]:34796 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZYHd-0000wC-Eu
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 09:22:45 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41452)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1nZYHb-0000vy-O6
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 09:22:44 -0400
Received: from [2001:470:142:3::e] (port=34116 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 <eliz@HIDDEN>)
 id 1nZYHV-00049T-Jw; Wed, 30 Mar 2022 09:22:38 -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=kXu5bSnod49r5ES1+rQdUOW9BuJWCotrVZ5ejStJ9nQ=; b=RzktMorfXWoa
 cTk1odrn91pd8FKIfTt3kGm40l8idquHMCykFlgbPv8Iimf/LKLbxzCdjb0NnT9+qTXd6Y/ILMSeB
 Ftv6FX7gfv87dDop/3b6QiUlU9MuVUv0o7Gjt2tf3t1ydW/OvvAUOpiIGDUH0sAEog8mnYpjqYzRX
 ykURegw0LfLqxMqHsh60GWh8ERZz75+buLhjkw8vLIySyUBtrOgbEOnGvUexVY4q8x1oRHHqjcKf8
 IMlF1VNRFh4Vfodqi1irGpcPdkKfzZ9iWYQGMVutAgjWxerkU9flsoMfp6XS59w4MGhTJNOuV3Noe
 5QTAdHMGDsB5k5IPY/rlXw==;
Received: from [87.69.77.57] (port=4500 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nZYHT-0002ym-TD; Wed, 30 Mar 2022 09:22:36 -0400
Date: Wed, 30 Mar 2022 16:22:43 +0300
Message-Id: <835ynv8ti4.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Tassilo Horn <tsdh@HIDDEN>
In-Reply-To: <87o81n1ue5.fsf@HIDDEN> (message from Tassilo Horn on Wed, 30
 Mar 2022 14:43:22 +0200)
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
 <87o81n1ue5.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org, schwab@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Tassilo Horn <tsdh@HIDDEN>
> Cc: 54636 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
> Date: Wed, 30 Mar 2022 14:43:22 +0200
> 
> Andreas Schwab <schwab@HIDDEN> writes:
> 
> > Broken by 7b50ed553f Ask if dir and subdir dired buffers be killed
> > when deleting dir.

Thanks for the bisection, Andreas, it made finding the culprit very
easy.

> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 12:45:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 08:45:42 2022
Received: from localhost ([127.0.0.1]:34767 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZXhl-0008QD-Up
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 08:45:42 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33662)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tsdh@HIDDEN>) id 1nZXhk-0008Q1-65
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 08:45:40 -0400
Received: from [2001:470:142:3::e] (port=33318 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 <tsdh@HIDDEN>)
 id 1nZXhd-0005So-99; Wed, 30 Mar 2022 08:45:34 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From:
 References; bh=yyClObZk/PeabdmtUtcxcLDDXh39pnRcVmyH9YNccJk=; b=Acaf225Av3QDHB
 uaIFvSZfpIC34Xsfe5TGswu1r5mn6+HLdXuXt6ahthN1lGvUGz5bWgJcdduoh3MT4InnAtB2VieWf
 PQ/5yjVR5NwjW8HXzDUmH5l5a8eek70E2n9Dyr1fiaifV9qgdWYowE01Ld1ZXa4OhCwUbDcRIq/Pg
 vwOYln/LHSRIB4SyDIDOvqTY/yJ9Q+ACFImad6iYrlcfzJ58UXyZpF/7fpsqtNFN7lb0JSDxuCMUP
 5EvEb93HyoLuKk4Cm1qLCMmJLfJpkiypb0hT9tTZaGW6uvVaXv3RoF8wkUFGzsp+3smvblNiyZ5rY
 Jmk6PcWyoEdGExHZaVlQ==;
Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:52853)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <tsdh@HIDDEN>)
 id 1nZXhZ-0004Iu-Sw; Wed, 30 Mar 2022 08:45:32 -0400
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailauth.nyi.internal (Postfix) with ESMTP id 344CE27C0064;
 Wed, 30 Mar 2022 08:45:25 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute3.internal (MEProxy); Wed, 30 Mar 2022 08:45:25 -0400
X-ME-Sender: <xms:5FBEYk3t08YM0vIHAy3Wg0HV7xM5RVyH5MceqyUFqKfY9qMxKDwJFg>
 <xme:5FBEYvFTYeDPj5z0Pk6ycLhqEMvydDYHO1KlS01Gxzzfs-LgnlMNcAy7iBgGaZ7iQ
 Suv7ppoLCQ90w>
X-ME-Received: <xmr:5FBEYs6bZ1LzdEfWia9KfuOEY2MoQkukjeCmMrhAWnpc0CnVfJ_vPc9Fb75kptSSnerSlF9dUCT9bnWiujIKkrURmotHM2Pj>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeivddgheejucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepfhgfhffvufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi
 lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepve
 evieekteekveeigfefffeivdetgeduvdffueeuudevgedttdehvdfhueevfffhnecuvehl
 uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomh
 gvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdel
 kedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh
X-ME-Proxy: <xmx:5VBEYt3W47apGctZINxcKXIEiINZ4jWkkOeWmXiJdfkOi0LP3ISTPQ>
 <xmx:5VBEYnHODIgsGe3Z1yMRXV4JmJyYEaZir_L0lIaukp2TqWfMUWif0g>
 <xmx:5VBEYm8IAD5dM35uqTO0cnqhgNfTfLlruwxjpHwixPqA8JxTKdJn7A>
 <xmx:5VBEYtMAGoJSZh1blBPN4hms3jtd1oFMWFy4zmXbjKhYsoLXNSTsQg>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 30 Mar 2022 08:45:24 -0400 (EDT)
References: <877d8b3d4w.fsf@HIDDEN> <87y20r1vys.fsf@HIDDEN>
User-agent: mu4e 1.7.12; emacs 29.0.50
From: Tassilo Horn <tsdh@HIDDEN>
To: Andreas Schwab <schwab@HIDDEN>
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
Date: Wed, 30 Mar 2022 14:43:22 +0200
In-reply-to: <87y20r1vys.fsf@HIDDEN>
Message-ID: <87o81n1ue5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: Eli Zaretskii <eliz@HIDDEN>, 54636 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Andreas Schwab <schwab@HIDDEN> writes:

> Broken by 7b50ed553f Ask if dir and subdir dired buffers be killed
> when deleting dir.

Oh, sorry, I'll look into it ASAP.  I guess this is to be corrected in
emacs-28?

Bye,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 12:11:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 08:11:27 2022
Received: from localhost ([127.0.0.1]:34726 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZXAd-0007Xz-0i
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 08:11:27 -0400
Received: from mail-out.m-online.net ([212.18.0.10]:54851)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <whitebox@HIDDEN>) id 1nZXAc-0007Xr-4u
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 08:11:26 -0400
Received: from frontend01.mail.m-online.net (unknown [192.168.8.182])
 by mail-out.m-online.net (Postfix) with ESMTP id 4KT4zJ6Qgbz1s94f;
 Wed, 30 Mar 2022 14:11:24 +0200 (CEST)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.70])
 by mail.m-online.net (Postfix) with ESMTP id 4KT4zJ4B9Yz1qqkB;
 Wed, 30 Mar 2022 14:11:24 +0200 (CEST)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.182])
 by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,
 port 10024)
 with ESMTP id UB8K3hZcn6r5; Wed, 30 Mar 2022 14:11:24 +0200 (CEST)
X-Auth-Info: J+db+b/lDYipnlz5RamCirHcgClnbw7bX+2xm68nBG2Hype2j+Ar4ScMCJurpkPQ
Received: from igel.home (ppp-46-244-187-231.dynamic.mnet-online.de
 [46.244.187.231])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.mnet-online.de (Postfix) with ESMTPSA;
 Wed, 30 Mar 2022 14:11:24 +0200 (CEST)
Received: by igel.home (Postfix, from userid 1000)
 id 974722C398A; Wed, 30 Mar 2022 14:11:23 +0200 (CEST)
From: Andreas Schwab <schwab@HIDDEN>
To: 54636 <at> debbugs.gnu.org
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
References: <877d8b3d4w.fsf@HIDDEN>
X-Yow: Sorry, wrong ZIP CODE!!
Date: Wed, 30 Mar 2022 14:11:23 +0200
In-Reply-To: <877d8b3d4w.fsf@HIDDEN> (Andreas Schwab's message of "Wed, 30
 Mar 2022 13:15:11 +0200")
Message-ID: <87y20r1vys.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.92 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 54636
Cc: Tassilo Horn <tsdh@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

Broken by 7b50ed553f Ask if dir and subdir dired buffers be killed when
deleting dir.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at 54636 <at> debbugs.gnu.org:


Received: (at 54636) by debbugs.gnu.org; 30 Mar 2022 12:03:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 08:03:07 2022
Received: from localhost ([127.0.0.1]:34718 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZX2Y-0007LM-UE
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 08:03:07 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52832)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1nZX2W-0007Kt-SU
 for 54636 <at> debbugs.gnu.org; Wed, 30 Mar 2022 08:03:05 -0400
Received: from [2001:470:142:3::e] (port=60412 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 <eliz@HIDDEN>)
 id 1nZX2R-0000Om-1j; Wed, 30 Mar 2022 08:02:59 -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=Z8zmF9g3WrEmpk5xhqboJygt7G33KiIrkFBuyZTXxVM=; b=Fl4ylelzf43N
 8LxF0Ioa1dlUXFBLgMTiv+zZ6wZ2V8IdLbE3h8BwMeAtABg6gig4wAJoAjkBcZ+kgtscEf+DzIFQ2
 cGw/0X60IEly4ax3lB0rPawwXA03gfTyyi2MzQQMvj+3yxVvkO9sV7A0yOIWOKrYpU8x2AMAX3bKp
 hJy4FoLBtSX0Pdyp/bFFFVvWtKh33dSHoaRAtGCfOQjoEuWMjR4CoPDjLXShUkZMDjCV404DWJRZo
 TF9R56dnqhNl+7uHLrjxEy/LVy7EcIWiHU+i7I5e+59XYAeidLPLFJQKrdSl1Ux1cciXZm6SKC/Wl
 ehDMFJ5UHjPzVtFkElkhnA==;
Received: from [87.69.77.57] (port=3537 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nZX2Q-0005fK-CZ; Wed, 30 Mar 2022 08:02:58 -0400
Date: Wed, 30 Mar 2022 15:03:06 +0300
Message-Id: <83czi38x6t.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Andreas Schwab <schwab@HIDDEN>
In-Reply-To: <877d8b3d4w.fsf@HIDDEN> (message from Andreas Schwab on Wed,
 30 Mar 2022 13:15:11 +0200)
Subject: Re: bug#54636: dired fails to update subdirs when files are
 created/deleted/renamed
References: <877d8b3d4w.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54636
Cc: 54636 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Resent-From: Andreas Schwab <schwab@HIDDEN>
> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
> Resent-CC: bug-gnu-emacs@HIDDEN
> Resent-Sender: help-debbugs@HIDDEN
> From: Andreas Schwab <schwab@HIDDEN>
> Date: Wed, 30 Mar 2022 13:15:11 +0200
> 
> dired-to-delete, dired-do-rename, dired-do-copy or
> dired-create-directory fail to update the dired buffer when performed in
> a subdirectory.
> 
> This is a regression from Emacs 27.

Thanks.  A bisection will be appreciated.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 Mar 2022 11:15:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 30 07:15:21 2022
Received: from localhost ([127.0.0.1]:34649 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nZWIL-0003zM-Ho
	for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 07:15:21 -0400
Received: from lists.gnu.org ([209.51.188.17]:55038)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <whitebox@HIDDEN>) id 1nZWIK-0003zF-HI
 for submit <at> debbugs.gnu.org; Wed, 30 Mar 2022 07:15:20 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58606)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <whitebox@HIDDEN>)
 id 1nZWIK-0008M6-AS
 for bug-gnu-emacs@HIDDEN; Wed, 30 Mar 2022 07:15:20 -0400
Received: from mail-out.m-online.net ([212.18.0.9]:48567)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <whitebox@HIDDEN>)
 id 1nZWIH-00066O-8n
 for bug-gnu-emacs@HIDDEN; Wed, 30 Mar 2022 07:15:19 -0400
Received: from frontend01.mail.m-online.net (unknown [192.168.8.182])
 by mail-out.m-online.net (Postfix) with ESMTP id 4KT3kS5Svqz1r2sB
 for <bug-gnu-emacs@HIDDEN>; Wed, 30 Mar 2022 13:15:12 +0200 (CEST)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.70])
 by mail.m-online.net (Postfix) with ESMTP id 4KT3kS5Kpvz1qqkH
 for <bug-gnu-emacs@HIDDEN>; Wed, 30 Mar 2022 13:15:12 +0200 (CEST)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.182])
 by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,
 port 10024) with ESMTP id 89vs31y0V_Ai for <bug-gnu-emacs@HIDDEN>;
 Wed, 30 Mar 2022 13:15:12 +0200 (CEST)
X-Auth-Info: 0QjzwYPwvQ/GMEpNODq6RuO3qt+gMKBuV59kt5FBH8jxfuB04+wPqXCXtMQ+TwAt
Received: from igel.home (ppp-46-244-187-231.dynamic.mnet-online.de
 [46.244.187.231])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.mnet-online.de (Postfix) with ESMTPSA
 for <bug-gnu-emacs@HIDDEN>; Wed, 30 Mar 2022 13:15:12 +0200 (CEST)
Received: by igel.home (Postfix, from userid 1000)
 id B65AA2C38AB; Wed, 30 Mar 2022 13:15:11 +0200 (CEST)
From: Andreas Schwab <schwab@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: dired fails to update subdirs when files are created/deleted/renamed
X-Yow: Hmmm..  a CRIPPLED ACCOUNTANT with a FALAFEL sandwich is HIT
 by a TROLLEY-CAR..
Date: Wed, 30 Mar 2022 13:15:11 +0200
Message-ID: <877d8b3d4w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.92 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=212.18.0.9; envelope-from=whitebox@HIDDEN;
 helo=mail-out.m-online.net
X-Spam_score_int: -23
X-Spam_score: -2.4
X-Spam_bar: --
X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9,
 HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

dired-to-delete, dired-do-rename, dired-do-copy or
dired-create-directory fail to update the dired buffer when performed in
a subdirectory.

This is a regression from Emacs 27.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Acknowledgement sent to Andreas Schwab <schwab@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#54636; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 5 Apr 2022 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.