GNU bug report logs - #41572
28.0.50; [PATCH] Support plain project marked with file .emacs-project

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Zhu Zihao <cjpeople2013@HIDDEN>; Keywords: patch; dated Thu, 28 May 2020 04:46:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 6 Jun 2020 11:15:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 06 07:15:29 2020
Received: from localhost ([127.0.0.1]:50896 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhWnR-0006rz-Gs
	for submit <at> debbugs.gnu.org; Sat, 06 Jun 2020 07:15:29 -0400
Received: from mail-wm1-f66.google.com ([209.85.128.66]:50258)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1jhWnP-0006rl-T2
 for 41572 <at> debbugs.gnu.org; Sat, 06 Jun 2020 07:15:28 -0400
Received: by mail-wm1-f66.google.com with SMTP id v19so10703888wmj.0
 for <41572 <at> debbugs.gnu.org>; Sat, 06 Jun 2020 04:15:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=gXG07hb9Hs9uGtBFRerD9m2CxUG7OhwQVSmZjWttqKo=;
 b=XdyrlHObINGhlL8vXb0Oc59P7XAeAfQ5YESOjYH2LLk9RusKJbdVIOs3vGN+Xy+rME
 SitBGi5YB5/ldS/YOr6+6ZV1tPspYi6ppGw1GZxqnTSk9BPx7l7erhLiCHJz0VZst3wh
 3EAM1/rYHKrfDUAsQJtnMPFEdXV53Q9O2rqrXLIqjEnTyeiCMgnPjk1QwlgWkUCLC/cY
 PWIiRFoyDYhIWlL7k+ASfvLSfgau3Wb3rdeJiPz8Nbb2HwViEPpFysGdCyVtXnjX6Qx6
 5+8NRX5z0SdbWXNcl1sB5KtzLa+TCAllpniy+f9WSt7fF0h6vL2bVmELcnUAphD2Z5l0
 Q6QA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=gXG07hb9Hs9uGtBFRerD9m2CxUG7OhwQVSmZjWttqKo=;
 b=jJ1BwcRR6j5tvY91dXc0Js8SEM22fhuZzmL+7mP54knSXNvG/qHEKWjmWkqvuZwvOJ
 alWUYnije36LyjmfOEsOO5ljg0fq3Cj3yk/JGrLeieSgj5A7Xlm6PJMoIQq4tjv9KaWi
 X0igSCqI+efE6Be0zBfqoaB5eZcCm0XF8OOo3w/g5VqUT36oPs+Wd4tJNX9WFcoAqLaE
 jM132IF3/FhT4Ffx3/b77o9AqTY+RtouqT3l2+Pm62Q+IlravnyPljxmY2AxN45A3FNo
 /PYdCL+mGT7unjtavne6EGU9CIjPvPD1NlHvPnO7iwpzBUr9HsHB/XedU/X4lgDGGMu1
 /qag==
X-Gm-Message-State: AOAM530FwzrUUuYKIj/bXvIuz3fkzeNLmoklYt3Yrejv+iOlbxki/OA5
 P57nM3ey0Dxq9U5Jw9/6MIeJAfG1
X-Google-Smtp-Source: ABdhPJzk7i4iU8aCXiyS2gnopadO0wSk4fyqaz2r+2tpfvVkw+rpG0YycfJoVh6YBIIelrqbO7+GIA==
X-Received: by 2002:a7b:c353:: with SMTP id l19mr7274276wmj.187.1591442121893; 
 Sat, 06 Jun 2020 04:15:21 -0700 (PDT)
Received: from [192.168.0.3] ([66.205.73.129])
 by smtp.googlemail.com with ESMTPSA id m129sm15953292wmf.2.2020.06.06.04.15.20
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 06 Jun 2020 04:15:20 -0700 (PDT)
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
To: Theodor Thornhill <theo@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN> <87pnahjgdr.fsf@HIDDEN>
 <feebb665-a021-7b32-c528-579d9906a9f5@HIDDEN>
 <87ftb92u8q.fsf@HIDDEN>
 <0ab90cf2-eab2-6fea-6698-4164d7753cd7@HIDDEN>
 <87d06ck2b0.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <2fbe5d5d-03a1-212b-9dd7-4723e168ad06@HIDDEN>
Date: Sat, 6 Jun 2020 14:15:19 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <87d06ck2b0.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 41572
Cc: Zhu Zihao <cjpeople2013@HIDDEN>, 41572 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 06.06.2020 11:48, Theodor Thornhill wrote:
> Thanks - Wasn't aware of this. Seems like a better solution over all is to enforce the vc-backend? It seems like we get the "transient" version, or the "vc" version, but defining your own will have several drawbacks?

Unless you make sure it's full-featured, indeed. But the problem might 
become more severe in the future if we add more capabilities to projects.

This particular problem with speed could be alleviated if we export a 
utility function similar to project--vc-list-files, so that other impls 
could use Git's file listing speed.

The primary drawback is the semantics: the current impl always follows 
.gitignore for its ignores (but accepts additional ones), whereas an 
arbitrary project can have a totally different set of ignores. So, at 
the very least, I'm in doubt how to write the docstring.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 6 Jun 2020 08:48:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 06 04:48:38 2020
Received: from localhost ([127.0.0.1]:50673 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhUVK-0006zQ-OX
	for submit <at> debbugs.gnu.org; Sat, 06 Jun 2020 04:48:38 -0400
Received: from mail1.protonmail.ch ([185.70.40.18]:49009)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <theo@HIDDEN>) id 1jhUVJ-0006zB-2q
 for 41572 <at> debbugs.gnu.org; Sat, 06 Jun 2020 04:48:38 -0400
Date: Sat, 06 Jun 2020 08:48:27 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no;
 s=protonmail; t=1591433310;
 bh=BuszfLBo3clOM618Ad6q1UJHx7QBKulH3eFSIQ14BPY=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=OrfaucEtMbZktDNzUmlOcKBzF2fH7UJMUZrqHkcZgQhw0BO8KLZJTaU6ts1u7jHjT
 UMIoXmQkaxv6Ykc7oYRgPkQ6SE9OfXjjmVBtJLi0cxBPcOHTFFEOBeiO0U3JG6Azl0
 HWN7PSgADMlhVAEItppVn5oZb763tjRDHtsnF1aNUXneZWQ6uXKknSX9gFRZbn77XF
 /UQb8UbC5ChYWJYTE/6/sZ4ztL3pV7xeOmo3QLhqlYc/D7/lL/KiZaLO6LXxFW8O/s
 KucNUT/s5k3//NgGsj4T/6LvYan0xKsmGArnPuwSXzi9eySdGCOMP8A/8+Sfd4hosM
 hp0PgVHnmEDhA==
To: Dmitry Gutov <dgutov@HIDDEN>, Juri Linkov <juri@HIDDEN>
From: Theodor Thornhill <theo@HIDDEN>
Subject: Re: bug#41572: 28.0.50;
 [PATCH] Support plain project marked with file .emacs-project
Message-ID: <87d06ck2b0.fsf@HIDDEN>
In-Reply-To: <0ab90cf2-eab2-6fea-6698-4164d7753cd7@HIDDEN>
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN>
 <87pnahjgdr.fsf@HIDDEN>
 <feebb665-a021-7b32-c528-579d9906a9f5@HIDDEN>
 <87ftb92u8q.fsf@HIDDEN>
 <0ab90cf2-eab2-6fea-6698-4164d7753cd7@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no
 autolearn=disabled version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.protonmail.ch
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41572
Cc: Zhu Zihao <cjpeople2013@HIDDEN>, 41572 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Theodor Thornhill <theo@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

      =20
"Dmitry Gutov" <dgutov@HIDDEN> writes:

Hi!

> "Dmitry Gutov" <dgutov@HIDDEN> writes:

[...]
> Not in the "plain" project backend as proposed.

I see your point.
 =20
[...]

> Another issue is, well, if the user has a different package that defines
> projects installed (maybe Projectile grows project.el integration
> someday), or they're simply used to the VC backend, they might be
> surprised with some finer details unless you clearly document that your
> package does add a new project backend.

Thanks - Wasn't aware of this. Seems like a better solution over all is to =
enforce the vc-backend? It seems like we get the "transient" version, or th=
e "vc" version, but defining your own will have several drawbacks?

Theo






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 5 Jun 2020 23:11:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 05 19:11:47 2020
Received: from localhost ([127.0.0.1]:50296 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhLV4-0001NH-Sv
	for submit <at> debbugs.gnu.org; Fri, 05 Jun 2020 19:11:47 -0400
Received: from mail-wm1-f43.google.com ([209.85.128.43]:52638)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1jhLV4-0001Mz-4P
 for 41572 <at> debbugs.gnu.org; Fri, 05 Jun 2020 19:11:46 -0400
Received: by mail-wm1-f43.google.com with SMTP id r9so9774921wmh.2
 for <41572 <at> debbugs.gnu.org>; Fri, 05 Jun 2020 16:11:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=kO7Jv1p8ZOXkM42UdXLgn3IWoqVFuub4zLRVpfhEGEU=;
 b=IWmdshvJ6BHWKz0ZEx+jFZrxmEK6M8iucBSyFrREHK3JB4Uf8KJolgdQyVEGG4m744
 UIL0d8SR+0PKJVW6YI4jCqSj7/HA534ufObZEowA6XOW5e7I8RMrinc0JwCh34CQSC5F
 pRbkRjRvQQ4z8p4QBacKZDV7R2G8PMje/kpq0TdMkEIBT//wehJIAIyT6UQ1z7t5uP6M
 2NDqatv57Rwvs6oyzcXNX+i0bgOQUcYDzeH7cRryaU79fDUQncTbSkRbmfpOJWVnvZ6X
 mCbEeF/w1dak9GfY/f2ZQDYvIwdHWan2D0KsBcXBSR37UrGXeApGUbW1L8bA5cZnsQLm
 x8jw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=kO7Jv1p8ZOXkM42UdXLgn3IWoqVFuub4zLRVpfhEGEU=;
 b=Z2PfGyIzJWQY079LWTXsG3Okhyrizq8SJJY/Jx50fpbx2R9QCDN4E3hHa/308drerK
 L/grqO9V2Y88ob175nYJmT0vosNUACg61vl66aWsuA8dW6g6mzdIePQkb8xgb+SixRCd
 /tZUQ6bsitfTpel9U2fhwFwhEGqKq6RfcFwzJhKtFN6TxCBNc47FzyTNM9/Ivxvnofso
 Ft+3zctNsztsU/6rfQBeOBN1iseel9djrb99Zou5tFwTqiNbUYjL3wFQQGaMRmr51jY+
 vxoThn0/H3448vQNFqYwcQlnXpbFUamCDZ76LxSGjYy4eJIJZcksEvdzBC/E6mJTWg+5
 jH9g==
X-Gm-Message-State: AOAM530cmWVKeaaPdfUZfx+RnibB+DyKsCeQsH2S9vSk2sWB05Jmt/l7
 q641hQ+cYQRUxBZWXm+Y8pXy153+
X-Google-Smtp-Source: ABdhPJy8H/O1eZdQ1Yjil3QX3fI3qZZod93JZBNsRrPUioyggr6DR4Lplwa+lqaR+Fa0fXpQ8KF95A==
X-Received: by 2002:a1c:2e58:: with SMTP id u85mr4753495wmu.123.1591398699876; 
 Fri, 05 Jun 2020 16:11:39 -0700 (PDT)
Received: from [192.168.0.3] ([66.205.73.129])
 by smtp.googlemail.com with ESMTPSA id k13sm12299458wmj.40.2020.06.05.16.11.38
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 05 Jun 2020 16:11:39 -0700 (PDT)
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
To: Theodor Thornhill <theo@HIDDEN>, Juri Linkov <juri@HIDDEN>
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN> <87pnahjgdr.fsf@HIDDEN>
 <feebb665-a021-7b32-c528-579d9906a9f5@HIDDEN>
 <87ftb92u8q.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <0ab90cf2-eab2-6fea-6698-4164d7753cd7@HIDDEN>
Date: Sat, 6 Jun 2020 02:11:37 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <87ftb92u8q.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 41572
Cc: Zhu Zihao <cjpeople2013@HIDDEN>, 41572 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Hi!

On 05.06.2020 22:22, Theodor Thornhill wrote:
> "Dmitry Gutov" <dgutov@HIDDEN> writes:
> 
>> I like this suggestion better (no "special" files), but would we be able
>> to avoid scope creep? Wouldn't users then expect being able to specify
>> ignored directories in such projects? And then faster indexing (e.g.
>> using caching), compared to the VC backend?
> 
> Isn't this already supported?

Not in the "plain" project backend as proposed.

> In a major mode I'm making right now I believe I have covered both options:

Ignoring is covered by the API, yes. How did you cover the caching issue?

Also note that unless your new project backend is "good enough", you 
might make the users' experience worse as a result, at least in some 
respects.

> (defcustom elm-root-file "elm.json"
>    "...")
>     
> (defun elm-project-root (dir)
>    "Create the cons cell `project-root' needs to discover root."
>    (let ((root (locate-dominating-file dir elm-root-file)))
>      (when root
>        (cons 'elm root))))
>    
> (cl-defmethod project-root ((project (head elm)))
>    (cdr project))
> 
> (cl-defmethod project-ignores ((project (head elm)) dir)
>    (append vc-directory-exclusion-list
>            ;; This could also be a defcustom ofc
>            (list "./elm-stuff/")))
> 
> (add-hook 'project-find-functions #'elm-project-root)

The code is good. With probably one exception: if you have a big enough 
project, and it's checked into Git, the VC project will be much faster 
at indexing files than your project implementation (because 
project-files by default uses 'find').

But if you also define a faster project-files override, it should be fine.

Another issue is, well, if the user has a different package that defines 
projects installed (maybe Projectile grows project.el integration 
someday), or they're simply used to the VC backend, they might be 
surprised with some finer details unless you clearly document that your 
package does add a new project backend.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 5 Jun 2020 19:47:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 05 15:47:29 2020
Received: from localhost ([127.0.0.1]:50011 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhIJM-0002n8-Ur
	for submit <at> debbugs.gnu.org; Fri, 05 Jun 2020 15:47:29 -0400
Received: from mail2.protonmail.ch ([185.70.40.22]:60042)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <theo@HIDDEN>) id 1jhHvE-00029F-81
 for 41572 <at> debbugs.gnu.org; Fri, 05 Jun 2020 15:22:33 -0400
Date: Fri, 05 Jun 2020 19:22:21 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no;
 s=protonmail; t=1591384945;
 bh=i9v6NjKsWKtbmtfWD3azQlOI3b+ytwwKmZ9yI2O9Jt0=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=q9PsAt9L3k/+tJIfm0IOc9bmdcb6ymrSKFg2MJwLBlWWGqNbPOBU28h2AhpGtEqvi
 +HhbUEslg6OVJ8q5zLotl4+fZMFCCzgBzZyI9SOgyOB19pI9AbUf93wrbyhphnZCKL
 8K/Vv6GwuaxA+Z+aY4urZYoUGXUHmLDLJOeRrl8tb9kRYKjWQoFTMbFWOmypkGng1m
 frNO5gqllYTwLePuGUgTo9cCx01C6cPds4lInbQAaA1GCJzMCR9IngfxQUgVmdOx28
 ttpbWB5PE5mq70dPzMsCL3DHYa1yFZX2QoGpRGHy+K+BLFpvXUymGf4lmtO4+rnqy5
 1NS7s1xAAIXRQ==
To: Dmitry Gutov <dgutov@HIDDEN>, Juri Linkov <juri@HIDDEN>
From: Theodor Thornhill <theo@HIDDEN>
Subject: Re: bug#41572: 28.0.50;
 [PATCH] Support plain project marked with file .emacs-project
Message-ID: <87ftb92u8q.fsf@HIDDEN>
In-Reply-To: <feebb665-a021-7b32-c528-579d9906a9f5@HIDDEN>
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN>
 <87pnahjgdr.fsf@HIDDEN>
 <feebb665-a021-7b32-c528-579d9906a9f5@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=4.9 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NEW_DOMAIN_24H,
 SH_ZRD_HEADERS_FRESH,URIBL_ZRD shortcircuit=no autolearn=disabled
 version=3.4.4
X-Spam-Level: ****
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.protonmail.ch
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41572
X-Mailman-Approved-At: Fri, 05 Jun 2020 15:47:26 -0400
Cc: Zhu Zihao <cjpeople2013@HIDDEN>, 41572 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Theodor Thornhill <theo@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

      =20
Hello,      =20
      =20
"Dmitry Gutov" <dgutov@HIDDEN> writes:

> I like this suggestion better (no "special" files), but would we be able
> to avoid scope creep? Wouldn't users then expect being able to specify
> ignored directories in such projects? And then faster indexing (e.g.
> using caching), compared to the VC backend?

Isn't this already supported?
In a major mode I'm making right now I believe I have covered both options:

(defcustom elm-root-file "elm.json"
  "...")  =20
  =20
(defun elm-project-root (dir)
  "Create the cons cell `project-root' needs to discover root."
  (let ((root (locate-dominating-file dir elm-root-file)))
    (when root
      (cons 'elm root))))
 =20
(cl-defmethod project-root ((project (head elm)))
  (cdr project))

(cl-defmethod project-ignores ((project (head elm)) dir)
  (append vc-directory-exclusion-list
          ;; This could also be a defcustom ofc
          (list "./elm-stuff/")))

(add-hook 'project-find-functions #'elm-project-root)

- This will add both the option to not execute git init, but still find roo=
t.
- Also grepping will ignore the "node-modulesy" "elm-stuff".
- In addition, the vc-directory-exclusion-list can be edited to support arb=
itrary patterns, at least with my limited testing.
- It should be no problem to add a ".emacs-project" there in your own confi=
g?
 =20
Am I missing something, or is this already available? This of course depend=
s on major modes supporting this integration?
 =20
Theodor =20
 =20
>
> Projectile uses the "special file" for the former, and I'm not really
> fond of its solution for the latter.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 5 Jun 2020 19:02:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 05 15:02:24 2020
Received: from localhost ([127.0.0.1]:49916 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhHbk-0001Jk-5x
	for submit <at> debbugs.gnu.org; Fri, 05 Jun 2020 15:02:24 -0400
Received: from mail-wr1-f43.google.com ([209.85.221.43]:45222)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1jhHbi-0001EO-8k
 for 41572 <at> debbugs.gnu.org; Fri, 05 Jun 2020 15:02:22 -0400
Received: by mail-wr1-f43.google.com with SMTP id c3so10774818wru.12
 for <41572 <at> debbugs.gnu.org>; Fri, 05 Jun 2020 12:02:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=NKSe5q2bMRqdSQYrw8tE87dpw1jEvSUCdgDzDNbWcQs=;
 b=A/czDHOXX4ZAIxJF2ou66h2Ge/1T8aUP9Aik3GOjYpHHs0HR2yGeEQ9v7f/YQAuW5P
 Kkqaw1PUN81rs3lKoxhzcEE5sfWzfhso8pH9PGS4EnNJjdZRNVA/yCo9n+o83pE5JgvG
 lK9g+AppJynyTraw+tj9bZFiilIHtT2al3o8SAXU0cG1P1PteXWuHwFknxcycWgwMaBI
 +T78WbugjzuB24Ziyw+nR4mS1iJ6M48WKCFnnQmQYSS5Ua45nPNUbDvSkGKoDmexvQhE
 Us5ceXdmM3IkJ9j58/NEJKm/lQWUSoDQ2tXrIsAwFK7cMCKvtxr1VPhBTc7e4YPahu3t
 xM0g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=NKSe5q2bMRqdSQYrw8tE87dpw1jEvSUCdgDzDNbWcQs=;
 b=S35GPfT+pltJ7kRzMSF4zH2XT7qqnE5eziPh4Z+Awg64mqwQzlli1uCaKkmWcM1OPY
 ny0pxQG5I8EStv7xTeIw1tXdoZOuKuZkfj4z9WNSqbX+Lhv7JOBRrlEr6KLF4HjkfWn9
 9x2UZGmZEgR+/83MHDwcqq2V9bRp+MusEQaGmTcSHNNqb7lVlu79pPORD8PEI14Ao8rg
 G+Avs6TTP9se3tmBHRxQzyR6nBjcF7x1XM6Y1R0Q8gkEXIkB8ZydVvFUy0Ar+URfO48o
 5UdE42OSTIuKicy59TeYX9BJ43EsXVYKOcy4hmyrL7Een1GnPxcyikBYaktC06btC5zR
 mdBw==
X-Gm-Message-State: AOAM532tPCmPTIseTpBxHmKScRrA3RhQoUEWXGPO4NfO1JrJfiCWPOok
 IyNfQYcNAA4XIRZiHYt7OJqBhKKI
X-Google-Smtp-Source: ABdhPJye5pROzwVQ9VoM3ZcgsdeLfeS9mbdGDmV0GEDdMGXMJ21GaNMMwWP7xykz+U4f65DVZ2s7mA==
X-Received: by 2002:adf:b60b:: with SMTP id f11mr11008018wre.7.1591383735115; 
 Fri, 05 Jun 2020 12:02:15 -0700 (PDT)
Received: from [192.168.0.3] ([66.205.73.129])
 by smtp.googlemail.com with ESMTPSA id o20sm13739198wra.29.2020.06.05.12.02.13
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 05 Jun 2020 12:02:14 -0700 (PDT)
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
To: Juri Linkov <juri@HIDDEN>
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN> <87pnahjgdr.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <feebb665-a021-7b32-c528-579d9906a9f5@HIDDEN>
Date: Fri, 5 Jun 2020 22:02:12 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <87pnahjgdr.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 41572
Cc: Zhu Zihao <cjpeople2013@HIDDEN>, 41572 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 03.06.2020 02:40, Juri Linkov wrote:
>> Do you have a lot of projects that aren't backed by VC repositories?
> 
> Usually new projects in early stages of development
> not ready to commit even the initial revision.

A 'git init' wouldn't exactly hurt, though.

> However, maybe in this case better to employ some heuristics
> to detect the project root, e.g. to search for such common files
> as "Gemfile" for Ruby, "mix.exs" for Elixir, etc.

I like this suggestion better (no "special" files), but would we be able 
to avoid scope creep? Wouldn't users then expect being able to specify 
ignored directories in such projects? And then faster indexing (e.g. 
using caching), compared to the VC backend?

Projectile uses the "special file" for the former, and I'm not really 
fond of its solution for the latter.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 3 Jun 2020 11:04:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 03 07:04:28 2020
Received: from localhost ([127.0.0.1]:42153 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jgRC8-0006KU-0P
	for submit <at> debbugs.gnu.org; Wed, 03 Jun 2020 07:04:28 -0400
Received: from mail-wr1-f66.google.com ([209.85.221.66]:40528)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contovob@HIDDEN>) id 1jgRC5-0006KB-6F
 for 41572 <at> debbugs.gnu.org; Wed, 03 Jun 2020 07:04:26 -0400
Received: by mail-wr1-f66.google.com with SMTP id h5so1874034wrc.7
 for <41572 <at> debbugs.gnu.org>; Wed, 03 Jun 2020 04:04:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=tcd-ie.20150623.gappssmtp.com; s=20150623;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=PIyH/GOmhbnyCW0vo+uGhtwwZOgCBNLyQUgivd7P+r8=;
 b=S/fK67oU8zhhItqi3QUB0PM8gSzdUSPIE9cS8zx47KLbs7OZht2ECFai9gSFSLKWvF
 sEtZ5yNdshvP7WKwCFGZ77Dv0gJZckx22amftN2lQyqkmZH8cvDvqrmqG6dS2gN+LU+x
 ApPcj/i5riWZ3E5kWEgfBlFDMJ7DesT9oQWeTt0TybzZezKU1z+ek4vjC6YjFPitj3KS
 qm5Z93jpo0giYvgE9EFbHcOf8UK5wC9ZVnxAPxFDisZyEbWRkbxkO63L0QnWc62ZgnyI
 wWnCsaGnHvJPA+GWcd/gOTmPQRxoJKjyn2G4kAG05kVMx638MwZiAr1lK8Q9Y32MXmqs
 K+Lg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=PIyH/GOmhbnyCW0vo+uGhtwwZOgCBNLyQUgivd7P+r8=;
 b=oXbNvzWu+T0kF8KiKCLU5kApc+A3+/APsvRsFVYRpyxy8McrbG+wQdMlsSutO3z1Ao
 edXXl+tD7zZ+VjCMZeI/J1Us4uwJY12YiVtor2sZqQph7012ux4pGX0q0RQC/iQ/2ZTm
 +9K1ZHFUDdWIlR2fUXHw70HcxDnBPfVaFROYQ3gdG11wm2fUJEsxDwhQmaLGNk67YNCM
 NvZAiGSCyJFNPkCjyGCvvDceWsR7NXhdHayWMt3CC3Ip9eeNS1AViB01goIUS1t+MIf0
 Zb266E45+tUw+IxZ/DbMOtiK2QyKnhl4mxhGO+54KRE8XhlNM0r8FI+LudmyymzPQowr
 AkDg==
X-Gm-Message-State: AOAM532omZ+V+UPCh/yqGfuGogisreaCJBsSSEaIIZTtVIb9N/KHxfTk
 MDcW6KG0hKU6N+saYTagYx4COA==
X-Google-Smtp-Source: ABdhPJw6RPEG2P3YmVGS5Xcmu3zd2G+LvIooA3D8fL7kUVYxmUmcgCIKll7lb1Dz7wJ+H6YamzB7Kg==
X-Received: by 2002:adf:f183:: with SMTP id h3mr33053835wro.403.1591182259214; 
 Wed, 03 Jun 2020 04:04:19 -0700 (PDT)
Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e])
 by smtp.gmail.com with ESMTPSA id t14sm3021124wrb.94.2020.06.03.04.04.18
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 03 Jun 2020 04:04:18 -0700 (PDT)
From: "Basil L. Contovounesios" <contovob@HIDDEN>
To: "Philip K." <philip@HIDDEN>
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <874ks0dz8b.fsf@HIDDEN>
Date: Wed, 03 Jun 2020 12:04:12 +0100
In-Reply-To: <874ks0dz8b.fsf@HIDDEN> (Philip K.'s message of "Thu, 28
 May 2020 14:24:04 +0200")
Message-ID: <87zh9k4dhv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41572
Cc: Zihao Zhu <cjpeople2013@HIDDEN>, 41572 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

"Philip K." <philip@HIDDEN> writes:

> Zihao Zhu <cjpeople2013@HIDDEN> writes:
>
>> In your use case. I think we can add variable "project-known-projects",=
=20
>> you can=C2=A0 add your favorite directory to it, you can also persist th=
is=20
>> variable using savehist.el
>
> I actually think this is better (given there is a command to add a
> directory to the list of known projects), because you could also build a
> project switcher on this foundation.
>
> And if the variable is a user option (which I think it should be),
> savehist shouldn't be necessary.

FWIW, Emacs 28 now has the user option project-list-file, which is a
file populated with the list of known projects maintained in the
variable project--list.  See the following emacs-devel discussion:

https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg03301.html
https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00035.html

--=20
Basil




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 3 Jun 2020 00:28:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 02 20:28:29 2020
Received: from localhost ([127.0.0.1]:41355 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jgHGf-0002yQ-6w
	for submit <at> debbugs.gnu.org; Tue, 02 Jun 2020 20:28:29 -0400
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:48723)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jgHGd-0002y6-OS
 for 41572 <at> debbugs.gnu.org; Tue, 02 Jun 2020 20:28:28 -0400
X-Originating-IP: 91.129.108.6
Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6])
 (Authenticated sender: juri@HIDDEN)
 by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 16DCEC0009;
 Wed,  3 Jun 2020 00:28:18 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN>
Date: Wed, 03 Jun 2020 02:40:32 +0300
In-Reply-To: <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN> (Dmitry Gutov's
 message of "Thu, 28 May 2020 15:35:55 +0300")
Message-ID: <87pnahjgdr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41572
Cc: Zhu Zihao <cjpeople2013@HIDDEN>, 41572 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Do you have a lot of projects that aren't backed by VC repositories?

Usually new projects in early stages of development
not ready to commit even the initial revision.

However, maybe in this case better to employ some heuristics
to detect the project root, e.g. to search for such common files
as "Gemfile" for Ruby, "mix.exs" for Elixir, etc.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 29 May 2020 13:58:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 09:58:41 2020
Received: from localhost ([127.0.0.1]:55688 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jefWy-00047h-Jq
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 09:58:41 -0400
Received: from mail-wm1-f45.google.com ([209.85.128.45]:37809)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1jefWi-00046m-DP
 for 41572 <at> debbugs.gnu.org; Fri, 29 May 2020 09:58:39 -0400
Received: by mail-wm1-f45.google.com with SMTP id f5so3664675wmh.2
 for <41572 <at> debbugs.gnu.org>; Fri, 29 May 2020 06:58:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=N++1gk0G3IekXNkPhcG/4JBHrD7T2KbFdhs7usna9fk=;
 b=mGrcHWT15SYfmcOAJQGdVZ8N9VMpxFlaZ2XGFKzuvUhIrNdvzykMZaOQu7yokzeZI5
 apsYwc1sFNgAGjIHVMUvCC3xUu+AXz7IiAqicUmtskzHgKk4R7sQ2NhVFu25M4rjd+Yv
 C+uqwNeLyj3JnGLcdokHE31ujE7nTjv6J8mKn8aadzB/mEGu4IQMVGY0/be2ttlcZNHw
 Jmxkz8kcrnUhC3M7gXe64sFN3Rg3hP/uIGTjkv8h7qPx94iA8qVazWt0nOreAwupoDnA
 +DV4ZMsNivJbtUUE5M2U0gXrxAjZdBkRklmAcl09VJhqqKyeCvQz3Kezk3kw3rKcBofB
 mqTA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=N++1gk0G3IekXNkPhcG/4JBHrD7T2KbFdhs7usna9fk=;
 b=hT/ziwbU1yvAn+48aHIuvePcXPjuL32FK6R6UJpOqAd4S+3K23stPp0URGa/l8vUyb
 FDYUINe1Zz7RDbmNWeslqdhkhEc+kQItY3psqeRI0+YCWwaC4pVUag+ZRE+BswS/yycC
 l8W12a09rtKIyldh3hKC45U0QRDwPgJLgnh+YJa+HxbrbR+dqMjP9bD0qGE6mZUp3SFb
 8J55xVX8VYTvctjbB5kk3SJXgwTGhNHpv4qY4zPWrKoWsSvCfAp6+fgzMaJdvHbOkbpU
 gRO7m036eEG6YS4kikHx5VVuVeXvHZhM6zb/ylQzaQX9y/iAVdMOH8HbeC/6gPsrxNwY
 Ms3g==
X-Gm-Message-State: AOAM5339Pwco7fM+6RZ7ZJrLD5a/t9/AQLsYCko2gWjnaJV7DkSQNpJp
 D1JSEkQcvoWEsTTdKp0CozUqGwhh
X-Google-Smtp-Source: ABdhPJzli2qtOONLr+BLA63EB+VQTDHbzgtjJf9+JsOSRui/ZRvrlqJIqhpqQ6Jo6Ga3j++0lPx/4A==
X-Received: by 2002:a1c:1b17:: with SMTP id b23mr8564908wmb.3.1590760698232;
 Fri, 29 May 2020 06:58:18 -0700 (PDT)
Received: from [192.168.0.69] ([109.110.245.170])
 by smtp.googlemail.com with ESMTPSA id q1sm10237573wmc.12.2020.05.29.06.58.16
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 29 May 2020 06:58:17 -0700 (PDT)
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
To: Zihao Zhu <cjpeople2013@HIDDEN>, 41572 <at> debbugs.gnu.org
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN>
 <ae0340ca-3889-b214-4536-327fedd19558@HIDDEN>
 <c7a38fab-d331-ed40-5a09-554ea097a31f@HIDDEN>
 <679e6ff0-b0e4-e212-34bc-60ff676d0b00@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <dc00d0b6-2a69-d4aa-3baf-a6353cdce1af@HIDDEN>
Date: Fri, 29 May 2020 16:58:16 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <679e6ff0-b0e4-e212-34bc-60ff676d0b00@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 41572
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 29.05.2020 07:34, Zihao Zhu wrote:
> 
> A more netrual suggestion: We can make project-find-functions a 
> defcustom first.

It's a hook. It's stable, you can use it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 29 May 2020 07:11:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 03:11:33 2020
Received: from localhost ([127.0.0.1]:53662 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeZAy-0008Io-UO
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 03:11:33 -0400
Received: from out3-smtp.messagingengine.com ([66.111.4.27]:52687)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1jeZAw-0008IZ-QT
 for 41572 <at> debbugs.gnu.org; Fri, 29 May 2020 03:11:31 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id 8C23C5C00C1;
 Fri, 29 May 2020 03:11:25 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Fri, 29 May 2020 03:11:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=warpmail.net; h=
 from:to:cc:subject:references:date:in-reply-to:message-id
 :mime-version:content-type; s=fm3; bh=uohvfNk7Xc8mBVcDy07vO553pC
 tl1n5hWEiCQYj8NNw=; b=UXwaJ7cIl9IbZD/A89Q6KDbUNc+v5wMMsJnryT6qje
 +fwlGD4Om/+l+hCQV/jGQeXLrblFroIIkWMIqVIydgjE6mISk25Qze2QYXfCOEek
 Vkx7FvcGv7AEyxSMXsy6iXRjZS5oYK1zKJoeN3CYm+s7Xf3tVPqayMYF4R88G60t
 PWf3QV6jBEWSih035VfSemizgfjOr6ZIMHkj51btjZN+y9ehPMq+H3gUR6OQhi/7
 euX/EG0WxpYlSBU7wLZuzjHKofEsqzO3XC9VcFOeWhd41ccxmjVvUGPBIXc2hifi
 uWYSAgxXVWqczuIWiWrUGIMnLN3OcAF/NKQQ7nUE/b/w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=uohvfN
 k7Xc8mBVcDy07vO553pCtl1n5hWEiCQYj8NNw=; b=sz/hil1Qjsa/zyTB+Rm6Ml
 IDibBJvwEo4AT5eqK+YmO4tdjnMUxOod3kHscl0da3pCss4T3sEKEPCqfQjmEhvB
 Kl9lNr8V1IiyiqOIRMlZip1cq8MTbZvF04BmT8XBnpPqFx3ezL61K46H7pjKIrOf
 lHtWCRbRogpiO8Aig+Mj5U7qOqyVrMkyeQqoZ/3eEhmYXyO3FLsp/HLjTi/LCwm4
 RlsW4d9sbLwc5HZ68r+/pcuJWoqh9VgdfPj/r0HezLNWBge8AZvOnpr/dyhEEqg/
 KG+0j+B4AbF4MH74qOgt3DrcJtET6V1+8Uj0//RXtYK3qjjaM4OP02zuf1F9ZRpg
 ==
X-ME-Sender: <xms:nbXQXiSj1H2QiKCdOQPpukJj8LyZvDT5fdYxrDZkxsSPo3PFqvfhzA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddvjedguddtlecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvffufhffjgfkfgggtgesthdtredttdertdenucfhrhhomhepfdfrhhhi
 lhhiphcumfdrfdcuoehphhhilhhiphesfigrrhhpmhgrihhlrdhnvghtqeenucggtffrrg
 htthgvrhhnpeeiudffuedvhfetfedvledtveektdehtdfgueekkedtkeefgedtheegieff
 leefleenucffohhmrghinheptghhihhsvghlrghpphdrtghomhdpihhrihhfrdhfrhenuc
 fkphepjeelrddvudelrddvtdeirddvvdefnecuvehluhhsthgvrhfuihiivgeptdenucfr
 rghrrghmpehmrghilhhfrhhomhepphhhihhlihhpseifrghrphhmrghilhdrnhgvth
X-ME-Proxy: <xmx:nbXQXnzqQYPB3d619OArQGdBNfh240EdZb0yOKtLXUkQ2XCbCTDRKw>
 <xmx:nbXQXv2WbMVD1tdPYrs-zUQaL9LOGIT_iKjYn-9hQYkPctpHSv_7-Q>
 <xmx:nbXQXuADA3vioudBXtjpcNWPaQEjRU0dJPxbmodhPLAx_kuW4dOefw>
 <xmx:nbXQXtdw0jNC9G36mHEj_piBafsZp8V0HWquxGvTjv_b2PQh3hn2xw>
Received: from localhost (p4fdbcedf.dip0.t-ipconnect.de [79.219.206.223])
 by mail.messagingengine.com (Postfix) with ESMTPA id EDEF03280067;
 Fri, 29 May 2020 03:11:24 -0400 (EDT)
From: "Philip K." <philip@HIDDEN>
To: Zihao Zhu <cjpeople2013@HIDDEN>
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN>
 <ae0340ca-3889-b214-4536-327fedd19558@HIDDEN>
 <c7a38fab-d331-ed40-5a09-554ea097a31f@HIDDEN>
 <679e6ff0-b0e4-e212-34bc-60ff676d0b00@HIDDEN>
Date: Fri, 29 May 2020 09:11:22 +0200
In-Reply-To: <679e6ff0-b0e4-e212-34bc-60ff676d0b00@HIDDEN> (Zihao Zhu's
 message of "Fri, 29 May 2020 12:34:33 +0800")
Message-ID: <87k10vnrl1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41572
Cc: 41572 <at> debbugs.gnu.org, Dmitry Gutov <dgutov@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Zihao Zhu <cjpeople2013@HIDDEN> writes:

> Besides Perforce, Darcs and Fossil aren't supported yet. If we have
> plain project, we don't have to fiddle around with different sorts of
> VC.

Actually Fossil and Dards are supported, but you have to install the vc
backends:

- http://chiselapp.com/user/venks/repository/emacs-fossil
- https://www.irif.fr/~jch//software/repos/vc-darcs/

-- 
	Philip K.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 29 May 2020 04:34:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 29 00:34:46 2020
Received: from localhost ([127.0.0.1]:53560 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeWjF-0004Lk-Sb
	for submit <at> debbugs.gnu.org; Fri, 29 May 2020 00:34:46 -0400
Received: from mail-lj1-f193.google.com ([209.85.208.193]:38690)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cjpeople2013@HIDDEN>) id 1jeWjE-0004LY-2z
 for 41572 <at> debbugs.gnu.org; Fri, 29 May 2020 00:34:44 -0400
Received: by mail-lj1-f193.google.com with SMTP id m18so912521ljo.5
 for <41572 <at> debbugs.gnu.org>; Thu, 28 May 2020 21:34:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=subject:to:references:from:message-id:date:user-agent:mime-version
 :in-reply-to:content-transfer-encoding:content-language;
 bh=PggfGWRXipMh9fmk4HE05hn8c5c8xytkbb6oOywYKbE=;
 b=LahYJ84rQukBAEm/fXZVZf+AiFR66uYFTNumyAb6m02B+hH95/xYpnviduoO9qfoJp
 NVuG0QRs+AJWkTE5/PHqGHSK5Qnhhht3F4yjX1l9/clg2gRu+nU8Cml0LsR1Uq3NQRTs
 mhIgin8mjR2JbE/K5ziGaXmQW7mr4flLdDHYrPJgqaSlS+kJrhvpuYE3MEXFJ67kWxA/
 EW94Wyx19KqXi+EC0JcW3MKsIHE3ka0/3kDH8nmlEBhnGLi5kWXmEeox8keOyOKMvxCa
 aDyjMq2j0XJw9A+N7hDswQ+unBK4upoIAsK71H1edTm6B31nOpJTKdJ5h3iLU4VvFhjZ
 2kEw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-transfer-encoding
 :content-language;
 bh=PggfGWRXipMh9fmk4HE05hn8c5c8xytkbb6oOywYKbE=;
 b=JN7zvsvKPP5pd+jO6tBJokmoGE8/f7zhEMlb+Ny/+CDJ7FK3CPsGnCtcwTAPqL3aUd
 CjrS1gWmQAUzQxHdpWhQ+mHAlaxWule48aTxc2ZO9jrqMTtwx4PVa3thmiqV1myudi2n
 ljBplW5yqQ06v9XQ79Zkyk8Onydk9swo+xAVML247fj3t4S3BZDc4xW7Fcx+EIQCrIZR
 GYAiaPGRMcNUlhZm6tMszcKe1zZkj40oX1AEP7UFguH8DsGtlwEo/+kB8LO/UqnL+G5y
 Ie8DzHh6UD1kIXq4cY5fEKM5FbZ5g0KdOLPgSfmPEHJDNj+m2PxJ8GuibTo6ke0tsMD0
 CC9Q==
X-Gm-Message-State: AOAM5300gRrhDrOTxBvw612whiViF4ZFCFc5p3MxOCzAWzZ4zkko52L1
 0MHDzs4diQdbj0XQ3sOVeXQoPg9Uo3I=
X-Google-Smtp-Source: ABdhPJxSoWWZnaGCzOGZmRlB2Ah8hTEzn2dk3gfK3llFuuSq8MOgBx+UH3xw6A+Z6dXChD054OkefA==
X-Received: by 2002:a2e:150f:: with SMTP id s15mr3032977ljd.102.1590726877611; 
 Thu, 28 May 2020 21:34:37 -0700 (PDT)
Received: from [192.168.101.55] ([45.130.145.124])
 by smtp.gmail.com with ESMTPSA id a16sm1760498ljh.111.2020.05.28.21.34.35
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 28 May 2020 21:34:36 -0700 (PDT)
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
To: Dmitry Gutov <dgutov@HIDDEN>, 41572 <at> debbugs.gnu.org
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN>
 <ae0340ca-3889-b214-4536-327fedd19558@HIDDEN>
 <c7a38fab-d331-ed40-5a09-554ea097a31f@HIDDEN>
From: Zihao Zhu <cjpeople2013@HIDDEN>
Message-ID: <679e6ff0-b0e4-e212-34bc-60ff676d0b00@HIDDEN>
Date: Fri, 29 May 2020 12:34:33 +0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.1
MIME-Version: 1.0
In-Reply-To: <c7a38fab-d331-ed40-5a09-554ea097a31f@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 41572
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

Besides Perforce, Darcs and Fossil aren't supported yet. If we have 
plain project, we don't have to fiddle around with different sorts of VC.

A more netrual suggestion: We can make project-find-functions a 
defcustom first.


On 2020/5/29 上午3:58, Dmitry Gutov wrote:
> On 28.05.2020 18:46, Zihao Zhu wrote:
>> If I have a project.el based plugin,  and I wanna use them in a 
>> directory not under VC. Add an mark to force project.el work is 
>> easier than modify the source of plugin or initialize VC system.
>
> The problem with that, is that next time we'll get a report that these 
> projects are too slow. Or that people who added .emacs-project file in 
> the middle of a VC repository suddenly get significantly worse file 
> listing performance, without expecting it.
>
> So we'd have to add caching to the file list, and then some 
> invalidation, probably. And I'm not a fan of having manual 
> invalidation commands.
>
> That's why I'm wary of adding such a separate project type by default, 
> especially when the initial proposal doesn't add any of the advanced 
> features described above, or explains how they won't be necessary.
>
> But opinions welcome.
>
>> And this  can also be used as a side solution to use project.el in 
>> unsupported VCed project in Emacs (AFAIK, P4(Perforce) is not 
>> supported by vc.el).
>
> Perhaps we could add Perforce support to project-vc instead?
>
> There was a vc-p4 packages somewhere out there. But if it's entirely 
> dead, we could add such support to project--vc-list-files directly.
>
> Or, better yet, release it as a project-p4 package on GNU ELPA.
>
> That all depends, of course, on whether the p4 command line utility 
> also has the means to quickly list repository files and add ignores.
>
>> IMO, a plain project is like a transient project.
>
> One difference is, nobody really expects much from "transient" 
> projects. And this type of project is only applied when the directory 
> is not covered by any other kind of project.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 28 May 2020 19:59:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 15:59:09 2020
Received: from localhost ([127.0.0.1]:53127 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeOgH-0002Bp-6Z
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 15:59:09 -0400
Received: from mail-wr1-f65.google.com ([209.85.221.65]:35475)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1jeOgE-0002BE-SF
 for 41572 <at> debbugs.gnu.org; Thu, 28 May 2020 15:59:07 -0400
Received: by mail-wr1-f65.google.com with SMTP id x14so594156wrp.2
 for <41572 <at> debbugs.gnu.org>; Thu, 28 May 2020 12:59:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=JoLLXPZ2pNsIkcIKRLZxLyraQvlQplh4Z2uvQkIx9bs=;
 b=b09NJjJEiYoCfAhKMwKYnubuPXzLxA1436/IiDAVei2cvYVg+sXV+xpw67kQu1/UBS
 hyXiNAR3XFkGtg1vwRlwHQrGVhNS0Cz2n6kQ4uRwr0lqqKONeueQtGb/nGmh7hK2CTtK
 wQm2i56HxS/zTTa05SiM0EVX9FkGpudmBZoz2x0E0f4Z/OcfEZDhuFTQhGVT0B92FmwX
 UW3U/N0i7BgmB2LlvSu6ixDUj8HfR+TY9F/6HMs7N6oorv91NwmQ7sAq37XCz5mdsFqv
 TDPpa2Dve5+5GYflq3HZL2c9ODCE1NG6DV5r9/eiK3nwp6cDWVyfJNv6Xr6Q17uw+p6b
 yX5Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=JoLLXPZ2pNsIkcIKRLZxLyraQvlQplh4Z2uvQkIx9bs=;
 b=f2fm0bomDLNBRhv2ikq96XqhGIw9crVzneAEzRS+mtJDALtvy2eh6c3WACsQ8pVZFr
 iwFzK2iD6PqAT9Xv2EkrGAzPS72m6Fm2iIYIAq92pPg0C/8qYTI0sctWcJYUYSew69ti
 ooU0jCGFnVkObiA1nQ9TsbkxeFGNtCXC8MZcgR/6LgmS8zm9y18mbHpBT4M0+gy9mAI8
 +3pDUCYVMjmh8LI3Qv1gGnCEBi6pIKnDaGESRi97TYLDIBUtIKuZzShXoKpwP1PWlJuC
 /QwyP1M51SOPGBCCwuEexKoh6bV6weOYp3yJX7cjlUlT2KAlslXy2tZaBiFjAuXUBroG
 zG1A==
X-Gm-Message-State: AOAM532J00x/fkzJ1D66E1N48AEIBnLTeYa0dTH3mQT0VcJZO6OvL/4d
 CsUYvAgcO41ltSdi57RzQiJ5UlUv
X-Google-Smtp-Source: ABdhPJyi+SCvgZEi8CfO57sGBzZ0bd8HSdCjbYgN4y9gOUK4xd1tWl21JWuNw+JB3EDm3GM3K+P6rw==
X-Received: by 2002:adf:9545:: with SMTP id 63mr4944063wrs.303.1590695940634; 
 Thu, 28 May 2020 12:59:00 -0700 (PDT)
Received: from [192.168.0.3] ([66.205.73.129])
 by smtp.googlemail.com with ESMTPSA id s2sm7102523wmh.11.2020.05.28.12.58.59
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 28 May 2020 12:58:59 -0700 (PDT)
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
To: Zihao Zhu <cjpeople2013@HIDDEN>, 41572 <at> debbugs.gnu.org
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN>
 <ae0340ca-3889-b214-4536-327fedd19558@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <c7a38fab-d331-ed40-5a09-554ea097a31f@HIDDEN>
Date: Thu, 28 May 2020 22:58:58 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <ae0340ca-3889-b214-4536-327fedd19558@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 41572
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 28.05.2020 18:46, Zihao Zhu wrote:
> If I have a project.el based plugin,  and  I wanna use them in a 
> directory not under VC. Add an mark to force project.el work is easier 
> than modify the source of plugin or initialize VC system.

The problem with that, is that next time we'll get a report that these 
projects are too slow. Or that people who added .emacs-project file in 
the middle of a VC repository suddenly get significantly worse file 
listing performance, without expecting it.

So we'd have to add caching to the file list, and then some 
invalidation, probably. And I'm not a fan of having manual invalidation 
commands.

That's why I'm wary of adding such a separate project type by default, 
especially when the initial proposal doesn't add any of the advanced 
features described above, or explains how they won't be necessary.

But opinions welcome.

> And this  can also be used as a side solution to use project.el in 
> unsupported VCed project in Emacs (AFAIK, P4(Perforce) is not supported 
> by vc.el).

Perhaps we could add Perforce support to project-vc instead?

There was a vc-p4 packages somewhere out there. But if it's entirely 
dead, we could add such support to project--vc-list-files directly.

Or, better yet, release it as a project-p4 package on GNU ELPA.

That all depends, of course, on whether the p4 command line utility also 
has the means to quickly list repository files and add ignores.

> IMO, a plain project is like a transient project.

One difference is, nobody really expects much from "transient" projects. 
And this type of project is only applied when the directory is not 
covered by any other kind of project.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 28 May 2020 15:47:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 11:47:00 2020
Received: from localhost ([127.0.0.1]:52866 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeKkG-0004RW-H0
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 11:47:00 -0400
Received: from mail-lf1-f46.google.com ([209.85.167.46]:41184)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cjpeople2013@HIDDEN>) id 1jeKkE-0004RC-G2
 for 41572 <at> debbugs.gnu.org; Thu, 28 May 2020 11:46:58 -0400
Received: by mail-lf1-f46.google.com with SMTP id u16so15085841lfl.8
 for <41572 <at> debbugs.gnu.org>; Thu, 28 May 2020 08:46:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=subject:to:references:from:message-id:date:user-agent:mime-version
 :in-reply-to:content-transfer-encoding:content-language;
 bh=GubtCaiHjQE6ZsMWQerCzLSvngFKfYG196MQNu5a8Qs=;
 b=GrHND2mzAQD1B+2MfMZkjEMDvJiiZ8XFWx2LFuOxzaBU84tYxKy9gSDpTEDO65Nx/U
 NMSYtpRx7rLMRD5WaQzspLfZAv1HXp8rzDkZe3L2lKebdFrGtDHeqH6GxKS6NBl5qrpJ
 qzNE5YihlYIKagU6yZSxsuR39ZU91hcmx/UFhJ2DZDxB5vFMoUpt3qjUArMjjoozd+ds
 VQBEXGokbSVf3UCgia1ymndxybBfnISVAbx43PrHh6mODZApAHov3SResjP0WucpzvJv
 nFYkSGoi6BqJOsuAc0fkovVYFocSJKOKBBdN8k3I+/ojoUCPSFJv9CecNwbjxEHDNkox
 WXJA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-transfer-encoding
 :content-language;
 bh=GubtCaiHjQE6ZsMWQerCzLSvngFKfYG196MQNu5a8Qs=;
 b=Gc8XKK1tmDAK87C8y+iPdtLAjkcn+b4Uo17CcUglULY+baRxqrM37hIyiUiVtIdDz6
 ggimj7e5Hgq9WpNw5XijvXfrnn+amhkNp0exo6VaK7PzzaoEGwirBfMmI8hUlX+wGfJf
 qBgBY4cgtYHSCIDOn4Lbml/0uyWKOQdmHw3ZjdabHY/a3UNci6brTeJpUaroFdYosdQl
 YBl+YizZTg4Hn5gHKPI+fvejYfgVr5oNGCvZuWUomwVKOWcx0Lh72U2W251b7IupWWs+
 Q9IOiXTyUVNP2vbxMswhfhA5Tn3fFGY1RJ2qaIvYVUPPOrfBcNAJAqB0gW5NinHXj0zs
 8WZw==
X-Gm-Message-State: AOAM53049exnrbwMnbnDhwkJmnt0Mmh8KEqUQReLzIhRrCBftAIst8+n
 tLLdq+l+kHmBMbTNqiKKjwE56FQrtSk=
X-Google-Smtp-Source: ABdhPJwR3KCKFqF4b4GiqXe9/MQGWk7JLPFm1+zjS3l438v8lTIgo1d2mtb4uk6IkBoBux66fN+Kvw==
X-Received: by 2002:a19:8453:: with SMTP id g80mr2011812lfd.167.1590680812004; 
 Thu, 28 May 2020 08:46:52 -0700 (PDT)
Received: from [192.168.101.55] ([45.130.145.124])
 by smtp.gmail.com with ESMTPSA id x8sm1498391lji.95.2020.05.28.08.46.49
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 28 May 2020 08:46:51 -0700 (PDT)
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
To: Dmitry Gutov <dgutov@HIDDEN>, 41572 <at> debbugs.gnu.org
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN>
From: Zihao Zhu <cjpeople2013@HIDDEN>
Message-ID: <ae0340ca-3889-b214-4536-327fedd19558@HIDDEN>
Date: Thu, 28 May 2020 23:46:43 +0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.1
MIME-Version: 1.0
In-Reply-To: <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 41572
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

If I have a project.el based plugin,  and  I wanna use them in a 
directory not under VC. Add an mark to force project.el work is easier 
than modify the source of plugin or initialize VC system.

And this  can also be used as a side solution to use project.el in 
unsupported VCed project in Emacs (AFAIK, P4(Perforce) is not supported 
by vc.el).

IMO, a plain project is like a transient project.

On 2020/5/28 下午8:35, Dmitry Gutov wrote:
> Hi!
>
> On 28.05.2020 06:32, Zhu Zihao wrote:
>> This patch add support for "plain project" in project.el. Plain 
>> project is a
>> kind of project without any VC backend but should be.
>>
>> To mark a directoy as project, put an empty magic file .emacs-project 
>> under the
>>
>> directory, and project.el should be responsible for it.
>
> Is that really a good idea?
>
> I mean, you of course can set up a project type like that yourself.
>
> But if it's included in project.el, it means we're taking it 
> seriously. And there's no way to specify the ignored files, say. And 
> file enumeration will inevitably be slower than in VC-based projects.
>
> Do you have a lot of projects that aren't backed by VC repositories?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 28 May 2020 15:14:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 11:14:41 2020
Received: from localhost ([127.0.0.1]:52786 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeKEz-0003ap-8P
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 11:14:41 -0400
Received: from mail-wr1-f50.google.com ([209.85.221.50]:37678)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cjpeople2013@HIDDEN>) id 1jeGhk-0001zH-9B
 for 41572 <at> debbugs.gnu.org; Thu, 28 May 2020 07:28:08 -0400
Received: by mail-wr1-f50.google.com with SMTP id x13so12830126wrv.4
 for <41572 <at> debbugs.gnu.org>; Thu, 28 May 2020 04:28:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=j/Lusj2BzewKWiBpnMS0+fQe+QqIp9Ij9aVcwnV0iVA=;
 b=QlLI55pBrUyIM3ugV8lu5ha6eG/MsnXp5SOkgyL1vVgm/7Qw236taYkYE50iij08t0
 JwFCF+t/+yuRbY+A9Vri5+6/Bt4VttNqOtLrm1bKz2S2hmWeH0fmGqL4YPVDuOMrOysn
 2iTjt7RyOrrggQDnVlJu+1GkBwRYtu0HttCHxfI/28pEnSW8zZ2OrT8aO6sav8O9J6Oj
 hUjtJbjjYnexIedPJB4JYI9tGwDE5leESJ0B5+yl+h3bbxqd6SB5nuW6I3FuwkyCfzAv
 DERipuLpRZ3XwrzdgvnkrRKJLmunggj7wwaZaKk/er5xx70SU6yJHHzI3h3Vi0hHO6h4
 zH+Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=j/Lusj2BzewKWiBpnMS0+fQe+QqIp9Ij9aVcwnV0iVA=;
 b=qOqxwiVbq7DhkXu9StOcnjmaqam9jP4rSJQO1OEHWq/Ukjtkt7RXCz0VvT/2Qe7RUz
 39XejLURsl/XbH7D9X0IC3WCeAT4AQbG0yHUZ+WcbCfOw39FEQeNxjsGhf+boKFy0JQf
 ysQfMpxhjjR4aM+AWyaVOlebN1JXHu5UFVNeQIXw5cNP3BnshTF5cY0rZ7mbRdsRUIkL
 ubNG1bFa9IKSysHwvdV/CftBLKHzD9eqdrKeMsRNhetgJS97FVuYokErhbkahvZjZj5y
 rfoHVWbtNnKIZHAm7oqN2YgSodJt2HuBaVHzYusDPLxU+Mwb9wxVFqWheAUraXGvuNAv
 oYng==
X-Gm-Message-State: AOAM531HEx/Ekao8hm8NhA0jzjlrSkjxNACEqk9sHvl9ATkYQbYczswU
 GwmLHTEwsCyynNumMHsR64dy4ojfiz2M+QE4/hQ=
X-Google-Smtp-Source: ABdhPJxSJpQOgWbmMSoKJvPHs4uQkc0p1F0+/eCF56rA/nMMi0kh3UcuOHnxWzyVz5bnraPqMW8VHTwKVyhmrpmczS0=
X-Received: by 2002:a5d:4d89:: with SMTP id b9mr3378671wru.210.1590665281667; 
 Thu, 28 May 2020 04:28:01 -0700 (PDT)
MIME-Version: 1.0
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <877dwweca3.fsf@HIDDEN>
In-Reply-To: <877dwweca3.fsf@HIDDEN>
From: Zhu Zihao <cjpeople2013@HIDDEN>
Date: Thu, 28 May 2020 19:27:48 +0800
Message-ID: <CA+rDc=AJU7Wt0_hUxaxhvLK08eXRGM0nuud4hL=dOq-fNii-dQ@HIDDEN>
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
To: "Philip K." <philip@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000012062a05a6b39f0f"
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 41572
X-Mailman-Approved-At: Thu, 28 May 2020 11:14:39 -0400
Cc: 41572 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--00000000000012062a05a6b39f0f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

IMO, it's not practical to use directory local variable

1. directory local variable goes ".dir-local.el". But we can't mark every
directory contain this file as project. We have to do extra search if we
use directory local variable.

2. If we have variable "project-directory-plain-project-p", It's a problem
for us to determine the root


On 2020/5/28 =E4=B8=8B=E5=8D=883:42, Philip K. wrote:

Zhu Zihao <cjpeople2013@HIDDEN> <cjpeople2013@HIDDEN> writes:


To mark a directoy as project, put an empty magic file .emacs-project under=
 the
directory, and project.el should be responsible for it.

Is there any more standard name than ".emacs-project"? Or could a
directory local-variable be used? I like the idea, but wouldn't want to
have so many ".emacs-project" files lying around in toy projects.

--00000000000012062a05a6b39f0f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">
 =20
   =20
 =20
  <div>
    <p>IMO, it&#39;s not practical to use directory local variable</p>
    <p>1. directory local variable goes &quot;.dir-local.el&quot;. But we c=
an&#39;t
      mark every directory contain this file as project. We have to do
      extra search if we use directory local variable.</p>
    <p>2. If we have variable &quot;project-directory-plain-project-p&quot;=
, It&#39;s
      a problem for us to determine the root <br>
    </p>
    <p><br>
    </p>
    <div>On 2020/5/28 =E4=B8=8B=E5=8D=883:42, Philip K. wrote:<br>
    </div>
    <blockquote type=3D"cite">
      <pre>Zhu Zihao <a href=3D"mailto:cjpeople2013@HIDDEN" target=3D"_b=
lank">&lt;cjpeople2013@HIDDEN&gt;</a> writes:

</pre>
      <blockquote type=3D"cite">
        <pre>To mark a directoy as project, put an empty magic file .emacs-=
project under the
directory, and project.el should be responsible for it.
</pre>
      </blockquote>
      <pre>Is there any more standard name than &quot;.emacs-project&quot;?=
 Or could a
directory local-variable be used? I like the idea, but wouldn&#39;t want to
have so many &quot;.emacs-project&quot; files lying around in toy projects.

</pre>
    </blockquote>
  </div>

</div>

--00000000000012062a05a6b39f0f--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 28 May 2020 15:14:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 11:14:41 2020
Received: from localhost ([127.0.0.1]:52784 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeKEy-0003an-OX
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 11:14:41 -0400
Received: from mail-lf1-f65.google.com ([209.85.167.65]:35089)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cjpeople2013@HIDDEN>) id 1jeGaj-0001mY-4Q
 for 41572 <at> debbugs.gnu.org; Thu, 28 May 2020 07:20:53 -0400
Received: by mail-lf1-f65.google.com with SMTP id 82so16358014lfh.2
 for <41572 <at> debbugs.gnu.org>; Thu, 28 May 2020 04:20:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-transfer-encoding:content-language;
 bh=jh1kEJ4HUm/oMiOanXZAZZ+hXrTiNdYMIJR60LpoXQQ=;
 b=VZRiSao+LvRZC34Rlz7sr+bTFE2iN+oVosnEKN0AxD5jIYAj4DrbnHD2nJAMlQ9mzz
 ZmYAqP5+eKCrI+ngJ0JvMEyFZeuoKU2qZSdY+KuqYeDba3LeuRVaclkdta5T/r7nrNro
 eCsHVFjUpV5vQK6jEFoVcABXjWbjAoSeXFxqq175l/VptWP7oLPVCrouh6zUdxAWshcp
 RJfv9ys50yD8DAWdzxRgNrXEbs0GINLHbhaC7cvZq1DM9ahXYdWMnZZg+FRtSZ5JHrFv
 bC691e/oG9bqPa2fDcr8Jedu1GvCyOrgHIu9LarK1buPfxJZ42wy+g7vhNyGFRe2h4rW
 MVXg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:cc:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-transfer-encoding
 :content-language;
 bh=jh1kEJ4HUm/oMiOanXZAZZ+hXrTiNdYMIJR60LpoXQQ=;
 b=UQjrIaUdDaEpv0juRaj8Ath4jsCjLX6WxtH6UZFyxJB5oW6Rr7H9MLCttq0ftUBLA2
 lvUb4wTCIz8z9tOfmksumQJ8tOXgumLZJ/cwxje3AUBwbKH5VeP4Ef9vDWrPFqMtb0AD
 9YCeTeVO/xjQhFDFNRcfZoOJ5EF/HBJzee/L6KCs0R/Wuby5ln4+P/6+bmljlvSyA91U
 HESrALRXkQHtw3ujbzYVj84rRIduWXiYq1nAVHpDnjf3nvm1NOCSE2q9swpftFGxdQaB
 XWzdALYX35bOVIcpj8Vs4FQ4qK1bp0fXHTM/y5DzMpHf2lIlBWNSa12vhtEizyaYfwdm
 OmxA==
X-Gm-Message-State: AOAM5329diyWD1E22QNeXfWTR76/PTi8KN2Q6lJ0eGw1ru77kaCXdd0Z
 niafEkebZ5ynBq0XuGo8U7qw12SkORk=
X-Google-Smtp-Source: ABdhPJyQmTUFSPqwKFEQ6hPknGi+Ufv2lk7cLjeHhxsCqZ+HAd/YH0RvCzhZ+KdglgyT69qiwBNQpg==
X-Received: by 2002:ac2:485a:: with SMTP id 26mr1156423lfy.57.1590664846651;
 Thu, 28 May 2020 04:20:46 -0700 (PDT)
Received: from [192.168.101.55] ([45.130.145.124])
 by smtp.gmail.com with ESMTPSA id y18sm1568975ljj.81.2020.05.28.04.20.44
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 28 May 2020 04:20:45 -0700 (PDT)
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
To: "Philip K." <philip@HIDDEN>
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 <877dwweca3.fsf@HIDDEN>
From: Zihao Zhu <cjpeople2013@HIDDEN>
Message-ID: <fc7bcdba-c401-292f-511d-d9af8225be20@HIDDEN>
Date: Thu, 28 May 2020 19:20:41 +0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.1
MIME-Version: 1.0
In-Reply-To: <877dwweca3.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 41572
X-Mailman-Approved-At: Thu, 28 May 2020 11:14:39 -0400
Cc: 41572 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

IMO, it's not practical to use directory local variable

1. directory local variable goes ".dir-local.el". But we can't mark 
every directory contain this file as project. We have to do extra search 
if we use directory local variable.

2. If we have variable "project-directory-plain-project-p", It's a 
problem for us to determine the root of project because we will get the 
same directory local value for all sub-directories of project root.

In your use case. I think we can add variable "project-known-projects", 
you can  add your favorite directory to it, you can also persist this 
variable using savehist.el


On 2020/5/28 下午3:42, Philip K. wrote:
> Zhu Zihao <cjpeople2013@HIDDEN> writes:
>
>> To mark a directoy as project, put an empty magic file .emacs-project under the
>> directory, and project.el should be responsible for it.
> Is there any more standard name than ".emacs-project"? Or could a
> directory local-variable be used? I like the idea, but wouldn't want to
> have so many ".emacs-project" files lying around in toy projects.
>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 28 May 2020 12:36:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 08:36:09 2020
Received: from localhost ([127.0.0.1]:51244 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeHlZ-0007wt-Lj
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 08:36:09 -0400
Received: from mail-wm1-f65.google.com ([209.85.128.65]:55789)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1jeHlU-0007wL-1U
 for 41572 <at> debbugs.gnu.org; Thu, 28 May 2020 08:36:08 -0400
Received: by mail-wm1-f65.google.com with SMTP id c71so2933940wmd.5
 for <41572 <at> debbugs.gnu.org>; Thu, 28 May 2020 05:36:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=kcpjlAry7hAVjDr08KCdHX7wZVmOI2kmdZGJCbV6UkQ=;
 b=EahEs6MaUDRHp0HFM8CR4D/qblSG3MWy3ejoXFfnS3ttSiLWJCT7RR620f3hZCV2Ox
 3Fm7oqra9RANIzz1+4SHY8q4iW8ZD9E0Tr0BL+QAWnzp5uE8xAo9PHZNpd3TlKMEDrXE
 eRMP7KdQ02VgIFUo12y0/xDqvGwwhmrxTmZ76tNVjak7sPgkrozQn7pw1OEC3nU1fqVB
 rmY+Vu0lLB6VvSOllmallh4k6SxvmKrndZvIUkCfi3nTLt8PKE6clYYxNpcu7ioVNcWE
 II7+tZeKV8oGZRWBVEFLWJfcmuf/VCxhlLPSrkWfbZ4oKPOcW0KLlAOw9Wsyflcr2/eD
 ncDA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=kcpjlAry7hAVjDr08KCdHX7wZVmOI2kmdZGJCbV6UkQ=;
 b=BnG6JXd6huNXAT9xb7aaeqajHoF0pZd+ZZcVarykmvXyR6LczgB0VW8QgYVKMoZ8jL
 VULS7RRqkvGSpRx8wQWzvMR6gqUJEVTPa3M8z56q7y7lUdwInyKpBn62a6CFSEzgysOZ
 7ULpgMcFrx9h3Oxuf5UJEKRx5P7EuwvVLZGXxRl0IzWv/OaTCfGcSBlSsgh0PRb514ym
 jrke7mqlgJf/95bYbtsvx0bR+xAFHBtXUVqeSHVVxrenvxmHjQV/DiepvFx8/uG5V3aN
 u3Ryun5ElbvAwA1JviJcfCRggJTm5114f26zOYF2c00qwDkEFSKUko4JCWPJXdMog5r3
 EzcA==
X-Gm-Message-State: AOAM532h/VnY6zCZJ+uVEOcWehXGyOKuxRpDmnFN8YPwgVp/jgQEOfUb
 Wcbt4dyJsLC3D3It3BFL0/juB+Ii
X-Google-Smtp-Source: ABdhPJzzrO49rpBhJJ1ES6IsyS0+QlszFSFEXPeVx9/fLViRCrlu5qY6+ryfODgI4c4E1P2qq8aGzg==
X-Received: by 2002:a1c:5408:: with SMTP id i8mr3131795wmb.94.1590669357723;
 Thu, 28 May 2020 05:35:57 -0700 (PDT)
Received: from [192.168.0.3] ([66.205.73.129])
 by smtp.googlemail.com with ESMTPSA id a6sm5778994wrn.38.2020.05.28.05.35.56
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 28 May 2020 05:35:57 -0700 (PDT)
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
To: Zhu Zihao <cjpeople2013@HIDDEN>, 41572 <at> debbugs.gnu.org
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <5f584d83-ef45-9912-bfbc-d2f00b24b9fd@HIDDEN>
Date: Thu, 28 May 2020 15:35:55 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 41572
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Hi!

On 28.05.2020 06:32, Zhu Zihao wrote:
> This patch add support for "plain project" in project.el. Plain project is a
> kind of project without any VC backend but should be.
> 
> To mark a directoy as project, put an empty magic file .emacs-project 
> under the
> 
> directory, and project.el should be responsible for it.

Is that really a good idea?

I mean, you of course can set up a project type like that yourself.

But if it's included in project.el, it means we're taking it seriously. 
And there's no way to specify the ignored files, say. And file 
enumeration will inevitably be slower than in VC-based projects.

Do you have a lot of projects that aren't backed by VC repositories?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 28 May 2020 12:24:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 08:24:26 2020
Received: from localhost ([127.0.0.1]:51231 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeHaD-0007ei-UW
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 08:24:26 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:39897)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1jeHaB-0007eU-7X
 for 41572 <at> debbugs.gnu.org; Thu, 28 May 2020 08:24:23 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id EC87F5C00E4;
 Thu, 28 May 2020 08:24:17 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Thu, 28 May 2020 08:24:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=warpmail.net; h=
 from:to:cc:subject:in-reply-to:date:message-id:mime-version
 :content-type:content-transfer-encoding; s=fm3; bh=3AsbQFLCcGTtu
 3MbPJuU+0mKvGjufaHOvyHrdjcvKBo=; b=pv3NAnDAx8YBk6EAQyHm54v/KEn9a
 ToIVVC59U7Xp59NxP1rrfqkWiIf3qbL6Q9lcJ/Alj8kTq90Iq3nrGq0NvS5C3IAS
 FFChse7+r1HJ3WUkTLmyDUcWMBR67VThDIrVVZVigSvf8ooyVb3BSSD/1xhpfRlz
 bdWUyJpsqWrNWxtnj3OXBykYSH3EiXOTyGLf0XK8G9Pvs5Y4Xs9nnPKELHQW6BrY
 Ux3zQmTj81SgwN8URPHM01bpfQgsBqKf6k42Ah7WpJphWTx7I/7V+zulPcC3HuDD
 zTGzqfPsLulyjp7FROax2CivZkbq9mPHnoW5gajJqb+grP3SOb0LKVqEg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:subject:to
 :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm2; bh=3AsbQFLCcGTtu3MbPJuU+0mKvGjufaHOvyHrdjcvKBo=; b=bPWB9h80
 nBzmRIPd6o2e4ztUYI0QNlOpsMD+KaUnXBHapqEcq/gWfWFWaIwR9ZO3u3KJVN0v
 FgpZqctDhiYt1j+2sPZLbBnjheMl/pyKLwUNsuJhcqEeVvuPP9HCYpZ9DprP7n3K
 xBAbSN1E+Yl+iOW1VeYfn55nIStUCfIi86ak579UVlEBeAxaPkAmZnuW29QvNE4A
 nFnUEaYjd3myF5OqZuxSxj0wFOUP2WmN6o+7IiH7zb3DuW/+ShZjpTie+dMcFO8R
 QIh8XIZ7OfYMUhDExTkusGeLvbkNx6QeB7kiunonpI6pc7d6Df3Jkp9Mw7zswmdz
 w9Pj9h0OyjPJIQ==
X-ME-Sender: <xms:ca3PXvKSBFOHUpPcITzB6Yv04ZzfW1t1qvKTbF8hvke9Apd_c0OD5g>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddviedgvdehucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujgffkfggtgfgsehtqhertd
 dttdejnecuhfhrohhmpedfrfhhihhlihhpucfmrddfuceophhhihhlihhpseifrghrphhm
 rghilhdrnhgvtheqnecuggftrfgrthhtvghrnhephfdujeevuddvffetudfghfduvdfgve
 ffueefvdeljeeuffejheeludeftdduffefnecukfhppeejledrvdduledrvddtiedrvddv
 feenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphh
 hilhhiphesfigrrhhpmhgrihhlrdhnvght
X-ME-Proxy: <xmx:ca3PXjIZBhBj7t5kEBwR_EgTXqTWObgWkMtQXyPPZ-TWieLknHbNPQ>
 <xmx:ca3PXnv-s9pOyXACcZqImZ9iTHNQuIsIRPxcnQMhnsYXiMCkQ8tlpA>
 <xmx:ca3PXoZIjV30ebiXfYxGWT8bApILhWub7C37BXYwIdiNhDyYFmmAjw>
 <xmx:ca3PXvmpJaJrynsXkE2XE6ASCbU01fSLDQHVkjsFAAEdPU58cR61hA>
Received: from localhost (p4fdbcedf.dip0.t-ipconnect.de [79.219.206.223])
 by mail.messagingengine.com (Postfix) with ESMTPA id 50C813280059;
 Thu, 28 May 2020 08:24:17 -0400 (EDT)
From: "Philip K." <philip@HIDDEN>
To: Zihao Zhu <cjpeople2013@HIDDEN>
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
In-Reply-To: <fc7bcdba-c401-292f-511d-d9af8225be20@HIDDEN> (message from
 Zihao Zhu on Thu, 28 May 2020 19:20:41 +0800)
Date: Thu, 28 May 2020 14:24:04 +0200
Message-ID: <874ks0dz8b.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41572
Cc: 41572 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Zihao Zhu <cjpeople2013@HIDDEN> writes:

> IMO, it's not practical to use directory local variable
>
> 1. directory local variable goes ".dir-local.el". But we can't mark=20
> every directory contain this file as project. We have to do extra search=
=20
> if we use directory local variable.

Not necessarily, if the directory variable would contain a (relative)
path to where the project root is.

> In your use case. I think we can add variable "project-known-projects",=20
> you can=C2=A0 add your favorite directory to it, you can also persist thi=
s=20
> variable using savehist.el

I actually think this is better (given there is a command to add a
directory to the list of known projects), because you could also build a
project switcher on this foundation.

And if the variable is a user option (which I think it should be),
savehist shouldn't be necessary.

--=20
	Philip K.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at 41572 <at> debbugs.gnu.org:


Received: (at 41572) by debbugs.gnu.org; 28 May 2020 07:42:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 03:42:27 2020
Received: from localhost ([127.0.0.1]:50871 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeDBI-0004Oa-6N
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 03:42:27 -0400
Received: from out2-smtp.messagingengine.com ([66.111.4.26]:53109)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1jeDBF-0004OL-Vo
 for 41572 <at> debbugs.gnu.org; Thu, 28 May 2020 03:42:22 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id 96E555C005C;
 Thu, 28 May 2020 03:42:16 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Thu, 28 May 2020 03:42:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=warpmail.net; h=
 from:to:cc:subject:references:date:in-reply-to:message-id
 :mime-version:content-type; s=fm3; bh=jTPLFG5+MDVKpud27S0apR4uSu
 /9OJV0/JE1A1y49TM=; b=dP54LyPaEEI7iprfS/ZubOE8Uyp387kFsOvAhftb5+
 V1F1OKyoN9CVG9eeBsQ55n4L3Tq59IE3HxKLBWVegPawsOXsf8Txb8f88Y0ltW2f
 amAsKLf6OERpty5K6q/kl5/4Go8V5tbV2iJ7TcbCkr9FgA9WISmmZrqOQf7vu0pw
 NqdtPljUE4pYq9jxURMnHlSjBXeqY7Lg1WV8tmDvkvsU06txOCmvMK68yPOgc91K
 0onYibxsyKA6tOnYHal85TIFvbnP3CGnuiZym72/x8WffXg8wdIWbStAOwJyKgiP
 5h3yzLj7d0ynW1KozkcIC8zsCXUXBU2sTEFw7Z7HHS+Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=jTPLFG
 5+MDVKpud27S0apR4uSu/9OJV0/JE1A1y49TM=; b=1ndU6hA882QlvhO1XK8aBW
 a/fcOZtc0Yi8Ss3szFfO1hvrOCbaHW2CJUvbSJ3HxSjPM/0kELAgZGWP9p2+oBcv
 iyZHVDT4WQb9ezOn7WMmfc6bb+hEje2K46WzsuzBeXRffed43bxerVaBmWemOGH9
 2isndiwQREL8r5JZCQVDz52c0hI69sNsOsTPzK39QRQYXlyGm8JykzwenTwKNeBo
 8puuS5JZKjhOFbPq1/90yNQdauqwKBEKAlAIlLpb6qjesPZBX9KyzkW+Q67hJiFJ
 7jo8bbdYikBgkK+Iq2lWESs5ZVPHJFqjDQgLRyMXYHmE0gZwu37Gy9bmGCqSodHA
 ==
X-ME-Sender: <xms:WGvPXiGhEksWILcl3my56-srav8feHbuWRRLagRo7KA64JhCRs_XEw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddvhedguddtvdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhfffgjkfgfgggtsehttd
 ertddtredtnecuhfhrohhmpedfrfhhihhlihhpucfmrddfuceophhhihhlihhpseifrghr
 phhmrghilhdrnhgvtheqnecuggftrfgrthhtvghrnhepudekueevlefgfeeigefhgeelte
 evieehhfetjefgieduheegvdfhffejhfffleffnecukfhppeejledrvdduledrvddtjedr
 udefleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 hphhhilhhiphesfigrrhhpmhgrihhlrdhnvght
X-ME-Proxy: <xmx:WGvPXjVdFCTbJBfZ9Pi7g2nk1RXsW0S2n35LuSIN-5qNO6oYALc_YQ>
 <xmx:WGvPXsKlpYKycNDUBz5uaF7bHd7d1kG7bfb9oONHyZ5FjU2j5VpinA>
 <xmx:WGvPXsFLL8MhjqXNrgqMbpQyC7RZxDYSXa_bA3qckYYJ1O_kG9pwQA>
 <xmx:WGvPXgivj5Rrynw5hBMqINwNlE4WtRVl86UjAFVw_zqGPes4EE_NjA>
Received: from localhost (p4fdbcf8b.dip0.t-ipconnect.de [79.219.207.139])
 by mail.messagingengine.com (Postfix) with ESMTPA id 1E6F13061856;
 Thu, 28 May 2020 03:42:16 -0400 (EDT)
From: "Philip K." <philip@HIDDEN>
To: Zhu Zihao <cjpeople2013@HIDDEN>
Subject: Re: bug#41572: 28.0.50; [PATCH] Support plain project marked with
 file .emacs-project
References: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
Date: Thu, 28 May 2020 09:42:12 +0200
In-Reply-To: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
 (Zhu Zihao's message of "Thu, 28 May 2020 11:32:04 +0800")
Message-ID: <877dwweca3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41572
Cc: 41572 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Zhu Zihao <cjpeople2013@HIDDEN> writes:

> To mark a directoy as project, put an empty magic file .emacs-project under the
> directory, and project.el should be responsible for it.

Is there any more standard name than ".emacs-project"? Or could a
directory local-variable be used? I like the idea, but wouldn't want to
have so many ".emacs-project" files lying around in toy projects.

-- 
	Philip K.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 28 May 2020 04:45:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 28 00:45:15 2020
Received: from localhost ([127.0.0.1]:50629 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jeAPr-0008GA-0h
	for submit <at> debbugs.gnu.org; Thu, 28 May 2020 00:45:15 -0400
Received: from lists.gnu.org ([209.51.188.17]:44556)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cjpeople2013@HIDDEN>) id 1je9HG-0006SU-VJ
 for submit <at> debbugs.gnu.org; Wed, 27 May 2020 23:32:20 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53224)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <cjpeople2013@HIDDEN>)
 id 1je9HG-0007xS-PF
 for bug-gnu-emacs@HIDDEN; Wed, 27 May 2020 23:32:18 -0400
Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:37506)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <cjpeople2013@HIDDEN>)
 id 1je9HF-0000eZ-T9
 for bug-gnu-emacs@HIDDEN; Wed, 27 May 2020 23:32:18 -0400
Received: by mail-wr1-x430.google.com with SMTP id x13so11719813wrv.4
 for <bug-gnu-emacs@HIDDEN>; Wed, 27 May 2020 20:32:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=nvwWOMTGQ77E0LmZeuZKEvQxuFEurtKs8hS6ulk6Aag=;
 b=isjhY+H8PBGWl+nyBooQ6/yNroJxqyv6LFGDCCbIMNeIe0Brrv80UhWt5tF/xz8xxM
 1uXlaeC6hT6WSG8n8Siou9iIx/cxtO7oOWD6PGNVzWnYIW0JP+l2Hp1RYxkwwu7olpeW
 7Rc3JlkdfS+fN67g87lgcu9u9WgHO7JM1ABNwmykmrQIOceL0PxQYGah3KbZcolkTNAC
 d+aNFIMgyD/e1K7Olpehg+t7yTndewS4SxZ3nKST7Y/QmZuPP4a+d98VAgzqsbboOn3V
 fkF8rYXRE+2v+SC/IcR3imPlFAO6RWmdKGne0CPv8yPKwPU8lOc1GezXkzFTPWDPb+ui
 GKuA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=nvwWOMTGQ77E0LmZeuZKEvQxuFEurtKs8hS6ulk6Aag=;
 b=Oqs9QMIyZAeUdESmJqJENpJ9PXlYPQdirma0xx0OXoo8S1RzUAMXi67OkFsVO1Im80
 w/1ZXLeazHTJV5TzerFPTGT4aGRMR5D9A5ONnc/BDWREOO4bK8DqDZSrKdF7hxKEEaK9
 ofdsV3k1tfXXZXyxBrBBVN0ab5E8n5IgCZEeNEThZAjv9aJaOGhSLdRlAII4hNaq8DDo
 QSk32MF6i9R2hSF1sq++cOS8CA6QlRRQhMsVa64wdfwahHA31Bg4pix6r1zgZRvVDtxc
 gp7knW8ew0OE9tw6WHZE2QU3Dl/svtC6BHmZ2X2+1n0wgpFBFoAr1c/GhAv/ihtrf6Bw
 9rqQ==
X-Gm-Message-State: AOAM532aBH7RmLlFBesCuIW2sUwzTpfkNfL6fTZdu+vaF1BHjFpe/P1y
 YMqmkxhvR6HPmSQr5eM6LuKXiWWFlj62pGON4xU6PTCGc5A=
X-Google-Smtp-Source: ABdhPJxTdukTWahp/AqRaOdg6icx3eip4dzVvwdvd0qOyYZnmu7XjEn1D9dP00fsG7jNn1jWO6AhKjNPVTjF0XY7R1g=
X-Received: by 2002:a5d:4801:: with SMTP id l1mr1237166wrq.235.1590636735538; 
 Wed, 27 May 2020 20:32:15 -0700 (PDT)
MIME-Version: 1.0
From: Zhu Zihao <cjpeople2013@HIDDEN>
Date: Thu, 28 May 2020 11:32:04 +0800
Message-ID: <CA+rDc=C7Yp6tqc+h2O1W8Pbc0d6kA4LUgxmGXbE54vkeL+va0w@HIDDEN>
Subject: 28.0.50; [PATCH] Support plain project marked with file .emacs-project
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="00000000000096a7b705a6acf9c2"
Received-SPF: pass client-ip=2a00:1450:4864:20::430;
 envelope-from=cjpeople2013@HIDDEN; helo=mail-wr1-x430.google.com
X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache.
 That's all we know.
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 28 May 2020 00:45:13 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

--00000000000096a7b705a6acf9c2
Content-Type: text/plain; charset="UTF-8"

This patch add support for "plain project" in project.el. Plain project is a
kind of project without any VC backend but should be.

To mark a directoy as project, put an empty magic file .emacs-project under
the
directory, and project.el should be responsible for it.

~~~~

From cb0a67cfacf141a8b1955c08c3f459bcac801a39 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@HIDDEN>
Date: Thu, 28 May 2020 11:04:44 +0800
Subject: [PATCH] Support plain project marked with file .emacs-project

* lisp/progmodes/project.el (project-try-plain): New function
* lisp/progmodes/project.el (project-root): New dispatch variants
* lisp/progmodes/project.el (project-find-functions): Add project-try-plain
---
 lisp/progmodes/project.el | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 88f73e4fb31..4c1810aeb56 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -94,7 +94,7 @@

 (require 'cl-generic)

-(defvar project-find-functions (list #'project-try-vc)
+(defvar project-find-functions (list #'project-try-plain #'project-try-vc)
   "Special hook to find the project containing a given directory.
 Each functions on this hook is called in turn with one
 argument (the directory) and should return either nil to mean
@@ -194,6 +194,18 @@ project-files
    (or dirs
        (list (project-root project)))))

+(defun project-try-plain (dir)
+  "Return the plain project instance of current DIR.
+
+A directory with magic file \".emacs-project\" will be recognized as
+plain project."
+  (pcase (locate-dominating-file dir ".emacs-project")
+    (`nil nil)
+    (root (cons 'plain root))))
+
+(cl-defmethod project-root ((project (head plain)))
+  (cdr project))
+
 (defun project--files-in-directory (dir ignores &optional files)
   (require 'find-dired)
   (require 'xref)
-- 
2.26.2

--00000000000096a7b705a6acf9c2
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><p style=3D"margin:0px">This patch add support for &quot;p=
lain project&quot; in project.el. Plain project is a<br>kind of project wit=
hout any VC backend but should be.<br><br>To mark a directoy as project, pu=
t an empty magic file .emacs-project under the<br></p><div>directory, and p=
roject.el should be responsible for it.</div><div><br></div><div>~~~~</div>=
<div><br></div><div>From cb0a67cfacf141a8b1955c08c3f459bcac801a39 Mon Sep 1=
7 00:00:00 2001<br>From: Zhu Zihao &lt;<a href=3D"mailto:all_but_last@HIDDEN=
om">all_but_last@HIDDEN</a>&gt;<br>Date: Thu, 28 May 2020 11:04:44 +0800<b=
r>Subject: [PATCH] Support plain project marked with file .emacs-project<br=
><br>* lisp/progmodes/project.el (project-try-plain): New function<br>* lis=
p/progmodes/project.el (project-root): New dispatch variants<br>* lisp/prog=
modes/project.el (project-find-functions): Add project-try-plain<br>---<br>=
=C2=A0lisp/progmodes/project.el | 14 +++++++++++++-<br>=C2=A01 file changed=
, 13 insertions(+), 1 deletion(-)<br><br>diff --git a/lisp/progmodes/projec=
t.el b/lisp/progmodes/project.el<br>index 88f73e4fb31..4c1810aeb56 100644<b=
r>--- a/lisp/progmodes/project.el<br>+++ b/lisp/progmodes/project.el<br>@@ =
-94,7 +94,7 @@<br>=C2=A0<br>=C2=A0(require &#39;cl-generic)<br>=C2=A0<br>-(=
defvar project-find-functions (list #&#39;project-try-vc)<br>+(defvar proje=
ct-find-functions (list #&#39;project-try-plain #&#39;project-try-vc)<br>=
=C2=A0=C2=A0 &quot;Special hook to find the project containing a given dire=
ctory.<br>=C2=A0Each functions on this hook is called in turn with one<br>=
=C2=A0argument (the directory) and should return either nil to mean<br>@@ -=
194,6 +194,18 @@ project-files<br>=C2=A0=C2=A0=C2=A0 (or dirs<br>=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (list (project-root project)))))<br>=C2=
=A0<br>+(defun project-try-plain (dir)<br>+=C2=A0 &quot;Return the plain pr=
oject instance of current DIR.<br>+<br>+A directory with magic file \&quot;=
.emacs-project\&quot; will be recognized as<br>+plain project.&quot;<br>+=
=C2=A0 (pcase (locate-dominating-file dir &quot;.emacs-project&quot;)<br>+=
=C2=A0=C2=A0=C2=A0 (`nil nil)<br>+=C2=A0=C2=A0=C2=A0 (root (cons &#39;plain=
 root))))<br>+<br>+(cl-defmethod project-root ((project (head plain)))<br>+=
=C2=A0 (cdr project))<br>+<br>=C2=A0(defun project--files-in-directory (dir=
 ignores &amp;optional files)<br>=C2=A0=C2=A0 (require &#39;find-dired)<br>=
=C2=A0=C2=A0 (require &#39;xref)<br>-- <br>2.26.2<br><br><br><br></div></di=
v>

--00000000000096a7b705a6acf9c2--




Acknowledgement sent to Zhu Zihao <cjpeople2013@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#41572; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 6 Jun 2020 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.