From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#41572: 28.0.50; [PATCH] Support plain project marked with file .emacs-project Date: Sat, 26 Nov 2022 16:27:32 +0200 Message-ID: <83mt8dssdn.fsf@gnu.org> References: <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@yandex.ru> <87pnahjgdr.fsf@linkov.net> <87ftb92u8q.fsf@thornhill.no> <0ab90cf2-eab2-6fea-6698-4164d7753cd7@yandex.ru> <87d06ck2b0.fsf@thornhill.no> <2fbe5d5d-03a1-212b-9dd7-4723e168ad06@yandex.ru> <5EpzudgjedeKADsX4_Tq-2WtNm3XKXmZjnEI7Y1lmw-Pcn_KrzKPD1o31Ele0JOIrZ1ITDdeQrOsJTHfGVPJlzyLhmqjxP3rmVVzou8KEBo=@thornhill.no> <2a70c748-e250-2f96-5d74-712b6d71e8be@yandex.ru> <871riitzch.fsf@gnus.org> <9781acc2-e4c0-b53c-6422-ef2e0a96f400@yandex.ru> <83sfi6tavq.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29459"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, rudi@constantly.at, eric@ericabrahamsen.net, cjpeople2013@gmail.com, theo@thornhill.no, mardani29@yahoo.es, joaotavora@gmail.com, manuel.uberti@inventati.org, juri@linkov.net, salutis@me.com, arstoffel@gmail.com, 41572@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 26 15:28:11 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oywA6-0007Rf-RZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Nov 2022 15:28:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyw9z-0003HO-BR; Sat, 26 Nov 2022 09:28:03 -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 1oyw9y-0003Gm-5s for bug-gnu-emacs@gnu.org; Sat, 26 Nov 2022 09:28:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyw9x-0002v0-Ps for bug-gnu-emacs@gnu.org; Sat, 26 Nov 2022 09:28:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oyw9x-0005DE-LX for bug-gnu-emacs@gnu.org; Sat, 26 Nov 2022 09:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Nov 2022 14:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41572 X-GNU-PR-Package: emacs Original-Received: via spool by 41572-submit@debbugs.gnu.org id=B41572.166947284419990 (code B ref 41572); Sat, 26 Nov 2022 14:28:01 +0000 Original-Received: (at 41572) by debbugs.gnu.org; 26 Nov 2022 14:27:24 +0000 Original-Received: from localhost ([127.0.0.1]:38316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyw9K-0005CK-Ih for submit@debbugs.gnu.org; Sat, 26 Nov 2022 09:27:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyw9H-0005C7-M4 for 41572@debbugs.gnu.org; Sat, 26 Nov 2022 09:27:21 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyw97-0002S2-8r; Sat, 26 Nov 2022 09:27:10 -0500 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=f6nXTEVsXhvSG6MEfrW5SxHjywbdfxseLBXtzb8wsLY=; b=CGhCBReDlNKX V3bGcLC2YbuO17RrbqRsHsdkVTDWHsAMJDM/veVI0RlS4vydNDsrfwkWrYWHKuADsmLxPj/vDIleB 64sOXXkNaBe2Zbd0Yijp2yIj2k4Zu+GGkZ0RzK6sSdzuIAwTqXeLumVsxCtzjfcY6FrmJj5eOVivk VO2cc63pjJ3zqBbSfMtrV0Cl3Euz/0JSYcqo1J/6BvPgtdNOwfeQoZi+yFs7iwJsEdFHY8E38fTpS bwnI6NEqoreVAdwQ0FyREU+HH6vQdG7wa2b1cIMy88g1FIJR+J1Ez1uOwIgdtD0t8JRM2wi+0STib L/at4/KIRLzZp6EiCwGuqg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyw96-0003Pc-KY; Sat, 26 Nov 2022 09:27:08 -0500 In-Reply-To: (message from Dmitry Gutov on Sat, 26 Nov 2022 15:22:36 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249096 Archived-At: > Date: Sat, 26 Nov 2022 15:22:36 +0200 > Cc: philipk@posteo.net, rudi@constantly.at, eric@ericabrahamsen.net, > cjpeople2013@gmail.com, theo@thornhill.no, mardani29@yahoo.es, > salutis@me.com, joaotavora@gmail.com, manuel.uberti@inventati.org, > juri@linkov.net, arstoffel@gmail.com, 41572@debbugs.gnu.org > From: Dmitry Gutov > > On 26/11/22 09:47, Eli Zaretskii wrote: > > >> +(defcustom project-vc-extra-root-markers nil > >> + "List of additional \"markers\" to signal project roots. > >> + > >> +A marker is either a base file name or a glob pattern for such. > >> + > >> +These will be used in addition to regular directory markers such > >> +as .git, .hg, and so on, dependent on the value of > >> +`vc-handled-backends'. > > > > "These will be used" how? This crucial information is sorely missing from > > this description. Likewise, how "markers" that are not files are used and > > are useful? > > Not files, meaning, markers which are globs with wildcards? > > >> They are most useful when a VC project > >> +has subdirectories inside it that need to be considered as > >> +separate projects, but still use the parent's ignore rules and > >> +general behaviors. > > > > How are "markers" useful in this scenario? > > As mentioned in e.g. > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54228#11, monorepos often > contain subdirectories which one might want to handle separately. > > Those subdirectories often come in standard structures, e.g. a frontend > subdirectory might contain a file called "package.json", a backend > subdirectory might contain "Gemfile" or "build.gradle", or perhaps > "autogen.sh", and so on. > > Adding those to the markers list will tag those subdirectories as > projects on their own. People can also use the file names special to > their particular organization instead of those above. > > >> +It can also be used for projects outside of VC repositories. > >> +Their behavior will still obey the relevant variables, such as > >> +`project-vc-ignores' or `project-vc-name'." > > > > And in this one? > > This covers the use cases described in the first messages of this and > the merged bug report: > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41572#5 > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54228#5 > > People would add ".project" or ".emacs-project" to > project-vc-extra-root-markers and see things work. > > Might have to restart Emacs, though, if they already called project > commands in the given directory, because the current project info is cached. > > > IOW, please describe the main ideas of this approach instead of relying on > > use immediately gleaning that from a patch with incomplete documentation. > > If you have further questions, please ask. Thanks, but I meant for at least some of the above to be in the doc strings and/or explained here in plain English. Readers aren't supposed to search bug reports for relevant information. (And for me personally, this means I won't be able to look up the relevant information before at least another week or two, which is a pity.)