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#41572: 28.0.50; [PATCH] Support plain project marked with file .emacs-project Date: Sat, 26 Nov 2022 15:22:36 +0200 Message-ID: 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> 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="4743"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 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: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 26 14:23:09 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 1oyv99-00010R-Tv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Nov 2022 14:23:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyv96-0002JX-8o; Sat, 26 Nov 2022 08:23:04 -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 1oyv94-0002IM-IA for bug-gnu-emacs@gnu.org; Sat, 26 Nov 2022 08:23: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 1oyv94-0003K3-8W for bug-gnu-emacs@gnu.org; Sat, 26 Nov 2022 08:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oyv94-0001KA-4c for bug-gnu-emacs@gnu.org; Sat, 26 Nov 2022 08:23: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: Sat, 26 Nov 2022 13:23:02 +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.16694689705038 (code B ref 41572); Sat, 26 Nov 2022 13:23:02 +0000 Original-Received: (at 41572) by debbugs.gnu.org; 26 Nov 2022 13:22:50 +0000 Original-Received: from localhost ([127.0.0.1]:38189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyv8q-0001JA-KJ for submit@debbugs.gnu.org; Sat, 26 Nov 2022 08:22:50 -0500 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:42546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyv8n-0001Iv-KE for 41572@debbugs.gnu.org; Sat, 26 Nov 2022 08:22:47 -0500 Original-Received: by mail-wr1-f46.google.com with SMTP id cl5so10345302wrb.9 for <41572@debbugs.gnu.org>; Sat, 26 Nov 2022 05:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=yURVvs8Ds4s/E3Cl5rsOtHy+QeyLqyegCuwCI5mKnjs=; b=aWsO9okbBSpF/LWppAyZY1ptvCHzlTnx8MJiMnWpfnEsojw4dCfxTa1Kt6URvMWTCW zA/3YL6yoZvY6UBNaf7oPgXG5rC31PtyYQw8CF/MsHTEXQPHzoqug0sLn25hgfITiYrz bTiJ4zUjiF9rYHTayEsDQWt0uG9KCIyUTPCaCLAYJO/nJYWvIq16LpNH1SpLFBRnykLf rDQHr71WARHxtGWGyqRMxmAtCHq8aZ07FQjUaZtC8dOutIjlZfGMcZZZXH2vUJdiKxMG 3wNF2hIaqc9Ma8zcLDkKzMC33IaI5VK63ZL/YRHvQO4WPnMdxGIv0fv7VMqUgvzy1aPd 08qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yURVvs8Ds4s/E3Cl5rsOtHy+QeyLqyegCuwCI5mKnjs=; b=7fwF+pCvvM8HtIuBTUqPvfOJ5z1TOIwO81hUWhzo/KRcd1L1xbDbr11T8Hs9p3l0qn ogwSEboBHfbR7MWDH6HDiOP/TP2hwU7YDAKl5qoCAEEcEjF1h1xFWY0eM/UHhIskVSII P4UidFXOifVoonYfYlfzVMz8YvKFi3Gi1qBUBvgbiw4phnTGJ3CZcQAGgUO+I2ccmdqb PBIOTtdx1rz0kf3ssJ+22pFvyzTEh6ElD8S7x+Rq55yAXsglsR4Dh2Kfz5fYi2W8j0T4 7j51qrDaq04bz9i/ESRTIaeHAwwxs+aQAKTshmtWaDJk3oTE9rKnbey4hR14O9fuMZ4a qquw== X-Gm-Message-State: ANoB5pma24nxZhPJaTk7nqD9W6G5/OmDZhUfaa6u0ZOMudmHeHFqdWod MTZjXA3mXi8FbcceYEMU3kw= X-Google-Smtp-Source: AA0mqf43yPpG7dKHbTWCTN8ihuJw3li6tHYrQz2xaqvrEOqnLy+LGpTzKHhx2417rmUWutpGlYshPg== X-Received: by 2002:a5d:68c1:0:b0:236:8a38:4deb with SMTP id p1-20020a5d68c1000000b002368a384debmr26378341wrw.487.1669468960012; Sat, 26 Nov 2022 05:22:40 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id j2-20020a5d6e42000000b0024194bba380sm6005784wrz.22.2022.11.26.05.22.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Nov 2022 05:22:39 -0800 (PST) Content-Language: en-US In-Reply-To: <83sfi6tavq.fsf@gnu.org> 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:249085 Archived-At: 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.