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:39:35 +0200 Message-ID: <388a95d0-4d2f-44b5-acbc-328df94f9c1a@gutov.dev> References: <45fb1453-ca9f-47c2-bd85-d7be860aa840@gutov.dev> <61ff7773-b4f6-4e22-9f36-10adcc13fc29@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3674"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 74614-done@debbugs.gnu.org To: Chu Maeda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 03 03:40:22 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 1tIIpp-0000nA-JG for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Dec 2024 03:40:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIIpa-0005JP-3N; Mon, 02 Dec 2024 21:40:06 -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 1tIIpY-0005Gz-0J for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 21:40:04 -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 1tIIpV-0006Rv-W4 for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 21:40:03 -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=e5q/ypqsaF55EFN1ovGZ1eLEXsu2fhc60Or95+63ULU=; b=lS2hS3SlpSkWXkCMqtRtlV4avX68QvAFYLtxJPYX9VDELoA9gvX9yie7EaKw+Ufv4tmPg6UlMqH8xXjCQEzUl6H1Er++J5tZNinBvn9DmdlfgtitRmyYxr/v5aL9zA0P67XpFpisQ3rp7x2jTvOfV9wgc45RNW1z4CZN1cGlu5bgcaePiJRz3VZxZin8fOjII2TpcEEAC0mQhU6XwpR+/xKHrxIcDy0EWsWtLUDI4qmHUL6bzNYOg+j8qa+NEvynZybPmgqKx+dw8qDu9svXm2RgIV6kzKONa55WsamR0WpjP6msfV50AHMzl0w2pKN6n0IqzCQrdal2an+gFGHqUQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tIIpV-0007g0-Rp for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 21:40:01 -0500 Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Dec 2024 02:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 74614 X-GNU-PR-Package: emacs Mail-Followup-To: 74614@debbugs.gnu.org, dmitry@gutov.dev, maedaqu@gmail.com Original-Received: via spool by 74614-done@debbugs.gnu.org id=D74614.173319358729465 (code D ref 74614); Tue, 03 Dec 2024 02:40:01 +0000 Original-Received: (at 74614-done) by debbugs.gnu.org; 3 Dec 2024 02:39:47 +0000 Original-Received: from localhost ([127.0.0.1]:57318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIIpG-0007fA-SH for submit@debbugs.gnu.org; Mon, 02 Dec 2024 21:39:47 -0500 Original-Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]:49973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIIpE-0007er-PI for 74614-done@debbugs.gnu.org; Mon, 02 Dec 2024 21:39:45 -0500 Original-Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.stl.internal (Postfix) with ESMTP id 5DF4725401A2; Mon, 2 Dec 2024 21:39:39 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Mon, 02 Dec 2024 21:39:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :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=1733193579; x=1733279979; bh=e5q/ypqsaF55EFN1ovGZ1eLEXsu2fhc60Or95+63ULU=; b= KwJV+6O8z+J2cNrkUP6eaOxI3gE9zkpuAh3VFf6T5sowCcyf+6b3A7wZGFZGjbkf JrLVYrSFB2vD4Q6G3o8/VoOJQdr39/JiLRDwOqDej3h+PPm4ZXTM/tbdf4xJAHa4 O1BQoSN64PYMR9ikj2yPZEbwZUoFXZnct7yx2CnA7FiIO0/PlGVoSuddYjxHS2YA WjWRqBiIlc1j3EveEB7T593L3xboLT1Ug8DhtBH7bxTVxf42+yTThbK+0A/7/tOK UGWReHPMTvnWEuVUrGML3CZlHU6Oiu1ntr35LzVRJl8zfL9hm4dvJy3jCpMQhSXu xz7TJimHg/otxAouo6FM5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=1733193579; x= 1733279979; bh=e5q/ypqsaF55EFN1ovGZ1eLEXsu2fhc60Or95+63ULU=; b=u BjL7VBV/Ztr/3KAEBFrNe/zSWammM77u2Lai2CUFln2U1HgH1I7lW977sFMbP21r NQWcSvXreRmcJJCiXBrUYG4jgHrnGkMAg90IpZP2ioGDjqMF8PR9hWGREUgKrdy9 vNF7tYrzWRgc8V0yH8II9illr2WiG6hJFaFOUZP+UCgx7THw+d1TnPf9GfcJqDFq kKZKHO0bt9t3GDF4agfYKmErRVC/6B6br4erNqXGR6FslVvLZ5FMtBqfWUf+esVe dIjiKUtH3KA/BgUnQuE9jFSwY0Sw1Zi8AqYJULMM0BrrjEqDMjOZLMbpi26wQ/q7 OWdzfNXDliyuCpB0RXg7w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddriedtgdegjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeen ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg hvqeenucggtffrrghtthgvrhhnpeefvdejveeiffefueekleevieekgedttdevieelvefg vdfghfdtgfegfeefgeeigfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehg uhhtohhvrdguvghvpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprh gtphhtthhopehmrggvuggrqhhusehgmhgrihhlrdgtohhmpdhrtghpthhtohepjeegiedu gedqughonhgvseguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 2 Dec 2024 21:39:37 -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:296350 Archived-At: Version: 31.1 On 03/12/2024 04:25, Chu Maeda wrote: > It works. Thanks. Thanks for testing, pushed to master now in 8534bb2d6b5. > Dmitry Gutov > 于2024年12月3 > 日周二 10:15写道: > > 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 > > 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. >