From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#74614: Fwd: bug#74614: Problem of finding the project root when working on submodules of a submodule Date: Tue, 3 Dec 2024 04:14:58 +0200 Message-ID: <61ff7773-b4f6-4e22-9f36-10adcc13fc29@gutov.dev> References: <45fb1453-ca9f-47c2-bd85-d7be860aa840@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40837"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Chu Maeda , 74614@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 03 03:17:06 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tIITJ-000ASO-Cn for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Dec 2024 03:17:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIISQ-0005eY-Dw; Mon, 02 Dec 2024 21:16:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIISK-0005ZE-ES for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 21:16:06 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIISK-00048H-5N for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 21:16:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=wSkugV0as3+YGWiTiXIVoGc6NkndGX0VB6Z6ds04Blw=; b=SyNRTlqe4BU23n/GnIyxVP2sjAsFBeJG8SNAWZBYW8/dLgczAlhhs1YVuCCuIHzoZxHIucKXPtC16wENtmDGnRPRNx3pRlLXnKIPaQu6vYT3gXIEzX9TRFrUFziXM8T2TezUmzI6xyk0AeEDljd4k4OX0zb9qAg3AsdCMg+huGu3ujK5CcSWH3VAnM4+cgW8gqwLL7ZqAYN2UgXC8vsyBep13gLu4SQrN4fUQJ2SRq9orKQ23trx8tK5uQyE6BIIb3p5LcAHtzHDpDynO2jh+Sf7DQQUAp+QUMKlwkKaCu4nP4rPsrZ1wdfstsvX1h7A+vc5L1Cx8fljYg1u3iRE+A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tIISI-0006XP-B6 for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 21:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Dec 2024 02:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74614 X-GNU-PR-Package: emacs Original-Received: via spool by 74614-submit@debbugs.gnu.org id=B74614.173319211225057 (code B ref 74614); Tue, 03 Dec 2024 02:16:02 +0000 Original-Received: (at 74614) by debbugs.gnu.org; 3 Dec 2024 02:15:12 +0000 Original-Received: from localhost ([127.0.0.1]:57269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIIRT-0006W4-R0 for submit@debbugs.gnu.org; Mon, 02 Dec 2024 21:15:12 -0500 Original-Received: from fout-b5-smtp.messagingengine.com ([202.12.124.148]:39799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIIRQ-0006QQ-CS for 74614@debbugs.gnu.org; Mon, 02 Dec 2024 21:15:09 -0500 Original-Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id D8C521140091; Mon, 2 Dec 2024 21:15:02 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 02 Dec 2024 21:15:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1733192102; x=1733278502; bh=wSkugV0as3+YGWiTiXIVoGc6NkndGX0VB6Z6ds04Blw=; b= hldK4aY4YjWM3C9TPqhdrANjniGN9QkQeZlrW+LmSX3/YEIS4DANU7WBSgENETI4 aJVX8SkR8PfIVbqjzW5qNSQXfMieek9zLGSaqLvD+qB0k34rMRXsZm6KpKVkqEJN y3D39gRbFFKtB3qkQMF/7WFo30WS+DJg2jJH/gMZqTKZs6EpfRXFf7QBus/uuRoE 6rFRa5DGflgUm9XPc/kWTtQo08Q23pZ3H1nhKxrPti6eynJ9HT5NyMghZkp/2Ptw tQBMysULV4J69RVjOkKm2HW7B6BE626pRC2UMeEHrkZikDnnZCh57260ZZz9WJBo ak3d0jGK4StDc0j/gcj9CA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1733192102; x=1733278502; bh=w SkugV0as3+YGWiTiXIVoGc6NkndGX0VB6Z6ds04Blw=; b=fJ3SGTW5gfMWxRS9w T85y05cMIPp/U70ORhgGO2HV3hjm3yPwyf0ZhkkjBCokS/J5hQdTKnio+pw81UV9 OHbX7eKP/hjVOsxD+AGFLFEFVAOCGTG66PSIqaMWJDMPo+JtgtNBacaCYNdv4PTm CNC7fm77jvFpuNFNSB244PfnfAmBXYG6gzq91rLxPQvupgZNuCDAQqNB+99prIKG pjx4SDKKoHNRXk/XyblCOrZkONb81lDuYxp5aV3kHyuGEx3ut7RMewagO0/gbTEr e2i90Be70PXGMrDLlencwG/lzRNsvI6JHyeY7rJfevep3CjsyeUOv7o7FYiUt+bH icagw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddriedtgdegvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecu hfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvh eqnecuggftrfgrthhtvghrnhephfeftdfhudejleelfeekjedtheefjedvlefgieeuteek heeuffekgfdviefghfdtnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhu thhovhdruggvvhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtohepmhgrvggurghquhesghhmrghilhdrtghomhdprhgtphhtthhopeejgeeiudeg seguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 2 Dec 2024 21:15:01 -0500 (EST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296348 Archived-At: On 02/12/2024 07:15, Chu Maeda wrote: > > Of course, I created such a project on github, you could clone it by > command: > > git clone --recurse-submodules https://github.com/chu-mirror/A.git > > > The problem is clear when you open the file A/B/C/README.md, and run > command project-find-file(C-x p f by default) Thanks! It seems we should switch from checking for modules once to doing it in a loop. Try this out: diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index cf1c94a6d20..3cc063a5d99 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -591,7 +591,7 @@ project-try-vc--search last-matches)) vc-handled-backends)) project) - (when (and + (while (and (eq backend 'Git) (project--vc-merge-submodules-p root) (project--submodule-p root)) Note you might need to restart Emacs after applying the patch, because the directory->project relation is currently cached until restart.