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#65704: 29.1; Most code of `project-ignores' seems to be dead code Date: Thu, 7 Sep 2023 00:16:42 +0300 Message-ID: <76be9234-5196-a989-785b-558d4956eb48@gutov.dev> References: <87sf7wlg07.fsf@cassou.me> <874jkakjt3.fsf@cassou.me> <93d0f377-7acd-ec0d-0e17-f6d09c4dd23a@yandex.ru> <8734zthf5z.fsf@cassou.me> <87tts9qceo.fsf@cassou.me> <5fb6c7df-3f64-5ed2-0c42-a182c6e1a9c4@gutov.dev> <87bkefp138.fsf@cassou.me> 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="7840"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: Damien Cassou , 65704-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 06 23:17:21 2023 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 1qdzto-0001nG-IJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Sep 2023 23:17:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdztZ-0007wK-GP; Wed, 06 Sep 2023 17:17:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdztV-0007uC-Rp for bug-gnu-emacs@gnu.org; Wed, 06 Sep 2023 17:17:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdztV-0002RT-J4 for bug-gnu-emacs@gnu.org; Wed, 06 Sep 2023 17:17:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdztW-0005Ac-13 for bug-gnu-emacs@gnu.org; Wed, 06 Sep 2023 17:17:02 -0400 Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Sep 2023 21:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 65704 X-GNU-PR-Package: emacs Mail-Followup-To: 65704@debbugs.gnu.org, dmitry@gutov.dev, damien@cassou.me Original-Received: via spool by 65704-done@debbugs.gnu.org id=D65704.169403501919859 (code D ref 65704); Wed, 06 Sep 2023 21:17:01 +0000 Original-Received: (at 65704-done) by debbugs.gnu.org; 6 Sep 2023 21:16:59 +0000 Original-Received: from localhost ([127.0.0.1]:38031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdztT-0005AE-3M for submit@debbugs.gnu.org; Wed, 06 Sep 2023 17:16:59 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:42305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdztM-00059v-Fj for 65704-done@debbugs.gnu.org; Wed, 06 Sep 2023 17:16:57 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id A8A1D5C00A4; Wed, 6 Sep 2023 17:16:45 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 06 Sep 2023 17:16:45 -0400 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:sender:subject:subject:to:to; s=fm3; t= 1694035005; x=1694121405; bh=yk9u7AU3KPNS34mLAtidxmSLWp/wnR3+xZ+ 5bg3Kc58=; b=Cim1+yhpeZQY+hGED9uOIaANQCEUOSbGCX8RkkvtYl0d75S5aFq oFVk8YyAhmk5HCUz/eaR0tBBZuYuC4Lk2aYOyXJofRfUEFDqWzcDFUKM7p2XtkEn 2JP5YXVYLW22E6Fv8hpo0NcgLu261d/xyqOdr5PFcVVMJQzdNYEGgWCSUwTm4kT9 a7m02XL7WOOWz7tLfJQTizaGKpgWla1oVEH5wZOhYy+dpsTLMLa7tJVC/cqGicDl Hi9wwH7QrfCgRCAwgFdeD4whcXZ7oAGwv1GYlmJQUi19S3/mRveJmmXJSSyfJOOH HDPpv26esGqI7bB4ATIijH6ExB2RromiSkg== 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:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1694035005; x= 1694121405; bh=yk9u7AU3KPNS34mLAtidxmSLWp/wnR3+xZ+5bg3Kc58=; b=C UlTCFtrt72EpRBf9bMTBFPlVl18Ydo9FliyCp+tIJJbjTIR/j+d6wrF6HKaqJGR7 0KnGKvX80jhBLSTaOmCNlSpTuoBen/YuNQ6rF8CqAkRaZr6sm/KmFqICBNKHIgK/ ko4q4J4HInSVsi3kRPre3eHCsR8JQuQnuj6sTfyIWG21cBZ028yzuPIyYunZnYlr 4BfnUw6oYV0yEuGQFjZ+kxtPO6kTGU4OI/CC3zaxkPP2GanKzRUN3QxM6cMINYgL 0FBgOLzWywfmdgfkwWoPE06KhPVT1kzhV4v8gqHVI2bNr0HSr6dEKsmK7MAQvdBT APy8Ku1ehDHM4z/A/ogJg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehfedgudehkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepgeehtdehudejieetuedttdejkeehjeetueekheffuddtjeeuvdefveeuveei uddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Sep 2023 17:16:44 -0400 (EDT) Content-Language: en-US In-Reply-To: <87bkefp138.fsf@cassou.me> 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:269588 Archived-At: On 06/09/2023 22:12, Damien Cassou wrote: > Dmitry Gutov writes: >> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el >> index 29a81c7e151..2eea0ef72e0 100644 >> --- a/lisp/progmodes/project.el >> +++ b/lisp/progmodes/project.el >> @@ -566,6 +566,12 @@ project-try-vc >> (project--submodule-p root)) >> (let* ((parent (file-name-directory (directory-file-name >> root)))) >> (setq root (vc-call-backend 'Git 'root parent)))) >> + (when (not backend) > it seems that `root' is sometimes nil at this point so I would change > this line to > > (when (and (not backend) root) > > I've used this for the day and it seems to work fine. Thanks for the extra testing. I just moved the new code a little deeper down inside (when root ...) block, should do the same. Pushed as 62229fb2d11 and bumped project.el version to 0.10.0. Should be out in ELPA shortly along with a few other new features added recently. This seems to resolve the last of the concerns here, so closing the bug as well. Please clarify if something remains. Addendum regarding the chosen solution: I guess there is a downside or two: when working over Tramp, the latency will increase. And if the subproject's dir is in the parent's .gitignore, the behavior will get worse. Let's wait for feedback to see if those are real problems, but worst case, the solution which you had used previously should take care at least of the second usage scenario (ignoring the ignores).